347
SFTWR, SFTWRP, SFTWL, SFTWLP
1
2
3
4
4
6
7
8
7.3
S
hift instruction
7.3.5
S
FT
WR
, SFTWRP, SF
TWL, SFT
W
LP
Function
SFTWR(P)
(1) This instruction shifts n1 words data in the devices starting from the device specified by to the right by n2 words.
n1=9, n2=4
(2) The n2 words data in the devices starting from the highest device are filled with 0s.
(3) If the value specified by n1 or n2 is 0, the instruction will be not processed.
(4) If the value of n2 is equal to or larger than the value of n1, the n1 words data in the devices starting from the device
specified by will be filled with 0s.
SFTWL(P)
(1) This instruction shifts the n1 words data in the devices starting from the device specified by to the left by n2 words.
n1=9, n2=4
(2) The n2 words in the devices starting from the lowest device are filled with 0s.
(3) If the value specified by n1 or n2 is 0, the instruction will be not processed.
(4) If the value of n2 is equal to or greater than the value of n1, the n1 words devices starting from the device specified by
will be filled with 0s.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns on, and an error code is stored into
SD0.
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The value in n1 or n2 is negative.
––
––
––
––
4101
The points specified in n1 exceed those of the device specified in .
––
––
––
––
D
Filled with 0
H
+2
+1
D
D
+3
D
+4
D
+5
D
n2
+6
D
+7
D
+8
D
D
n1
+2
+1
D
D
+3
D
+4
D
+5
D
+6
D
+7
D
+8
D
D
30F
H
0
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
H
1E
100
0
1FF
10
1F
7FF
2A
0
0
0
30F
1E
100
0
1FF
D
D
10
0
7FF
3A
1F
30
0
FF
Filled with 0
H
+2
+1
D
D
+3
D
+4
D
+5
D
n2
+6
D
+7
D
+8
D
D
n1
+2
+1
D
D
+3
D
+4
D
+5
D
+6
D
+7
D
+8
D
D
1FF
H
H
H
H
H
H
H
H
0
H
0
H
0
H
0
H
H
3A
1F
30
0
FF
H
H
H
H
H
D
D