Chapter 6
.
COMMREQ/Data_Init_Comm Programming
6.4.15
COMMREQ #24: Read Data Command
This command is used to read data from a Genius High-Speed Counter. When the data is
received, it will be placed in the CPU memory location specified in the Command Block.
Command Block for the Read Data Command
Address
Command Length
9
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
24
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 HSC Device from which data is
to be retrieved.
A9
Deposit Memory Length
This entry tells the CPU how much memory is being allocated to
store the data returned by the Genius device. The value (in bytes or
bits) depends on the memory type selected as the Deposit Memory
type in
A10
below.
When a HSC block is configured as a Type A counter, enter 2 for
word memory types or 32 for bit memory types. However, when
configured as a Type B or Type C counter, enter 3 for word memory
types or 48 for bit memory types.
Note that the Read Data Reply Datagram always responds with six
bytes of data. The most significant bytes (Byte 4 & Byte 5) are null.
Bytes 0 thru Byte 3 contain the HSC Data requested.
A10
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.
A11
A12
Memory offset, bytes 1, 2
bytes 3, 4
Starting address within the Deposit Memory type.
(Byte 4 is msb, Byte 1 is lsb)
A13
Command Code
See Read/Write Data Command Code Table below.
A14
Counter Number
1 – 4
6.4.16
COMMREQ #25: Write Data Command
This command is used to set data values in a Genius High-speed Counter.
Command Block for the Write Data Command
Address
Command Length
7
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
25
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
Command Code
See Read/Write Data Command Code Table below.
A10
Counter Number
1-4
A11
A12
Data to be written
bytes 1, 2
bytes 3, 4
Four bytes of data to be written to the target Genius HSC
(Byte 4 is msb, Byte 1 is lsb)
GFK-2892B
PACSystems RX3i Genius Communications Gateway User Manual
Public 73