Chapter 6 Instruction Details
XBC E-Type Main Unit
6-154
Ver. 1
6.26.6 WSFT, WSFTP
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)
WSFT(P)
S O O O - O O O - O -
-
- O O O O
2~4
O
-
-
D O O O - O O O - O -
-
- O O O O
Operand
Description
Data Type
St
Address of Start word data of WSFT Operation
WORD
Ed
Address of End word data of WSFT Operation
WORD
1) WSFT (Word Shift)
(1) Shifts words data from Start Word (St) to End Word (Ed) word by word.
(2) Direction of Word Shift
- S1
<
S2 (e.g. WSFT D0000 D0003)
→
downward
- S1
>
S2 (e.g. WSFT D0003 D0000)
→
upward
2) Program Example
(1) If Input Signal P00000 is changed to On from Off status, ‘1234’ saved in D01000 will be shifted downward
by 1 word and saved in D01001.
WSFTP D01000 D01004
P00000
WSFT
WSFTP
S
t
means
WSFT
P S
t
Ed
E
d
Command
Start word
b1
5
b
0
End word
1234
2345
3456
4567
5678
Start word
b1
5
b
0
End word
0
1234
2345
3456
4567
Shift word
by word
If St < Ed
D01000
b15
b0
D01004
1234
2345
3456
4567
5678
D01000
b15
b0
D01004
0
1234
2345
3456
4567
Shift by 1
Command
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...