Delta DVP-ES2 User Manual Page 213

  • Download
  • Add to my manuals
  • Print
  • Page
    / 702
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 212
3. Instruction Set
3-97
API Mnemonic Operands Function
36
WSFR P
Word Shift Right
Controllers
ES2/EX2 SS2
SA2
SE
SX2
Bit Devices Word devices Program Steps Type
OP
X Y M S K H KnX KnY KnM KnS T C D E F
S
* * * * * * *
D
* * * * * *
n
1
* *
n
2
* *
WSFR, WSFRP: 9 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
Operands:
S: Start No. of source device D: Start No. of destination device n
1
: Length of data to be
shifted n
2
: Number of devices to be shifted as a group
Explanations:
1. This instruction performs a right shift from source device of n
2
registers starting from S to
destination device of n
1
registers starting from D.
2. This instruction is generally used in pulse execution mode (WSFRP).
3. The type of devices designated by S and D has to be the same, e.g. K
n
X, K
n
Y, K
n
M, and K
n
S
as a category and T, C, and D as another category
4. Provided the devices designated by S and D belong to K
n
type, the number of digits of K
n
in S
and D has to be the same.
5. Valid range of operand n1, n2 : 1 n2 n1 512
Program Example 1:
1. When X0 is triggered, WSFRP instruction shifts D10~D13 into data stack D20~D35 and
D20~D35 also shift to the right with a group of 4 registers.
2. The figure below illustrates the right shift of the registers in one scan.
n D23~D20 Carry
o D27~D24 D23~D20
p D31~D28 D27~D24
q D35~D32 D31~D28
r D13 ~D10 D35~D32 completed
X0
WSFRP
D10 K16D20
K4
D13 D12 D11 D10
D35 D34 D33 D32 D31 D30 D29 D28 D27 D26 D25 D24 D23 D22 D21 D20
1
23
4
5
4 registers in one group shift to the right
Carry
Page view 212
1 2 ... 208 209 210 211 212 213 214 215 216 217 218 ... 701 702

Comments to this Manuals

No comments