Schneider Electric LXM32M manual Modbus TCP communication, Connection management

Page 19

LXM32M

3 Basics

 

 

3.3Modbus TCP communication

3.3.1Connection management

Establishing of a connection The Modbus TCP server allows for TCP connections via the default port 502. A client can establish a new connection via this port. If the client is to exchange data with a remote server, a new client connec- tion via remote port 502 must be established.

Modbus data transfer A Modbus request is sent via a suitable, open connection. This TCP connection is found using the IP address of the remote device. The connection remains open for all Modbus communication. Up to 8 simultaneous connections are possible.

As described in the next chapter, a Modbus client can initialize several Modbus transactions without having to wait for the previous transac- tion to be finished.

Closing a connection After the Modbus communication between the client and a server is finished, the client causes the connection used to be closed.

The server does not close the connection under normal circumstan- ces.

However, when errors occur and in special cases, the server closes the connection, for example:

Communication errors

Communication inactivity

Maximum number of connections reached

The product can manage up to 8 TCP connections. If an attempt is made to establish a further connection beyond this maximum, the old- est unused connection is closed. If it is impossible to close the oldest unused connection, the new connection is refused.

0198441113843, V1.01, 01.2012

Modbus-TCP module

19

Image 19
Contents LXM32M Important information Table of contents Diagnostics and troubleshooting Accessories and spare parts LXM32M About this manual Further reading Fieldbus products on the network IntroductionLXM32M Qualification of personnel Before you begin safety informationIntended use Hazard categories Basic information Standards and terminology Bus topology BasicsModbus TCP technology Function principleClient / server model Network service SnmpStructure of a Modbus message Modbus TCP protocolField Length Description Mbap headerConnection management Modbus TCP communicationExcep Name Description Tion Code Modbus response to a Modbus requestAddress Value Reading and writing parameters4 I/O scanning to Drive Profile Lexium Byte Meaning Data type Parameter address 4.1 I/O scanning OutputBit Meaning 4.2 I/O scanning InputInputs Bit Signal Factory settingParameter channel Ctrl Subindex Index Function Code 3 Read Multiple Registers Modbus services Function CodeField Bytes Value Meaning Sub-function Code Diagnostics function Function Code 8 DiagnosticsFunction Code 16 Write Multiple Registers Function Code 23 ReadWrite Multiple Registers Object ID Object name Value Function Code 43 Encapsulated Interface TransportExample of Function Code ExamplesLXM32M Installation of the module InstallationDescription Order no Pin Signal Meaning Electrical installationCommissioning the device CommissioningSwitching on the device Power stage supply is switched off First SetupDhcp / dhcP Dhcp Bootp / boot BootpManual assignment of the network address Manual / MAnu ManualIP address Ethernet module, byte Assignment of the network address via Bootp Assignment of the network address via Dhcp Setting the protocol Setting the transmission rateSet the IP address of the gateway with the parameters Setting the gatewayMaster with Word Swap Setting the master for I/O scanning Setting I/O-ScanningActivating I/O scanning Setting the mapping for I/O scanning PLC Setting communication monitoring for I/O scanning Setting the web server0198441113843, V1.01 Operation Indication of the operating state Operating statesBit Name Meaning Bit Name Meaning Operating state Changing the operating stateOperating modes Indicating and monitoring the operating modeBit Name Description Bit Name Description Starting and changing an operating modeMODE+ACTION Overview of operating modesOperating mode Jog Operating mode Electronic Gear 24 h Operating mode Profile Torque23 h Operating mode Profile VelocityOperating mode Profile Position Operating mode Homing LXM32M6 Operation Operating mode Motion SequenceWeb server Extended settingsUser interface Main menu Submenu ContentFTP server Accessing the FTP serverFDR service Fast Device Replacement LXM32M Fieldbus communication error diagnostics Diagnostics and troubleshootingColor Status Meaning Status LEDsMeaning for EtherNet/IP Meaning for Modbus TCP ColorError indication Excep Name Description Tion Code LXM32M Cables Accessories and spare partsLXM32M Units and conversion tables GlossaryMoment of inertia TemperatureRotation TorqueTerms and Abbreviations LXM32M Index LXM32M