Although the ladder and relay circuit is similar in structure, elements, symbols and logic control functions and other aspects of phase, but they have many differences, the ladder program has its own rules.
1) Each logical line is always to the left from the bus, and then the contact is connected, the final termination of the coil or the right bus (right bus can not draw). Note: The bus between the left and the coil must be contacts between the coil and the right bus but you can not have any contact.
2) The ladder can contact any series or in parallel, but only in parallel to the relay coil and not in series.
3) the use of contacts unlimited number of times.
4) In general, the same coil can appear only once in the ladder. If in the program, the same coil is used twice or more times, known as “dual-coil output.” For the “dual-coil output”, some PLC treats it as a syntax error, and definitely not; some will be in front of the PLC output as invalid, only the last valid output; and some PLC, containing a jump or step ladder instruction allowed dual coil output.
5) For non-programmable ladder must be equivalent transformation into programmable ladder.
6) when there are several series circuit in parallel, the circuit with many serial contacts should be on the top, as shown in Figure 5-2a. There are several in parallel circuit in series, the circuit should be parallel contacts on the left, as shown in Figure 5-2b. Such a program compiled concise, less statements.
In addition, the input of the relay contacts in the design of the ladder according to the best state of all the input device is normally open to design more appropriate, less error-prone. Is recommended as an input device open with a constant contact with the PLC input terminal, the signal can only be used if some normally closed input, press input device is normally open to design, and then the ladder corresponding input relay contacts point negated (normally open into a normally closed, normally open normally closed change).