Chapter 6
.
COMMREQ/Data_Init_Comm Programming
6.4.4
COMMREQ #4: Read Diagnostics Command
Use this command to request diagnostic information from a Genius device or a bus interface
module. Diagnostics can be requested from any Genius device, even those configured not to
issue Report Fault messages. The diagnostic data returned by a block will indicate faults that
have occurred since power-up or since the last Clear Faults datagram. Current diagnostic
state can be found by issuing a Clear Faults command to the circuit(s) or channel(s) to clear
the fault history, then issuing a Read Diagnostics command.
This command causes the Genius Gateway to send a Read Diagnostics datagram to the
specified device. When the device receives this datagram, it returns a Read Diagnostics Reply
datagram. I/O blocks return data in message segments of up to 16 bytes per bus scan. The
content of the Read Diagnostics Reply message depends on the device being queried. The
first word of the reply will contain the length of the data that follows. Data is packed two
bytes per word. Message formats are shown in the
Genius I/O System User’s Manual
. When
all the data has been received, the Gateway transfers it to the PNC, which then transfers it to
the CPU.
Command Block for the Read Diagnostics 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
4
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.
A9
Maximum data memory
length. May represent
either bits or words
(depends on the memory
type selected below).
This entry tells the CPU how much memory is being allocated to
store the diagnostic data returned by the Genius device. The
number of bits or words needed depends on the number of circuits
on the block and the block type:
10 words (160 bits): Discrete blocks, 8-ckt.
18 words (288 bits): Discrete blocks, 16-ckt.
34 words (544 bits): Discrete blocks, 32-ckt.
8 words (128 bits): Analog, 4-in/2-out blocks.
8 words (128 bits): RTD Input blocks.
8 words (128 bits): Thermocouple Input blocks.
6 words (96 bits): High-Speed Counter block.
If the length of data returned by the device exceeds the length
specified here, the GCG writes as much data as possible to the PLC
CPU Memory and returns a data error to the COMMREQ Status Block.
The GCG will not write past the computed end-point.
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)
60
Public
PACSystems RX3i Genius Communications Gateway User Manual
GFK-2892B