GE GFK-1541B manual Modbus TCP Channel Commands, Open a Modbus/TCP Client Connection

Models: GFK-1541B

1 240
Download 240 pages 31.35 Kb
Page 123
Image 123

4

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

ƒReadData from a Modbus/TCP Device to the PLC

ƒWrite Data from the PLC to a Modbus/TCP Device

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 sixteen (16) channels are available for Modbus/TCP client communications. The number of channels currently allocated to SRTP communications can limit the number of channels available for client connections in a particular application.

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. The channel connection is released only when: the application program closes the channel, the channel is automatically closed because the PLC transitions to STOP, 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 (CSR) 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 CSR is set to a non-zero value to identify the failure. See the section “Status Data” later in this document for detailed CSR failure codes.

4-8

TCP/IP Ethernet Communications for the Series 90™ PLC User's Manual– May 2002

GFK-1541B

Page 123
Image 123
GE GFK-1541B manual Modbus TCP Channel Commands, Open a Modbus/TCP Client Connection