Compilation method for control program based on event graph method

Aiming at the large-scale multi-PLC control system, a compilation method for Control Program which based on event graph is proposed. An event graph model for control programs through converting control systems to discrete event systems is created. A new event graph traversal rule based on Depth First Search is also put forward. According to the principle of computing near the IO source, event graphs are grouped, and the instructions can be downloaded to the corresponding PLC automatically. The variables of devices can be synchronized through inserting network communication instructions. The experimental result shows that this method can decouple parallel tasks from serial control programs and keep the running logic according with the original program.