Controlling Communications In The Ladder Program; Essential Elements Of The Ladder Program - GE RX3i User Manual

Pacsystems
Hide thumbs Also See for RX3i:
Table of Contents

Advertisement

Chapter 9. Modbus/TCP Client
COMMREQ Status Word
The 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 generally
used to determine the cause of a communication error after the COMMREQ function is initiated. The cause is
reported in the form of an error code described later in this section. The COMMREQ Status word (CRS word) is
returned from the Ethernet interface to the PLC CPU immediately if the Command Block contains a syntax error
or if the command is local. The location of the CRS word is defined in the Command Block for the COMMREQ
function.
The COMMREQ Status word (CRS word) reports status in the format shown below. The CRS word location is
specified in Words 3 and 4 of the Command Block.
The 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 for
Modbus/TCP commands.

Controlling Communications in the Ladder Program

9.5
This section provides tips on how to control communications in your ladder program. Only segments of actual
ladder logic are included. Topics discussed are:

Essential Elements of the Ladder Program

Troubleshooting Your Ladder Program
Monitoring the Communications Channel
Essential Elements of the Ladder Program
Every ladder program, whether in the developmental phase or the operational phase, should do the following
before initiating a COMMREQ function.
1.
Initiate the COMMREQ function with a one-shot transitional coil. This prevents sending the same
COMMREQ Command Block more than once.
2.
Include at least the LAN Interface OK bit in the LAN Interface Status Word as an interlock contact for
the 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 the
COMMREQ Function Block before the COMMREQ function is initiated.
4.
Move the command code and parameters for the Channel command into the memory location
specified 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 synchronously
with execution of the COMMREQ. A number of CPU sweeps may occur before the data is read. It is
recommended that the data not be changed until after the COMMREQ Status Word indicates
completion of the command.
The example ladder program segment starting on the next page illustrates how to incorporate these important
points in your program.
162
PACSystems* RX7i & RX3i TCP/IP Ethernet Communications User Manual
Minor Error Codes (high byte)
Success and Major Error Codes (low byte)
Figure 57: Interpreting the COMMREQ Status Word
CRS Word in
Hex Format
High
Low
00
00
GFK-2224Q

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rx7i

Table of Contents