Page 238 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 238
COMPARE COUNTER
L1 Input Ladder logic program Output L2
Counter input
CTU
COUNT UP CU LESS Output
Counter input Counter C5:1
Preset 50 DN
Accumulated 0
EQU Output
Counter reset LESS Output
LES
LESS THAN
Source A C5:1.ACC GRT Output
0
Source B 10
EQU Output
EQU
EQUAL
Source A C5:1.ACC
0
Source B 20
GRT Output
GRT
GREATER THAN
Source A C5:1.ACC
0
Source B 30
Counter reset
C5:1
RES
Figure 10-27 Triggering outputs based on the accumulated value of a counter.
parameter value is equal to or inside the limits. Ladder logic program Output
Otherwise the instruction is false. LIM PL1 L2
• The instruction is true if—The lower limit has a LIMIT TEST PL1
value greater than the higher limit, and the instruc- Low limit N7:22
25
tion is equal to or outside the limits. Otherwise the Test N7:23
instruction is false. 48
High limit N7:24
The limit test instruction is said to be circular because 50
it can function in either of two ways. Figure 10-28 shows
an example of an LIM instruction where the low limit False (< 25) 25 50 False (> 50)
value is less than the high limit value. The operation of True
the logic rung can be summarized as follows: Figure 10-28 LIM instruction where the low limit value is
• The high limit has a value of 50, and the low limit less than the high limit value.
has a value of 25.
• Instruction is true for values of the test from 25 value. The operation of the logic rung can be summarized
through 50. as follows:
• Instruction is false for test values less than 25 or • The high limit has a value of 50, and the low limit
greater than 50. has a value of 100.
• Instruction is true because the test value is 48. • Instruction is true for test values of 50 and less
Figure 10-29 shows an example of an LIM instruction than 50 and for test values of 100 and greater
where the low limit value is greater than the high limit than 100.
Data Manipulation Instructions Chapter 10 219
pet73842_ch10_207-233.indd 219 03/11/15 4:02 PM