Page 107 - Programmable Logic Controllers, Fifth Edition
P. 107
a logically equivalent branching condition. Figure 5-34
shows an example of a circuit that contains a nested con- limitation diagram for a typical PLC. A maximum of seven
parallel lines and 10 series contacts per rung is possible.
tact D. To obtain the required logic, the circuit would be Another limitation to branch circuit programming is
programmed as shown in Figure 5-35. The duplication of that the PLC will not allow for programming of vertical
contact C eliminates the nested contact D. Nested branch- contacts. A typical example of this limitation is contact
ing can be converted into non-nested branches by repeat- C of the user program drawn in Figure 5-37. To obtain
ing instructions to make parallel equivalents. the required logic, the circuit would be reprogrammed as
Some PLC manufacturers have virtually no limitations shown in Figure 5-38.
on allowable series elements, parallel branches, or outputs. The processor examines the ladder logic rung for logic
For others, there may be limitations to the number of series continuity from left to right only. The processor never al-
contact instructions that can be included in one rung of a lad- lows for flow from right to left. This situation presents a
der diagram as well as limitations to the number of parallel
branches. Also, there is an additional limitation with some
PLCs: only one output per rung and the output must be lo- A D Y
cated at the end of the rung. The only limitation on the num-
ber of rungs is memory size. Figure 5-36 shows the matrix C
A B C Y
B E
Boolean equation: Y = (AD) + (BCD) + (BE) + (ACE)
D
Figure 5-37 Program with vertical contact.
A branch within
E a branch
A D Y
Figure 5-34 Nested contact program.
B C D
A B C Y
B E
D C
Contact A C E
instruction C
E
repeated
Figure 5-35 Program required to eliminate nested Figure 5-38 Reprogrammed to eliminate vertical contact.
contact.
Maximum 10 contacts
Maximum 7
parallel lines
Figure 5-36 PLC matrix limitation diagram.
88 Chapter 5 Basics of PLC Programming
Discrete inputs
1 2 3 4 5 6 7
pet73842_ch05_074-097.indd 88 B3:1/3 05/11/15 4:17 PM
Rung 1
Internal
relay
coil
Discrete inputs
B3:1/3 8 9 10 11 12
Rung 2
Internal Discrete
relay output
contact