Page 200 - Programmable Logic Controllers, Fifth Edition - Mobile version
P. 200
L1 Inputs Ladder logic program Outputs L2
CTU
PB1 Input A COUNT-UP COUNTER
Counter C5:2 CU
Input A Preset 10 Output A A
Accumulated 0
PB2 DN
Input B Output B B
CTD
Input B
Reset COUNT-DOWN COUNTER
Counter C5:2 CU
Input C Preset 10 Output C C
Accumulated 0
DN
C5:2 Output A
CU
C5:2 Output B
CD
C5:2 Output C
DN
Input C C5:2
RES
Figure 8-43 Program for Problem 7.
• An emergency stop button is used to stop the pro- As a result:
cess at any time. a. What is the accumulated count of counter CTU?
• If the sequence is interrupted by an emergency b. What is the accumulated count of counter CTD?
stop, counter and timer are reset automatically. c. What is the state of output A?
7. Answer the following questions with reference d. What is the state of output B?
to the up/down-counter program shown in Fig- e. What is the state of output C?
ure 8-43. Assume that the following sequence of 8. Write a program to implement the process
events occurs: illustrated in Figure 8-44. An up-counter must be
• Input C is momentarily closed. programmed as part of a batch-counting operation
• 20 on/off transitions of input A occur. to sort parts automatically for quality control. The
• 5 on/off transitions of input B occur. counter is installed to divert 1 part out of every
Quality control line
Parts conveyer
line
Proximity Gate
switch solenoid drive
Figure 8-44 Control process for Problem 8.
Programming Counters Chapter 8 181
pet73842_ch08_156-183.indd 181 03/11/15 3:58 PM