11 - 446 11 - 446
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
ZMOVE
Instruction
ZMOVE
• Transfers data between variables.
ZMOVE TO <transfer destination>,<offset 1> FROM <transfer source>,<offset
2>,<number of transferred bytes>
Syntax
transfer destination
• • • •
Specify the variable, one-dimensional array variable,
or one-dimensional numeric array name to which
data is to be transferred.
offset 1
• • • •
Specify the data storage location within the transfer
destination variable or array, using a number from 0
to 65534 in byte units.
transfer source
• • • •
Specify the transfer source, i.e. one-dimensional
array variable, one-dimensional numeric array, or
character variable in which data is stored before the
transfer.
offset 2
• • • •
Specify the data storage location within the transfer
source variable, array, or character variable using a
number from 0 to 65534 in byte units.
number of transferred bytes
• • • •
Specify the number of bytes of data to be
transferred.
Examples
0
2
4
02
H
A%( )
00
H
03
H
00
H
03
H
00
H
1
3
5
0
2
4
01
H
A%( )
00
H
02
H
00
H
03
H
00
H
1
3
5
(0)
(1)
(2)
(0)
(1)
(2)
0
2
4
01
H
A%( )
00
H
01
H
00
H
02
H
00
H
1
3
5
(0)
(1)
(2)
0
2
4
42
H
A%( )
43
H
44
H
45
H
46
H
00
H
1
3
5
(0)
(1)
(2)
0
2
4
01
H
A%( )
00
H
02
H
00
H
03
H
00
H
1
3
5
(0)
(1)
(2)
0
2
4
B$
1
3
5
6
A(41
H
)
B(42
H
)
C(43
H
)
D(44
H
)
E(45
H
)
F(46
H
)
G(47
H
)
ZMOVE TO A%( ),0 FROM B$,1,6
ZMOVE TO A%( ),0 FROM A%( ),2,3
ZMOVE TO A%( ),2 FROM A%( ),0,4
Transfers byte data (for 6 characters)
from the first byte (second character)
of B$ to A%(0) through A%(2).
Transfers the lower byte data of A%(1)
and A%(2) to the lower byte of A%(0)
and A%(1).
Transfers the data of A%(0)
and A%(1) to A%(1) and A%(2).