268
4 OPERATION CONTROL PROGRAMS
4.19 Other Instructions
Write device data to buffer memory: TO
■Usable data
: Usable
■Description, data type of result
• (n) words of data from the device specified with (S) are written to the address specified with (D2) and after of the buffer
memory in the specified with (D1).
Writing device data can be performed with the module access device (U\G).
(Example)
Writing 2 words from #0 to buffer memory address 0H of intelligent function module (start I/O number: 010H).
Refer to the following for details of module access device.
MELSEC iQ-R Motion Controller Programming Manual (Common)
• First I/O No. of the module set by [System Parameter] [I/O Assignment Setting] in GX Works3 is specified by (D1). (D1)
sets 20H by the system configuration when a TO instruction is executed in the D/A conversion module (R64DA).
Format Number of basic steps Usable steps
F/FS G
TO(D1), (D2), (S), (n) 14
Setting
data
Usable Data
Bit
device
Word device Constant Calculation
expression
Bit
conditional
expression
Comparison
conditional
expression
16-bit
integer
type
32-bit
integer
type (L)
64-bit
floating
point
type (F)
16-bit
integer
type
(K/H)
32-bit
integer
type
(K/H, L)
64-bit
floating
point
type (K)
(D1)
(D2)
(S)
(n)
Setting data Description Data type of result
(D1) First I/O No. of the module (000H to FF0H, 3E00H to 3E30H)
(D2) First address of the buffer memory which writes data. (0 to end of target module buffer memory)
(S) Start device No. which writing data are stored.
(n) Number of words to be written (1 to within range of target module buffer memory)
H0000
H0005
H000A
H0000
(S)
Device memory
H0000
H0005
H000A
H0000
Write the data
of a part for
(n) words
(D1)
(D2)
Intelligent
function module
buffer memory
U1\G0L = #0L
Power supply
module
R04CPU R32MTCPU RX40C7 R64AD
First
I/O No.
No. : 20H
First
I/O No.
No. : 10H
First
I/O No.
No. : 00H
First
I/O No.
No. : 3E10H
First
I/O No.
No. : 3E00H
R64DA