11 - 352 11 - 352
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
PUTMEM
Instruction
PUT MEMory
• Writes data to the communication module’s buffer memory, common memory, or extension
registers (ED).
PUTMEM TO <write destination>,<offset 1>,<FROM> <storage area for data to be
written>,<offset 2>,<number of bytes>
write destination
• • • •
Specify the starting address of buffer memory or
common memory, or the starting device number of
extension registers (ED).
storage area for data to be
written
• • • •
Specify an integer variable, integer array name,
character string variable, or character string array
variable where the data to be written is stored.
offset 1
• • • •
Specify the offset value (in byte units) from the
beginning of the write destination.
offset 2
• • • •
Specify the offset value (in byte units) from the
beginning of the storage area for data to be written.
Syntax
number of bytes
• • • •
Specify the length of data to be written in byte units.
PUTMEM TO 0,2 FROM
A%( ),0,6
• • • •
Writes data in A%(0) to A%(2) (6 bytes) to
communication module’s buffer memory 1 to 3.
(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
Addresses specified by
the PUTMEM instruction
6 bytes
PUTMEM TO &H1800,0
FROM $,1,4
• • • •
Writes data of the 1st to 4th character elements in
A$ (4 bytes) to communication module’s common
memory addresses &H1800 to &H1803.
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
PUTMEM TO W@ (ED,2),4
FROM A%( ),2,4
• • • •
Writes data in A%(1) and A%(2) (4 bytes) to ED4
and ED5.
Examples
4 bytes
(0)
(1)
(2)
30 21
H
68 42
H
Internal devices
ED4
ED5
3021
H
6842
H
8
10
9
11
A%( )
Содержание 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...