Chapter 9. Modbus/TCP Client
GFK-2224Q
January 2017
163
COMMREQ Ladder Logic Example
The input values for the Block Move Functions in the example below are taken from the Open Modbus/TCP
Connection (3000), Modbus/TCP Read (3003), and Close Modbus/TCP Connection (3001) Examples in this
chapter.
Named variables are used in this example to make the ladder program easier to follow. LANIFOK is bit 16 of
the LAN Interface Status bits. LAN_OK is bit 13 of the LAN Interface Status bits. All other nicknames may be
assigned as you choose.
1
2
3
4
Figure 58: COMMREQ Ladder Logic Segment
Rung # 1
: Input LANIFOK (bit 16 of the LAN Interface Status bits) monitors the health of the Ethernet interface.
Input LAN_OK (bit 13 of the LAN Interface Status bits) monitors the online/offline status of the Ethernet
interface. If both bits are set it is OK to send a COMMREQ and the ETH_READY coil is ON. ETH_READY is used as
an interlock for Rungs 2-16.
Rung # 2
: When ETH_READY is set, Input DO_OPEN triggers OPEN_REQ, which enables execution of the MOVE
and COMMREQ functions for the Open Modbus/TCP Connection COMMREQ. OPEN_REQ is a one-shot (Positive
Transition) coil, activating once when both ETH_READY and DO_OPEN have transitioned from OFF to ON.
Rung # 3
: The MOVE WORD function moves a zero to the CRS word referenced in the Command Block (see
rung #4). This clears the CRS word. This rung also resets the OPEN_FLT output coil of the COMMREQ Function
Block in rung #5.
It is vital that the CRS Status Word is cleared and the COMMREQ fault output coil be cleared each time before
initiating a COMMREQ function.
Rung # 4
: The BLKMV INT functions set up the COMMREQ Command Block contents. When this rung is
activated, the constant operands are moved into the memory beginning at the address indicated in the
instruction. The constant operands in this example are defined in the Open Modbus/TCP Connection Example
in this chapter.
Содержание 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: ......