11 - 447 11 - 447
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Description
• The ZMOVE instruction is used to transfer data from the area in memory specified in
<transfer source> in a BASIC program to the area specified in <transfer destination> as is.
The transfer is carried out transparently in units of one byte for the amount specified in
<number of transferred bytes>.
Specify the location from which the data transfer should be started, by the offset value in
byte units relative to the starting address of the memory area that the <transfer source>
occupies. Similarly, specify the location from which the transferred data should be stored,
by the offset value in byte units relative to the starting address of the memory area that the
<transfer destination> occupies.
• The ZMOVE instruction allows data transfer between two variables that cannot normally be
assigned by the LET instruction (numeric value
character).
(0)
(1)
(2)
Transfer
destination
(Example 1)
In
teger d
a
ta
Transfer
destination
Transfers within the same memory area
(transfer data in (0) and (1) to (1) and (2))
(0)
(1)
(2)
Transfer
destination
(Example 2)
Transfer
destination
Transfers to a memory area with
a different data type
(0)
(1)
(2)
Transfer
destination
(Example 3)
Transfer
destination
Transfers to the any part of a memory
area with a different data type
(0)
(1)
(2)
In
teger d
a
ta
In
teger d
a
ta
In
teger d
a
ta
Charact
e
r d
a
ta
Charact
e
r d
a
ta
• For <transfer destination>, specify the variable, etc. to which the data transferred from
<transfer source> will be assigned.
• Store dummy data in the variable used as <transfer destination>, before executing the ZMOVE
instruction as shown below.
If such dummy data has not been stored, an error occurs when the ZMOVE instruction is executed.
Integer variable
%=0
Floating point variable
!=0, #=0
Character variable
$=SPACE$(255)
• Always define an array used as <transfer destination> using the DIM instruction, even if the number
of elements used is 10 or less.
Furthermore, in cases where a character array variable name is to be used, store dummy data as
shown below in the specified elements.
$(n) = SPACE$(255)
When the ZMOVE instruction is executed, only the data in the specified elements in the array variable
name become the target range for the transfer.
• A two dimensional array cannot be used in the ZMOVE instruction.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...