Chapter 9. Modbus/TCP Client
162
PACSystems* RX7i & RX3i TCP/IP Ethernet Communications User Manual
GFK-2224Q
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.
Hex Format
High
Low
00
00
Minor Error Codes (high byte)
Success and Major Error Codes (low byte)
CRS Word in
Figure 57: Interpreting the COMMREQ Status Word
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.
9.5
Controlling Communications in the Ladder Program
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.
Содержание PACSystems RX7i
Страница 45: ......
Страница 54: ...Chapter 4 Configuration GFK 2224Q January 2017 41 Figure 18 CPE400 Advanced Ethernet Configuration LAN1 LAN 2 ...
Страница 80: ...Chapter 4 Configuration GFK 2224Q January 2017 67 ...
Страница 81: ......
Страница 122: ...Chapter 6 Programming EGD Commands GFK 2224Q January 2017 109 ...
Страница 142: ...Chapter 7 Programming SRTP Channel Commands GFK 2224Q January 2017 129 Figure 51 Sample Ladder Logic for COMMREQ ...
Страница 147: ......
Страница 193: ...Chapter 10 OPC UA Server 180 PACSystems RX7i RX3i TCP IP Ethernet Communications User Manual GFK 2224Q Example ...
Страница 202: ...Chapter 10 OPC UA Server GFK 2224Q January 2017 189 Figure 73 Machine Edition Online Command to Set Passwords ...
Страница 211: ......
Страница 253: ...Chapter 12 Diagnostics 240 PACSystems RX7i RX3i TCP IP Ethernet Communications User Manual GFK 2224Q ...
Страница 262: ...Chapter 13 Network Administration GFK 2224Q January 2017 249 ...
Страница 263: ......