Modbus tcp channel commands, Open a modbus/tcp client connection (3000) – FANUC Robotics America GFK-1541B User Manual

Page 123

Advertising
background image

4-8

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

May 2002

GFK-1541B

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.

www.cadfamily.com EMail:[email protected]
The document is for study only,if tort to your rights,please inform us,we will delete

Advertising