11. Appendix E: Modbus Commands

Chapter 6.11 Adding and Setting Up a Modbus Command, page 62, also shows a few examples of correspondences between the elements displayed in AbcConf and the corresponding Modbus frame fields.

See also: Chapter 6.11.2 With a Generic Modbus Slave, page 63, and chapter 6.11.3 Adding a Special Modbus Command, page 73, if the implementation of one of these commands would be incompatible with its implementation in the gateway, for example. You then have to create a special Modbus command to compensate for this incompatibility.

N.B. here, the notions of “input” and “output” (and assimilated) are irrelevant, as all Modbus commands have access to all of a Modbus slave’s memory. However, these names are retained in order to comply with the terms used in the standard Modbus documentation.

11.1. “Read Holding Registers” Command (16#03)

Frame

Field

Value or properties

Query

Starting Address (MSB)

- Address of the 1st output / internal register

Starting Address (LSB)

 

 

 

Number of points (MSB)

- Number of output / internal registers

 

Number of points (LSB)

 

 

Response

Byte count

- Number of data bytes = number of output / internal registers × 2

 

Data (first register / MSB)

- Byte swap = “Swap 2 bytes” (or “No swapping”)

 

Data (first register / LSB)

 

- Data length = Value of the “Byte count” field

 

………

 

Data (last register / MSB)

- Data location = Address in the gateway’s input memory

 

Data (last register / LSB)

 

 

11.2. “Preset Single Register” command (16#06)

Frame

Field

Value or properties

Query

Register (MSB)

- Address of the output / internal register

 

Register (LSB)

 

 

 

Preset data (MSB)

- Byte swap = “Swap 2 bytes” (or “No swapping”)

 

 

- Data length = 16#0002

 

Preset data (LSB)

 

- Data location = Address in the gateway’s output memory

Response

Register (MSB)

- Byte swap = “Swap 2 bytes” (or “No swapping”)

 

 

- Data length = 16#0002

 

Register (LSB)

 

- Data location = Address in the gateway’s input memory

 

Preset data (MSB)

 

N.B. This data is an echo to the query. So in most cases there is no need

 

Preset data (LSB)

 

to feed them back to the DeviceNet master.

Instead of creating a link between the echo of the response to the “Preset Single Register” command (16#06) and the memory area dedicated to the DeviceNet inputs (16#0002- 16#01FF), you’d better link it with the address 16#0400.

114

Page 114
Image 114
Schneider Electric LUFP9 user manual Read Holding Registers Command 16#03, Preset Single Register command 16#06