Chapter 6. COMMREQ/Data_Init_Comm Programming
GFK-2892F
March 2019
71
COMMREQ #11: Read Device Command
To read up to 128 bytes of data from another CPU and place it in the host PLC CPU memory, use the Read
Device command. This causes the Genius Gateway to issue a Read Device datagram. When the requested data
is received, it will automatically be placed in the CPU memory location specified in the Command Block.
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.
Command Block for the Read Device Command
Address
Command Length
18
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
11
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 from which data is to be
retrieved.
A9
A10
Source Memory Address,
bytes 1, 2
bytes 3, 4
Specify the location FROM which the requested data will be read.
(It is not necessary to specify a source memory address when sending a
Read 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 read %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 read %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
Source Data length,
(in words, bytes, or bits).
This is the amount of data to be read from the targeted device. When
reading a PLC, data length is defined in bits or words, depending on the
memory type being read. 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
Maximum Deposit memory
length
Memory length needed for the returned data. Value in bits or words
(depends on memory type selected in 21 below).
A21
Deposit Memory type
Enter the code representing the CPU Memory Type where the GCG will
deposit the data obtained from the target Genius Device. Use the same
codes as in 2.
A22
A23
Memory offset
bytes 1, 2
bytes 3, 4
Starting address within the Deposit Memory type.
(Byte 4 is MSB, Byte 1 is LSB)
Device Memory Addressing
For Series 90 and PACSystems PLCs, 9 contains the segment selector value for the memory type
being read. 10 contains the zero-based offset into the memory being read.
For legacy devices, use an absolute address, where 9 is the least-significant word of the address and
10 is the most-significant word of the address field.