beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 265

background image

6 Application Instructions API 00-49

DVP-PLC Application Manual

6-53

Program Example 2:

1.

When X0 = Off→On, the bit register stack data composed of Y10 ~ Y27 will shift to the right for 2 digits.

2.

The figure below illustrates the right shift of the words in one scan.

n

Y17 ~ Y10 → carry

o

Y27 ~ Y20 → Y17 ~ Y10

p

X27 ~ X20 → Y27 ~ Y20 completed

X0

WSFRP K1X20

K4

K2

X27

X26

X25 X24

Y27 Y26 Y25 Y24

Y23 Y22

Y21 Y20

Y17

Y16 Y15

Y14 Y13

Y12

Y11 Y10

1

2

3

Carry

K1Y10

X23

X22

X21 X20

When using Kn type device, please designate the same number of digits.

Right-shifting for 2 digits