![Siemens SITRANS F C MASSFLO series Operating Manual Download Page 11](http://html.mh-extra.com/html/siemens/sitrans-f-c-massflo-series/sitrans-f-c-massflo-series_operating-manual_1265486011.webp)
Modbus RTU RS-485
11
SFIDK.PS.023.D2.02
5.
Modbus addressing model
5.
Modbus addressing
model
The module allows R/W access to the following standard Modbus data register blocks:
•
Coils (ref. 0x address range)
•
Holding registers (ref. 4x address range)
I.e. the module will not support the other standard data register blocks:
•
„Discrete input“ (ref. 1x address range)
•
„Input registers“ (ref. 3x address range)
5.1 Modbus function codes
This device supports following function codes: 1, 3, 5, 16 and 17.
Function code 1 and 5 are used for accessing coils. 3 and 16 are used for accessing registers.
Function code 17 (report slave ID) will return a structure of identification information of the device.
Below the different function code exceptions are described.
Function code 1 (Read coils)
General exceptions:
•
Requesting less than 1 or more than 2000 coils => Exception 3 (Illegal data value)
•
Requesting more than max. message size (440 coils) => Exception 2 (Illegal data address)
•
Requesting data above/crossing limitation of max. coil address (0xFFFF) => Exception 2
(Illegal data address)
Application exceptions:
•
Application errors => Exception 4 (Slave device error)
•
Further information about the error can be read from holding registers 680+681 (Last Coil
Addr + ErrorNo)
Holes/register alignment:
•
Unmapped coils return zero when read
Function code 3 (Read holding registers)
General exceptions:
•
Requesting less than 1 or more than 125 registers => Exception 3 (Illegal data value)
•
Requesting more than max. message size (27 registers) => Exception 2 (Illegal data address)
•
Requesting data above/crossing limitation of max. register address (0xFFFF) => Exception
2 (Illegal data address)
Application exceptions:
•
Application errors => Exception 4 (Slave device error)
•
Further information about the error can be read from holding registers 682+683 (Last
HoldReg Addr + ErrorNo)
Holes/register alignment:
•
The read command always returns data if no exception is given. Bad start/end alignment will
result in only parts of the data item being read
•
Holes in the holding register map return value zero in all bytes. E.g. reading 2 registers starting
at 4:0004 above will result in 2 bytes of
„float B“
followed by 2 zeroes
Function code 5 (Write single coil)
General exceptions:
•
Writing anything else but 0x0000 (OFF) or 0xFF00 (ON) to a coil => Exception 3 (Illegal data
value)
•
Writing to an unmapped coil => Exception 2 (Illegal data address)
Application exceptions:
•
Application errors => Exception 4 (Slave device error)
•
Further information about the error can be read from holding registers 680+681 (Last Coil
Addr + ErrorNo)