11 - 76 11 - 76
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
GETMEM
Instruction
GET MEMory
• Reads data from the buffer memory, common memory, and expansion register (ED) of the
communication module.
GETMEM TO <read data store area> , <offset 1>
FROM <read source> , <offset 2>, <number of bytes>
read source
• • • •
Specify the starting address of the buffer memory or
common memory, or the starting device of the
expansion register (ED).
read data store area
• • • •
Specify the integer variable, integer array name,
character variable, or character array variable to
store the read data.
offset 1
• • • •
Specify the offset value (in bytes) from the start of
the read data store area.
offset 2
• • • •
Specify the offset value (in bytes) from the start of
the read source.
Syntax
number of bytes
• • • •
Specify the length of read data in bytes.
GETMEM TO A%( ),
0 FROM 0, 2, 6
• • • •
Reads data of the buffer memory 1 through 3 (six
bytes) to A%(0) through A%(2).
(0)
(1)
(2)
(3)
12 56
H
37 66
H
08 00
H
49 56
H
A%( )
0
1
2
3
56
H
Buffer memory
12
H
66
H
37
H
00
H
08
H
0
1
2
3
4
5
6
7
Address specified by the
GETMEM instruction
6 bytes
GETMEM TO A$, 1 FROM
&H1800, 0, 4
• • • •
Reads data from the address &H1800 through
&H1803 (four bytes) of the common memory in the
communication module to second through fifth
characters of A$.
Examples
A$
0
1
2
3
4 bytes
0
1
2
3
4
5
A (41
H
)
B (42
H
)
C (43
H
)
D (44
H
)
E (45
H
)
F (46
H
)
Common memory
1800
H
1801
H
1802
H
1803
H
1804
H
42
H
43
H
44
H
45
H
Содержание 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...