Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 489

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

Advertisement

Processing details
• These instructions separate the 16-bit binary data in the device specified by (s) and later into (n) bytes, and store the
separated data in the device specified by (d) and later.
b15
∙∙∙
(s)
(1)
(s)+1
(1)
(n)
*1
(s)+(
-1)
(1)
2
(1) Upper byte
(2) Lower byte
(3) Upper byte data
(4) Lower byte data
*1 Values after the decimal point are rounded up.
Ex.
When (n) is 5, the data in the device specified by (s) (upper 8 bits) to (s)+2 (lower 8 bits) are stored in the device specified by
(d) to (d)+4.
b15
b8
b7
∙∙∙
(s)
12H
(s)+1
56H
(s)+2
FEH
(1)
(1) The data, FEH, is ignored when (n) is 5.
(2) (n)=5
• Setting the number of bytes for (n) automatically determines the range of 16-bit binary data specified by (s) and the range
of the device specified by (d) for storing the separated data.
• If (n) is 0, no processing is performed.
• The upper 8 bits of the device specified by (d) are automatically filled with 00Hs.
Ex.
When the byte data in D12 to D14 are stored in the lower 8 bits of D11 to D16
b15
∙∙∙
b8
b7
D12
32H
D13
34H
D14
36H
(1) 00H is automatically stored.
• Even when the ranges of the device where the separation target data is stored and the device for storing the separated
data overlap, the processing is performed normally.
Range of the device where the separation target data is stored
(n)
(s) to (s)+(
-1)
2
Operation error
There is no operation error.
b8
b7
b0
∙∙∙
(2)
(2)
(2)
b0
∙∙∙
(d)
39H
(d)+1
78H
(d)+2
DCH
(d)+3
(d)+4
∙∙∙
b0
D11
31H
33H
D12
D13
35H
D14
D15
D16
b15
b8
∙∙∙
(d)
00H
(d)+1
00H
(d)+2
00H
00H
(d)+3
00H
(d)+(n)-2
00H
(d)+(n)-1
b15
b8
b7
∙∙∙
00H
00H
00H
00H
00H
b15
∙∙∙
b8
b7
00H
00H
00H
00H
00H
00H
(1)
Range of the device for storing the separated data
(d)+0 to (d)+(n)-1
b7
b0
∙∙∙
(4)
(3)
(4)
(n)
(3)
(4)
(3)
b0
∙∙∙
39H
12H
(2)
78H
56H
DCH
∙∙∙
b0
31H
32H
33H
34H
35H
36H
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
6
487

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents