Schneider Electric LUFP7 Switch User Manual


 
110
13. Appendix F: Modbus Commands
Chapter 6.11 Adding and Setting Up a Modbus Command, page 68, 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 70, and chapter 6.11.3 Adding a Special Modbus
Command, page 80, 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.
13.1. “Read Holding Registers” Command (16#03)
Frame Field Value or properties
Query Starting Address (MSB)
Starting Address (LSB)
- Address of the 1st output / internal register
Number of points (PF)
Number of points (Pf)
- Number of output / internal registers
Response Byte count - Number of data bytes = Number of output / internal registers × 2
Data (first register / MSB)
Data (premier registre / Pf)
………
Data (dernier registre / PF)
Data (dernier registre / Pf)
- Byte swap = “No swapping” (or “Swap 2 bytes”)
- Data length = Value of the “Byte count” field
- Data location = Address in the gateway’s input memory
13.2. “Preset Single Register” Command (16#06)
Frame Field Value or properties
Query Register (MSB)
Register (LSB)
- Address of the output / internal register
Preset data (MSB)
Preset data (LSB)
- Byte swap = “No swapping” (or “Swap 2 bytes”)
- Data length = 16#0002
- Data location = Address in the gateway’s output memory
Response
Register (MSB)
Register (LSB)
Preset data (MSB)
Preset data (LSB)
- Byte swap = “No swapping” (or “Swap 2 bytes”)
- Data length = 16#0002
- Data location = Address in the gateway’s input memory
N.B.: These data are an echo to the query. So in most cases there is no
need to feed them back to the Profibus-DP 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 Profibus-DP inputs (16#0002-
16#00F3), you’d better link it with the address 16#0400.