Chapter 6. COMMREQ/Data_Init_Comm Programming
72
PACSystems RX3i Genius Communications Gateway
GFK-2892F
COMMREQ #12: Write Device Command
To send up to 128 bytes of data to another CPU on the bus, use the Write Device command. Any type of data
that can be addressed by its memory type and offset can be sent. This command causes the Gateway to issue
a Write Device datagram to the specified device.
Note that while the GCG001 does support this COMMREQ, the Genius devices which respond to such a
COMMREQ are not currently supported by the GCG001.
Using Write Device Messages Instead of Global Data
Write Device datagrams can replace Global Data when the target device is a PLC that is using a Genius Bus
Controller to connect to the Genius bus. However, Write Device will not work in this manner when the target
PLC is using a Genius Gateway to connect to the Genius bus.
Command Block for the Write Device Command
Address
Command Length
14
–
78 depending on length of data specified in A19.
A1
No Wait
0
A2
Status Block memory type
70 (%I), 72 (%Q), 8 (%R), 10 (%AI), 12 (%AQ) or 196 (%W)
A3
Status Block offset
Beginning address for the COMMREQ Status Block.
A4
Idle timeout value
0
A5
Max. communications time
0
A6
Command number
12
A7
PROFINET Device number
1-255: The device number of the targeted GCG Genius Gateway.
A8
Genius Device Number
0-31: the SBA of the targeted Genius Device to which data is to be
transmitted.
A9
A10
Target Memory Address,
bytes 1, 2
bytes 3, 4
Specify the location TO which the supplied data will be transmitted.
(It is not necessary to specify a source memory address when sending a
Write Device COMREQ to a computer).
A11
A12
A13
A14
Program name,
characters 1, 2
characters 3, 4
characters 5, 6
characters 7, 8
Required to write to %P or %L memory in another PLC, otherwise zero.
If the target of the command is NOT a PLC, A11 through Address
+18 are ignored; they may contain any value.
Program names are limited to 7 characters. Character 8 and all other
trailing characters MUST be entered as nulls (00h).
A15
A16
A17
A18
Block name,
characters 1, 2
characters 3, 4
characters 5, 6
characters 7, 8
Required to write to %L memory in a PLC, otherwise zero.
For %P, 15 through A18 are ignored.
Block names are limited to 7 characters. Character 8 and all other trailing
characters MUST be entered as nulls (00h).
A19
Target Data length,
(in words, bytes, or bits).
This is the amount of data to be written to the targeted device. When
reading a PLC, data length is defined in bits or words, depending on the
memory type being written. For other types of devices, the length
entered here is as expected by the target device.
The maximum length is equal to 128 bytes.
A20
to
An
Data
Data to be transmitted, then written into the specified memory of the
target device.