An approach to design and implement the control function of LD (Ladder Diagram) in the hydropower simulation system based on all paths searching algorithm is proposed in this paper. LD is widely used as a programming language for PLC (Programmable Logic Controller), but it doesn’t be executed automatically in the hydropower simulation system which is a software system, and there is no compiler or interpretation for LD in it. The approach in this paper is not only to present a graphical interface to design LD, but also implement its control function through transforming it to a corresponding undigraph, in which, all paths be-tween two vertexes (live wire and null line) are searched by the proposed algorithm. An application example is presented to verify the validity of the algorithm and shows that the algorithm is correct and practicable. In addition, how to implement the control function based on object-oriented thought is introduced. The running time is shown at last, which proves that the system with the algorithm can meet the real-time request in the hydropower simulation system.
展开▼