5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-54
API
Applicable model
20PM
36
WSFR
P
P
Moving the values in word devices
rightwards
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S
* * * * * * *
D
* * * * * *
n1
* *
n2
* *
Note: The instruction supports V devices and Z devices. (If the 16-bit
instruction is used, Z devices can not be used. If the 32-bit instruction
is used, V devices can not be used.)
Please refer to specifications for more information about device
ranges.
If KnX/KnY/KnM/KnS is used, it is suggested that X/devices/Y
devices/M device numbers/S device numbers should start from a
number which is a multiple of 16 in the octal numeral system or in the
decimal numeral system, e.g. K1X0 (octal numeral system), K4SY20
(octal numeral system), K1M0 (decimal numeral system), and K4S16
(decimal numeral system).
16-bit instruction (9 steps)
WSFR
Continuity
instruction
WSFRP
Pulse
instruction
32-bit instruction
- - - -
Flag: None
Explanation
S: Initial word device which is moved; D: Initial word device which is moved; n
1
:
Number of values which are moved; n
2
: Number of values forming a group
The values in the n
1
word devices starting from D are divided into groups (n
2
values as a group), and these groups are moved rightwards. The values in the
n
2
word devices starting from S are moved to the vacant word devices in the
word devices starting from D.
Generally, the pulse instruction WSFRP is used.
If the operand S is KnX/KnY/KnM/KnS, the operand D can be a counter, timer,
or a data register. If the operand D is KnY/KnM/KnS, the operand S can be a
counter, timer, or a data register.
If the operand S is KnX/KnY/KnM/KnS, and the operand D is KnY/KnM/KnS, Kn
in KnX/KnY/KnM/KnS which is S and Kn in KnY/KnM/KnS must be the same.
1≤n
2
≤n
1
≤512
Example 1
When X0 is turned from OFF to ON, the values in the sixteen word devices
starting from D20 are divided into groups (four values as a group), and these
groups are moved rightwards.
The values in the word devices are moved rightwards in the order ~ during
a scan cycle.
D23~D20 The values in D23~D20 are carried.
D27~D24 D23~D20
D31~D28 D27~D24
D35~D32 D31~D28
D13~D10 D35~D32
X0
WSFRP
D10 K16D20
K4
They are carried.
D13 D12 D11 D10
D35 D34 D33 D32 D31 D30 D29 D28 D27
34
5
D26 D25 D24 D23 D22 D21 D20
12
Four values as a group are moved rightwards