Chapter 9. Modbus/TCP Client162 PACSystems* RX7i & RX3i TCP/IP Ethernet Communications User Manual GFK-2224QCOMMREQ Status WordThe COMMREQ Status word (CRS word) provides detailed information on the status of the COMMREQ request.The communications status word is not updated in the CPU each scan as are the status bits. They are generallyused to determine the cause of a communication error after the COMMREQ function is initiated. The cause isreported in the form of an error code described later in this section. The COMMREQ Status word (CRS word) isreturned from the Ethernet interface to the PLC CPU immediately if the Command Block contains a syntax erroror if the command is local. The location of the CRS word is defined in the Command Block for the COMMREQfunction.The COMMREQ Status word (CRS word) reports status in the format shown below. The CRS word location isspecified in Words 3 and 4 of the Command Block.Hex FormatHigh Low00 00Minor Error Codes (high byte)Success and Major Error Codes (low byte)CRS Word inFigure 57: Interpreting the COMMREQ Status WordThe Ethernet Interface reports the status of the COMMREQ back to the status location. See Chapter 11,“Diagnostics” for COMMREQ major and minor error codes that may be reported in the CRS words forModbus/TCP commands.9.5 Controlling Communications in the Ladder ProgramThis section provides tips on how to control communications in your ladder program. Only segments of actualladder logic are included. Topics discussed are:▪ Essential Elements of the Ladder Program▪ Troubleshooting Your Ladder Program▪ Monitoring the Communications ChannelEssential Elements of the Ladder ProgramEvery ladder program, whether in the developmental phase or the operational phase, should do the followingbefore initiating a COMMREQ function.1. Initiate the COMMREQ function with a one-shot transitional coil. This prevents sending the sameCOMMREQ Command Block more than once.2. Include at least the LAN Interface OK bit in the LAN Interface Status Word as an interlock contact forthe COMMREQ function. You may choose to add more interlocks.3. Zero the word location you specify for the COMMREQ Status (CRS) word and the FT Outputs of theCOMMREQ Function Block before the COMMREQ function is initiated.4. Move the command code and parameters for the Channel command into the memory locationspecified by the IN input of the COMMREQ Function Block before the COMMREQ function is initiated.Note: When using a Write Data or Read/Write COMMREQ, data is not read from the local PLC synchronouslywith execution of the COMMREQ. A number of CPU sweeps may occur before the data is read. It isrecommended that the data not be changed until after the COMMREQ Status Word indicatescompletion of the command.The example ladder program segment starting on the next page illustrates how to incorporate these importantpoints in your program.