Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 367

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions shift the (n2) bit(s) of area to the right within the (n1) bits of data area starting from the device specified
by (d). After the shift, (n2) points of area from (s) are set into (n2) points of area from (d)+(n1-n2).
• When constant 0 is specified for (s), 0s are stored in (n2) bits from (d)+(n1-n2) after the shift.
• When constant 1 is specified for (s), 1s are stored in (n2) bits from (d)+(n1-n2) after the shift.
• When (n2) is 0, the processing is not performed.
Ex.
When (n1)=10 and (n2)=4
(n2)
(s)+3
(s)+2
(s)+1
(s)
(d)+9
(d)+8
(d)+7
(d)+6
1
1
1
0
Ô
(d)+9
(d)+8
(d)+7
(d)+6
Overflow (data to be deleted)
(n2)-bit shift to the right
Copy
Operation error
Error code
Description
(SD0)
2821H
The range for (n2) points from (s) and that for (n1) points from (d) are overlapping.
3405H
A constant other than 0 or 1 is specified when the constant (s) is specified.
The values specified in (n1) and (n2) are such that (n1)<(n2).
(n1)
(d)+5
(d)+4
(d)+3
(d)+2
(d)+1
1
1
1
1
Ó
(d)+5
(d)+4
(d)+3
(d)+2
(d)+1
1
1
1
0
(d)
0
0
Ò
(d)
1
1
6 BASIC INSTRUCTIONS
365
6.5 Shift Instructions
6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents