Chapter 9. Modbus/TCP ClientGFK-2224Q January 2017 153Command 3003, Example 4 – Read FIFO QueueRead the FIFO Queue from the remote Modbus/TCP server. Store the FIFO Queue Data at location %W1. Returnthe COMMREQ Status word to %R10.Dec (Hex)Word 1 00008 (0008) Length of Channel command Data BlockWord 2 00000 (0000) Always 0 (no-wait mode request)Word 3 00008 (0008) Memory type of CRS word (%R)Word 413 00009 (0009) CRS word address minus 1 (%R10)Word 5 00000 (0000) ReservedWord 6 00000 (0000) ReservedWord 7 03003 (0BBB) Read from a Modbus/TCP DeviceWord 8 00006 (0006) Channel number (6)Word 9 00024 (0018) Modbus Function Code (Read FIFO Queue)Word 10 00196 (00C4) Local PLC Memory TypeWord 11 00001 (0001) Local PLC Starting AddressWord 12 00048 (0030) FIFO Pointer AddressWord 13 00001 (0001) Data Size (Unused)Word 14 00001 (0001) Unit Identifier(Word 7) Channel Command Number: Word 7 identifies the COMMREQ as a Read Exception Status from theModbus/TCP device.(Word 8) Channel Number: Word 8 identifies the channel number previously allocated for communication withthe remote Modbus/TCP server.(Word 9) Modbus Function Code: Word 9 specifies Modbus Function Code 24, Read FIFO Queue.(Word 10) Local PLC Memory Type: Words 10-11 specify the location in the local PLC where the Ethernetinterface will store data received from the remote device. Valid values for Word 10 are listed on page 150.(Word 11) Local PLC Memory Address: Word 11 determines the starting address in the local PLC in which thedata from the remote device is to be stored. The value entered is the offset (1-based) from the beginning of PLCmemory for the memory type and mode specified in Word 10. This offset will be either in bits, bytes, or wordsdepending on the mode specified. Valid ranges of values depend on the PLC’s memory ranges. Be sure thisarea is large enough to contain the requested data without overwriting other application data.(Word 12) FIFO Pointer Address: Word 12 is the FIFO pointer address in the Remote Device.(Word 13) Data Size: Word 13 is unused because the return data size is dependent on the number of items inthe server’s FIFO queue when the command is received. Zero (0) through 32 registers can be returned as aresult of this function code.(Word 14) Unit Identifier: This field is typically used by Ethernet to Serial bridges to specify the address of aModbus Slave on a multi-drop link. The Modbus/TCP Unit Identifier is a special control code used in aModbus/TCP message block.