EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 440

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
438
7 APPLICATION INSTRUCTIONS
7.5 Data Processing Instructions
The "00H" code will automatically be stored at the upper 8 bits of the byte storage device designated by (D).
Even though the range of devices with the data to be dissociated ((S) to (S)+(n 2 - 1)) is the same as the range of devices
for storing dissociated data ((D) to (D)+(n-1)), the instruction operates correctly.
BTOW
Links the lower 8 bits of the 16-bit data in n words stored in the area starting from the device designated by (S) in 1-word
units and stores it into the area starting from the device designated by (D). The upper 8 bits of n-word data stored in the
area starting from the device designated by (S) will be ignored. Further, if n is an odd number, 0 is stored at the upper 8 bits
of the device where the nth byte data is stored.
For example, if n=5, the lower 8 bits of data from (S) to ((S)+4) are linked and stored at (D) to ((D)+2).
Setting the number of bytes with n automatically determines the range of the byte data designated by (S) and the range of
the devices to store the linked data designated by (D).
No processing will be conducted when the number of bytes designated by n is "0".
The upper 8 bits of the byte storage device designated by (S) are ignored, and the lower 8 bits are used.
Linking is correctly processed even when the device range ((S) to (S)+(n-1)) where the data to be linked is stored overlaps
with the device range ((D) to (D)+(n 2 - 1)) where the linked data will be stored. For example, the following will take place
in a case where the lower 8 bits of D11 to D16 are to be stored at D12 to D14:
31H
32H
33H34H
35H36H
D13
D14
31
H
00H
32H00H
33H00H
34H00H
36H00H
35H00H
D12
D13
D14
D16
D12
D15
D11
b8 b0
Stores 00H.
b8 b0
b15 b7
b15
b7
b15 b8b7 b0
b15 b8 b7 b0
S
S
S Data of the 1st byte
n bytes
Data of the (n-1) byte
Upper bytes are ignored.
S
S
D
D
n
2
+( -1)
D
*1: Figures after the decimal point are rounded up.
*1
+1
+2
+3
+(n-1)
Data of the 2nd byte
Data of the 3rd byte
Data of the 4th byte
Data of the nth byte
Data of the 1st byte
Data of the 3rd byte
Data of the 2nd byte
Data of the 4th byte
Data of the nth byte
If n = 5
b15 b8b7 b0
b15 b8 b7 b0
S
S
S
S
D
D
12H
34H
56H
78H
12H34H
56H78H
00H
00H
00H
00H
FEH00H
FEH
00H
00H is set.
S
D
+1
+1
+2
+2
+3
+4
D12
31
H
00
H
31
H
32
H
33
H
34
H
D11
D13
D12
D14
31
H
32
H
33
H
34
H
36
H
D13
D16
00
H
00
H
00
H
00
H
00
H
35
H
00
H
D15
D11
35
H
36
H
35
H
00
H
36
H
00
H
D14
D15
D16
b15
b8
b7
b0
b15 b8 b7 b0

Table of Contents

Related product manuals