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

Page 33
Image 33
Schneider Electric LXM32M manual Examples, Example of Function Code