Schneider Electric LXM32M manual Function Code 16 Write Multiple Registers

Page 30

3 Basics

LXM32M

 

 

3.4.3"Function Code" 16 (Write Multiple Registers)

This "Function Code" 16 (Write Multiple Registers) allows you to write several consecutive parameters, starting at any address.

Modbus request Structure of the Modbus request:

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

16 = 10h

Write Multiple Registers

 

 

 

 

Starting Address

2

(various)

Address of the first parameter to be written

 

 

 

 

Quantity Of Regis-

2

2 * m

Number of 16 bit values to be written

ters

 

 

(1 parameter has the value 2 since a parameter

 

 

 

consists of a 32 bit value)

 

 

 

 

Byte Count

1

4 * m

Number of data bytes

 

 

 

 

Registers Value

2 * m

(various)

Parameter values

 

 

 

 

Modbus response Structure of the positive Modbus response:

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

16 = 10h

Write Multiple Registers

 

 

 

 

Starting Address

2

(various)

Corresponds to the Modbus request

 

 

 

 

Quantity Of Regis-

2

2 * m

Corresponds to the Modbus request

ters

 

 

 

 

 

 

 

Structure of the negative Modbus response

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

10h + 80h = 90h

Write Multiple Registers

 

 

 

 

Exception Code

1

01h ... 04h

See chapter

 

 

 

"3.3.2 Modbus response to a Modbus request"

 

 

 

 

0198441113843, V1.01, 01.2012

30

Modbus-TCP module

Image 30
Contents LXM32M Important information Table of contents Diagnostics and troubleshooting Accessories and spare parts LXM32M About this manual Further reading Introduction Fieldbus products on the networkLXM32M Before you begin safety information Qualification of personnelIntended use Hazard categories Basic information Standards and terminology Function principle BasicsModbus TCP technology Bus topologyNetwork service Snmp Client / server modelModbus TCP protocol Structure of a Modbus messageMbap header Field Length DescriptionModbus TCP communication Connection managementModbus response to a Modbus request Excep Name Description Tion CodeReading and writing parameters Address Value4 I/O scanning to Drive Profile Lexium 4.1 I/O scanning Output Byte Meaning Data type Parameter address4.2 I/O scanning Input Bit MeaningBit Signal Factory setting InputsParameter channel Ctrl Subindex Index Modbus services Function Code Function Code 3 Read Multiple RegistersField Bytes Value Meaning Function Code 8 Diagnostics Sub-function Code Diagnostics functionFunction Code 16 Write Multiple Registers Function Code 23 ReadWrite Multiple Registers Function Code 43 Encapsulated Interface Transport Object ID Object name ValueExamples Example of Function CodeLXM32M Installation Installation of the moduleDescription Order no Electrical installation Pin Signal MeaningCommissioning Commissioning the deviceFirst Setup Switching on the device Power stage supply is switched offManual / MAnu Manual Bootp / boot BootpManual assignment of the network address Dhcp / dhcP DhcpIP address Ethernet module, byte Assignment of the network address via Bootp Assignment of the network address via Dhcp Setting the transmission rate Setting the protocolSetting the gateway Set the IP address of the gateway with the parametersMaster with Word Swap Setting I/O-Scanning Setting the master for I/O scanningActivating I/O scanning Setting the mapping for I/O scanning PLC Setting the web server Setting communication monitoring for I/O scanning0198441113843, V1.01 Operation Operating states Indication of the operating stateBit Name Meaning Changing the operating state Bit Name Meaning Operating stateIndicating and monitoring the operating mode Operating modesBit Name Description Starting and changing an operating mode Bit Name DescriptionOverview of operating modes MODE+ACTIONOperating mode Jog Operating mode Electronic Gear Operating mode Profile Torque 24 hOperating mode Profile Velocity 23 hOperating mode Profile Position Operating mode Homing Operating mode Motion Sequence LXM32M6 OperationExtended settings Web serverMain menu Submenu Content User interfaceAccessing the FTP server FTP serverFDR service Fast Device Replacement LXM32M Diagnostics and troubleshooting Fieldbus communication error diagnosticsStatus LEDs Color Status MeaningColor Meaning for EtherNet/IP Meaning for Modbus TCPError indication Excep Name Description Tion Code LXM32M Accessories and spare parts CablesLXM32M Glossary Units and conversion tablesTorque TemperatureRotation Moment of inertiaTerms and Abbreviations LXM32M Index LXM32M