A new method of converting ladder diagram into statement list applied in PLC development
In order to design a PLC controller,the realization process of compiling and calculating from ladder diagram to statement list is taken as the focus of the research,and a new method of converting ladder diagram into statement table applied in PLC development is proposed.It is a conversion method based on node potential energy.In this method,the ladder diagram is analogous to the circuit diagram.By imitating the electric potential energy,the energy flow in the virtual ladder diagram is represented by the node potential energy.The connection relationship between the primitives of the ladder diagram is abstracted into a numerical relationship by the determination of the node potential energy of the ladder diagram,and the binary tree is established based on this relationship,and the statement table is generated by traversing.This method is simple and clear,and can completely describe the ladder diagram with a low complexity data structure,and easily and accurately complete the compiling and calculating from the ladder diagram to the statement list.In addition,it can be applied to the conversion of ladder diagram programs with complex logical relationship.This conversion method can also provide a reference for the solution of other similar graph relationships,so it has universal applicability.
PLCladder diagramstatement listconversion methodnode potential energybinary tree