1. PLC Concepts 1.5.1 Creating a PLC Ladder Program The editing of the program should start from the left side bus line to the right side bus line, and from up to down. However, the right side bus line is omitted when editing in WPLSoft. A single row can have maximum 11 contacts on it. If more than 11 contacts are connected, a continuous symbol “0” will be generated automatically and the 12th contact will be placed at the start of next row. The same input points can be used repeatedly. See the figure below:
0 X0 X1 X2 X3 X4 X5 X6 X7 X10 C0 C1 Y1 0 X11 X12 X13 When evaluating the user program, PLC scan starts from left to right and proceeds to next row down until the PLC reaches END instruction. Output coils and basic / application instructions belong to the output process and are placed at the right of ladder diagram. The sample program below explains the execution order of a ladder diagram. The numbers in the black circles indicate the execution order. X1 Y1 M1 Execution order of the sample program:
1 LD X0 2 OR M0 3 AND X1 4 LD X3 AND M1 ORB 5 LD Y1 AND X4 6 LD T0 AND M3 ORB 7 ANB 8 OUT Y1 TMR T0 K10 1-5 Ladder Diagram Explanation Instruction Available Devices Structure Multiple output branches MPS MRD MPP None Output coil OUT Y, M, S S Step ladder STL S Basic / Application instruction - Basic instructions and API instructions. Please refer to chapter 3 Instruction Set Inverse logic INV None X0 M0 Y1 X4 TMR T0 K10