Page 183 - Programmable Logic Controllers, Fifth Edition
P. 183
Internal
output
L1 Input A relay contact One-shot it allows logic continuity for a single scan whenever the
trigger signal goes from an on to an off state.
The conveyor motor PLC program of Figure 8-18
illustrates the application of an up-counter along with a
A
Trigger programmed one-shot (OSR) transitional contact instruc-
input tion. The counter counts the number of cases coming off
the conveyor. When the total number of cases reaches 50,
the conveyor motor stops automatically. The trucks being
loaded will take a total of only 50 cases of this particular
A Internal
relay coil product; however, the count can be changed for different
product lines. The operation of the program can be sum-
Figure 8-16 One-shot, or transitional, contact program.
marized as follows:
• The momentary start button is pressed to start the
goes from off to on. The contact will allow logic continu- conveyor motor M1.
ity for one scan and then open, even though the trigger- • The passage of cases is sensed by the proximity switch.
ing signal may stay on. The on-to-off transitional contact, • Cases move past the proximity switch and incre-
shown in Figure 8-17b, provides the same operation as ment the counter’s accumulated value with each
the off-to-on transitional contact instruction, except that false-to-true transition of the switch.
On On
O O
On On
Symbol One Symbol One
scan scan
O O
(a) O -to-on transitional contact (b) On-to-o -transitional contact
Figure 8-17 Transitional contact instructions.
Inputs Ladder logic program Output
I:1/3 B3:0/0 CTU
L1 OSR COUNT-UP COUNTER CU L2
Stop Counter C5:0 OL
I:1/1 Preset 50 DN O:2/0 M1
Accumulated 0
O:2/0
Start I:1/1 I:1/2 O:2/0
I:1/2
C5:0/DN O:2/0
Proximity
switch
C5:0/DN C5:0
RES
I:1/3
I:1/4
Reset
I:1/4
Figure 8-18 Case-counting program.
164 Chapter 8 Programming Counters
pet73842_ch08_156-183.indd 164 03/11/15 3:58 PM