Download AD51H-BASIC Programming Manual (Command)

Transcript
11 INSTRUCTIONS AND FUNCTIONS
MELSEC-Q
• Specify the starting location of the data transfer in the memory area of <transfer
destination> in <offset 1>. This should be specified as an offset value relative to the
starting address of the memory area of <transfer destination>, in byte units.
Example
Specify 2 for <offset 1> when data is transferred to the 3rd and subsequent bytes.
Memory area of <transfer destination>
0
1
Data to be
transferred
1st byte (starting location
of the memory area of
<transfer destination>)
2
3rd byte
3
Target range
for transfer
4
n
Byte offset value when <transfer destination>
is specified as an array name ( )
If <transfer destination> is specified as an array variable name, specify the byte offset
value relative to the starting address of the memory area of the specified element only.
Example
Memory area of <transfer destination>
When element (x) of an
integer array is specified
(x)
0
1
Target range
for transfer
Byte offset value
• For <transfer source>, specify the variable, etc. in which the data to be transferred to
<transfer destination> is stored.
Always define an array used as <transfer source> with the DIM instruction, even if the number
of elements used is 10 or less.
When the ZMOVE instruction is executed, only data in the portion defined by the DIM instruction
becomes the target for transfer.
(Usually, an array with 10 or fewer elements can be used without defining it using the DIM
instruction).
11 - 427
11 - 427