Mitsubishi QD51 Programming Manual page 248

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

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.
• 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:
• 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:
When an integer array variable name is specified:
When a character variable or a character array variable is specified:
11 - 78
Integer variable
character variable
$(n)=SPACE$(255)
%
1
%(0)
1
%(1)
3
%(2)
5
$
0
1
2
3
$(n)
0
1
2
3
%=0
$=SPACE$(255)
Specify 0 to specify the lower byte, or 1 to specify
the higher byte, since the integer variable
0
consists of two bytes (=16 bits) per variable.
The offset values are as follows, since an integer
array consists of two bytes (=16 bits) per element:
0
• To specify the lower byte of element number n
<offset> = n 2
2
• To specify the higher byte of element number n
<offset> = n 2+1
4
For the character variable and character array
variable, specify
4
5
<offset> = n-1
to specify the nth character in the variable as the
4
5
starting data, since a half-byte character in the
variable is one byte.
MELSEC-Q
11 - 78

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents