FX Series Programmable Controlers Applied Instructions 5
5-49
5.4.7 WSFR (FNC 36)
Operation:
The instruction copies n
2 source devices to a word
stack of length n
1. For each addition of n2 words, the
existing data within the word stack is shifted n
2words
totheright.Anyworddatamovingtoaposition
exceeding the n
1 limit is diverted to an overflow area.
The word shifting operation will occur every time the
instruction is processed unless it is modified with
either the pulse suffix or a controlled interlock.
Note: when using bit devices as source (S) and
destination (D) the Kn value must be equal.
Mnemonic Function
Operands
Program steps
SDn
1 n2
WSFR
FNC 36
(
Word
shift right)
The value of the
source devices are
copied to a
controlled word
stack moving the
existing data to the
right
KnX, KnY,
KnM,KnS,
T, C, D
KnY,KnM,
KnS,
T, C, D
K,H,
Note:
FX users: n
2 ≤ n1 ≤ 512
WSFR,
WSFRP:
9steps
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
X0
WSFR
D 10 K 16 K 4
[ S ] [ D ]
D 0
[ n1 ] [ n2 ]
(1)
(2)(3)(4)
(5)
D
D
D
D
D
(1)
(2)
(3)
(4)
(5)
13
17
21
25
3
-
-
-
-
-
D
D
D
D
D
10
14
18
22
0
D
D
D
D
13
17
21
25
-
-
-
-
D
D
D
D
10
14
18
22
D 3
D 2
D 1 D 0
D25
D24
D23 D22
D18
D21
D14
D17
D13
D12
D11 D10