Schneider Electric LXM32M manual Examples, Example of Function Code

Page 33

LXM32M

3 Basics

 

 

3.4.6Examples

3.4.6.1 Example of "Function Code" 3

Reading an error memory entry. Since the Modbus addresses of the parameters of an error memory entry are contiguous (ascending order), a single Modbus request is sufficient.

Parameters _ERR_number (15362), _ERR_class (15364), _ERR_time (15366) and _ERR_qual (15368).

Modbus request Structure of the Modbus request:

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

3

Read Multiple Registers

 

 

 

 

Starting Address

2

15362 (3C02h)

Address of the first parameter to be read

 

 

 

 

Quantity Of Regis-

2

8

Number of the 16 bit values to be read = 8

ters

 

 

 

 

 

 

 

Modbus response Structure of the positive Modbus response:

Field

Bytes

Value

Meaning

 

 

 

 

 

Function Code

1

3

Read Multiple Registers

 

 

 

 

Byte Count

1

16

Number of bytes: 8 bytes of data

 

 

 

 

Registers Value

16

32 bit value

_ERR_number, 15362 (error number)

 

 

32 bit value

_ERR_class, 15364 (error class)

 

 

32 bit value

_ERR_time, 15366

(error time)

 

 

32 bit value

_ERR_qual, 15368

(error qualifier)

 

 

 

3.4.6.2 Example of "Function Code" 16

Writing of the software limit switches. Since these parameters also have consecutive addresses, a single Modbus request is sufficient:

Parameters MON_swLimP (1544) and MON_swLimN (1546).

Modbus request Structure of the Modbus request:

Field

Bytes

Value

Meaning

 

 

 

 

Function Code

1

16

Write Multiple Registers

 

 

 

 

Starting Address

2

1544 (608h)

Address of the first parameter to be written

 

 

 

 

Quantity Of Regis-

2

4

Number of parameters = 4 (8 bytes of data)

ters

 

 

 

 

 

 

 

Byte Count

1

8

Number of bytes: 8 bytes of data

 

 

 

 

Registers Value

8

32 bit value

MON_swLimP, 1544

 

 

32 bit value

MON_swLimN, 1546

Modbus response Structure of the positive Modbus response:

01.2012

 

 

 

 

Field

Bytes

Value

Meaning

 

 

 

 

 

 

V1.01,

Function Code

1

16

Write Multiple Registers

 

 

 

 

Starting Address

2

1544 (608h)

Address of the parameter

 

 

 

 

 

 

0198441113843,

Quantity Of Regis-

2

4

Number of parameters = 4 (8 bytes of data)

ters

 

 

 

 

 

 

 

 

 

 

 

 

Modbus-TCP module

33

Image 33
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 Before you begin safety information Qualification of personnelIntended use 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 Modbus services Function Code Function Code 3 Read Multiple RegistersField 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 Installation of the moduleDescription Order no 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 Setting I/O-Scanning Setting the master for 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 Operating states Indication of the operating stateBit Name Meaning Bit Name Meaning Operating state Changing the operating stateIndicating and monitoring the operating mode Operating modesBit 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 GlossaryRotation TemperatureTorque Moment of inertiaTerms and Abbreviations LXM32M Index LXM32M