Schneider Electric LXM32M manual Function Code 23 ReadWrite Multiple Registers

Page 31

LXM32M

3 Basics

 

 

3.4.4"Function Code" 23 (ReadWrite Multiple Registers)

This "Function Code" 23 (ReadWrite Multiple Registers) allows you to read and write several consecutive parameters, starting at any address.

Modbus request Structure of the Modbus request:

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

23 = 17h

Read/Write Multiple Registers

 

 

 

 

Read Starting

2

(various)

Address of the first parameter to be read

Address

 

 

 

 

 

 

 

Quantity To Read

2

2 * n

Number of 16 bit values to be read

 

 

 

(1 parameter has the value 2 since a parameter

 

 

 

consists of a 32 bit value)

 

 

 

 

Write Starting

2

(various)

Address of the first parameter to be written

Address

 

 

 

 

 

 

 

Quantity To Write

2

2 * m

Number of 16 bit values to be written

 

 

 

(1 parameter has the value 2 since a parameter

 

 

 

consists of a 32 bit value)

 

 

 

 

Write Byte Count

1

4 * m

Number of data bytes

 

 

 

 

Write Registers

4 * m

(various)

Parameter values

Value

 

 

 

 

 

 

 

Modbus response Structure of the positive Modbus response:

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

23 = 17h

Read/Write Multiple Registers

 

 

 

 

Byte Count

1

2 * n

Number of data bytes

 

 

 

 

Read Registers

2 * n

(various)

Parameter values

Value

 

 

 

 

 

 

 

Structure of the negative Modbus response

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

17h + 80h = 97h

Read/Write Multiple Registers

 

 

 

 

Exception Code

1

01h ... 04h

See chapter

 

 

 

"3.3.2 Modbus response to a Modbus request"

 

 

 

 

0198441113843, V1.01, 01.2012

Modbus-TCP module

31

Image 31
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