Schneider Electric LXM32M manual Modbus TCP protocol, Structure of a Modbus message

Page 17

LXM32M

3 Basics

 

 

3.2Modbus TCP protocol

The Modbus protocol defines a so-called Modbus PDU (Protocol Data Unit) which is independent of the underlying communication layers. This Modbus PDU consists of the fields "Function Code" and "Data". Depending on the mapping to the different network protocols, the Modbus PDU is extended by additional fields in the so-called Modbus ADU (Application Data Unit). The Modbus PDU and the Modbus ADU constitute the Modbus message, also referred to as "Frame".

 

MODBUS TCP/IP ADU

MBAP Header

Function code

Data

 

 

MODBUS PDU

Figure 3: Structure of a Modbus message

The "Function Code" of a message specified the Modbus service to be triggered. The "Data" field can contain additional information, depend- ing on the "Function Code".

Due to the encapsulation of "Function Code" and "Data" in the Mod- bus PDU, the Modbus services and the object model can be the same in the case of all Modbus versions.

In the case of a "Function Code" for which the "Data" field in the Mod- bus PDU has a fixed length, the "Function Code" is sufficient.

In the case of a "Function Code" for which the "Data" field in the Mod- bus request or the Modbus response has a variable amount of data, the "Data" field contains a byte counter.

The maximum size of a Modbus ADU is 260 bytes. The size of an embedded Modbus PDU is 253 bytes.

NOTE: The fields are encoded in Big Endian format (highest-value byte first).

0198441113843, V1.01, 01.2012

Modbus-TCP module

17

Image 17
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 Intended use Before you begin safety informationQualification of personnel Hazard categories Basic information Standards and terminology Modbus TCP technology BasicsFunction principle Bus topologyClient / 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 Field Bytes Value Meaning Modbus services Function CodeFunction Code 3 Read Multiple Registers 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 Description Order no InstallationInstallation of the module Pin Signal Meaning Electrical installationCommissioning the device CommissioningSwitching on the device Power stage supply is switched off First SetupManual assignment of the network address Bootp / boot BootpManual / MAnu Manual Dhcp / dhcP DhcpIP 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 Activating I/O scanning Setting I/O-ScanningSetting the master for 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 Bit Name Meaning Operating statesIndication of the operating state Bit Name Meaning Operating state Changing the operating stateBit Name Description Indicating and monitoring the operating modeOperating modes 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 GlossaryRotation TemperatureTorque Moment of inertiaTerms and Abbreviations LXM32M Index LXM32M