11 - 78 11 - 78
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
• Specify the variable, etc. where the data read from the buffer memory is stored in <read
data store area>.
Store dummy data of <number of bytes> or more to the variable specified as <read data
store area> before executing the GETMEM instruction. An error occurs during the
execution of the GETMEM instruction if the dummy data is not stored.
Integer variable
character variable
%=0
$=SPACE$(255)
• Always use the DIM instruction to define the area used as <read data store area> even if
the number of used elements is 10 or less. If it is not defined by the DIM instruction, data
can be stored only in the area that was defined by the DIM instruction when the GETMEM
instruction is executed.
In addition, store the dummy data for <number of bytes> or more as follows, when a
character array variable is used:
$(n)=SPACE$(255)
• In <offset 1>, specify in bytes which part of data of variables specified by <read data store
area> will be stored at the beginning.
In <offset 2>, specify in bytes which part of data of variables specified by <read source> to
be read at the beginning.
When an integer variable is specified:
%
1
0
Specify 0 to specify the lower byte, or 1 to specify
the higher byte, since the integer variable
consists of two bytes (=16 bits) per variable.
When an integer array variable name is specified:
%(0)
1
0
3
2
5
4
%(1)
%(2)
The offset values are as follows, since an integer
array consists of two bytes (=16 bits) per element:
• To specify the lower byte of element number n
<offset> = n 2
• To specify the higher byte of element number n
<offset> = n 2+1
When a character variable or a character array variable is specified:
$
$(n)
1
2
3
4
5
0
1
2
3
4
5
0
For the character variable and character array
variable, specify
<offset> = n-1
to specify the nth character in the variable as the
starting data, since a half-byte character in the
variable is one byte.
Содержание 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...