Chapter 9. Modbus/TCP Client
GFK-2224Q
January 2017
145
location of the CRS word, you must specify a zero for the offset. The offset for %R100 would be 99 decimal.
Note that this is the only zero-based field in the Channel commands.
(Word 5):
Reserved. Set to zero.
(Word 6):
Reserved. Set to zero.
(Words 7 and up) Data Block:
The Data Block defines the Channel command to be performed. For information
on how to fill in the Channel command information, see the next section.
9.3
Modbus/TCP Channel Commands
This section describes the operation of the Channel commands. A detailed description and example of each
Channel command is included. There are four Channel commands:
▪
Open a Modbus/TCP Connection
▪
Close a Modbus/TCP Connection
▪
Read Data from a Modbus Server Device to the PLC
▪
Write Data from the PLC to a Modbus Server Device
▪
Mask Write Register Request to a Modbus Server Device
▪
Read/Write Multiple Registers between PLC memory and a Modbus Server Device
Please note that Modbus/TCP channel COMMREQs (unlike SRTP channel COMMREQs) do not contain a
parameter to configure a timeout value. Enforcing a timeout for a Modbus channel command is at the
discretion of the user and must be implemented in the user application.
Open a Modbus/TCP Client Connection (3000)
The Modbus/TCP Ethernet interface transfers data to or from another Modbus/TCP device using a
channel
. Up
to 32 channels are available for Modbus/TCP client communications. However, these 32 channels are shared
with SRTP Channels so that the combination of SRTP Channels and Modbus/TCP Channels cannot exceed 32.
The Open Modbus/TCP COMMREQ requests the communication subsystem to associate a channel with a
remote Modbus/TCP device. Using the COMMREQs defined later in this document the PLC may transfer data to
and from a remote device.
Once a channel is allocated for Modbus/TCP Client communications, the channel remains allocated (i.e. another
protocol such as SRTP Channels cannot use the channel). The channel connection is released only when: the
application program closes the channel, the channel is automatically closed when the PLC transitions to STOP,
when the Ethernet interface uses a Redundant IP and the CPU transitions from the Active to the Backup unit,
the Ethernet interface is reset or the underlying TCP connection is terminated.
The IP address of the remote Modbus/TCP device is specified in the Open Modbus/TCP COMMREQ using the
standard dotted-decimal format. No other IP address format is accepted.
The COMMREQ Status Word (CRS) indicates the success or failure of the Open Modbus/TCP Client Connection
COMMREQ. If the COMMREQ requests an invalid channel number or an already allocated channel the
COMMREQ fails and the CRS is set to a non-zero value to identify the failure. See the section “Status Data” later
in this document for detailed CRS failure codes.
Содержание 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: ......