1 Basic Principles of PLC Ladder Diagram Example 14: How to enlarge the counting range The counting range of a 16-bit counter is 0 ~ 32,767. As X13 C5 the circuit in the left hand side, using two counters can increase the counting range to n1*n2. When the counting of counter C5 reaches n1, C6 will start to count for one X14 time and reset for counting the pulses from X13. When Y1 C6 the counting of counter C6 reaches n2, the pulses from input X13 will be n1*n2. Example 15: Traffic light control (by using step ladder instruction) Traffic light control Vertical Light Horizontal Light Timing Diagram:
Vertical Light Red Yellow Green Horizontal Light Red Yellow Green DVP-PLC Application Manual 1-22 CNT C5 Kn1 CNT C6 Kn2 RST C5 RST C6 Red light Yellow light Green light Green light flashes Vertical light Y0 Y1 Y2 Y2 Horizontal light Y10 Y11 Y12 Y12 On time 35 secs 5 secs 25 secs 5 secs 0 1 2 5 secs 25 secs 10 5 secs 11 5 secs 12 25 secs 5 secs