Chapter 6 Instruction Details
XBC E-Type Main Unit
6-155
Ver. 1
6.26.7 WSFL, WSFLP, WSFR, WSFRP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
WSFL(P)
WSFR(P)
D1 O O O - O O O - O -
-
- O O O O
4~6
-
-
-
D2 O O O - O O O - O -
-
- O O O O
N O O O - O O O - O -
- O O O O O
Operand
Description
Data Type
D1
Device Number of the section to shift words.
WORD
D2
Device Number of the section to shift words.
WORD
N
Number of words to shift at a time.
WORD
1) WSFL (Word Shift Left)
(1) Shifts words between D1 and D2 toward the upper word of number N. 0s as many as the lower words shifted
at this moment and will be saved in the replaced position.
2) WSFR (Word Shift Right)
(1) Shifts words between D1 and D2 toward the lower word of number N. 0s as many as the upper words shifted
at this moment and will be saved in the replaced position.
3) Program Example
(1) If Input Signal P00020 is changed to On from Off status, 9-word data from P0000 to P0008 will be shifted
to the right by 2-word and 0 will be saved in P0007, P0008.
WSFR P0000 P0008 2
P00020
8888 7777
6666
5555
2222 1111
P8
Shift by 2-word
Before
9999
3333
4444
P7
P6
P5
P4
P3
P2
P1
P0
0
9999
8888
7777
4444 3333
P8
After
0
5555
6666
P0
WSFL, WSFR
P D
1
D
2
WSFLP, WSFRP
D
1
D
2
means
WSFL/WSFR
N
N
Command
Command
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...