beautypg.com

1 basic principles of plc ladder diagram – Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 25

background image

1 Basic Principles of PLC Ladder Diagram

DVP-PLC Application Manual

1-21

Example 14: How to enlarge the counting range

C6

CNT

Kn2

C5

X13

CNT

RST

C5

Kn1

X14

C5

RST

Y1

C6

C6

The counting range of a 16-bit counter is 0 ~ 32,767. As

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

time and reset for counting the pulses from X13. When

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)

Vertical

Light

Horizontal

Light

Traffic light control

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

Timing Diagram:

Y0

Y1

Y2

Y10

Y11

Y12

Vertical
Light

Red

Yellow

Green

Horizontal
Light

Red

Yellow

Green

25 secs

5 secs

5 secs

25 secs

5 secs

5 secs