1.1. Structure of the Modbus protocol ................................................................................................................. 3
1.2 Modbus Data Format ................................................................................................................................ 4
1.2.1 16-bit Integer Value ............................................................................................................................. 4
1.2.2 32-bit Float corresponding to IEEE 754 ............................................................................................... 4
1.2.3 32-bit Integer Value ............................................................................................................................. 4
1.2.4 Selectable Swap Modes for Rotronic Devices ..................................................................................... 5
2 PF4/5 Modbus Fields and Mapping ......................................................................................................... 5
2.3 Device Specific Discrete Inputs (read only) ............................................................................................ 11
2.4 Device Specific Input Registers (read only) ............................................................................................ 12
2.4.1 Device Data ....................................................................................................................................... 12
2.4.2 Current Values: Float Values ............................................................................................................. 15
2.4.3 Current Values: Integer Values .......................................................................................................... 15
2.4.4 Explanation of Flags .......................................................................................................................... 16
2.5 Device Specific Holding Registers .......................................................................................................... 18
2.5.1 Value Type ......................................................................................................................................... 18
2.5.2 Value Unit .......................................................................................................................................... 19
2.5.3 Integer Value Scaling ......................................................................................................................... 20
2.5.4 Reference Value Settings .................................................................................................................. 21
2.5.5 Device Specific Settings .................................................................................................................... 21
The PF4/5 can handle Modbus RTU (asynchronous communication over RS485) and Modbus TCP (clientserver communication over Ethernet). Modbus ASCII is not supported.
For detailed information about Modbus protocol see:
(http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf
Attention!
• Changes to register content (especially Holding Registers) in the PF4/5 can change the
functionality of the PF4/5. This may cause the PF4/5 to become inoperable
• Changes of register contents should only be made with the necessary knowledge of the
Modbus protocol
).
1.1. Structure of the Modbus protocol
1.1.1 Modbus RTU / TCP
1.1.1.1 Modbus RTU
Modbus RTU is an asynchronous communication protocol. The PF4/5 handles Modbus RTU over the included
RS485 interface. The communication parameters are 19200 Baud, 8-bit data, no parity, one stop bit and cannot
be changed.
1.1.1.2 Modbus TCP
Modbus TCP is a client-server communication protocol over Ethernet. The PF4/5 handles Modbus TCP over the
port 502 and cannot be changed.
Modbus TCP needs a Modbus Application Protocol Header (MBAP 7 bytes ) in front of the Protocol Data Unit (
PDU ).
Modbus commands are integrated in PDU. Every Modbus command has his own PDU.
Attention!
•Active Modbus TCP Connection
If no Modbus request is sent during an active Modbus communication for more than 30
seconds, the active TCP socket is reset and must be reopened for a new Modbus request
•Physical interruption of the Ethernet line
After a physical interruption of the Ethernet line, the Ethernet connection with the PF4/5
cannot be re-established for at least 30 seconds
A Modbus TCP message includes a MBAP-Header and looks like:
For detailed information look at (http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf).
1.2 Modbus Data Format
The Modbus protocol only specifies the 16-bit integer data type and is declared as “Big-Endian” protocol.
1.2.1 16-bit Integer Value
16-bit Integer for Modbus Devices
For other data types, as 32-bit floating point, there is no specification how they should be mapped to the
Modbus address range. It is up to the device manufacturer to specify this format.
1.2.2 32-bit Float corresponding to IEEE 754
S – Sign
E – Exponent
M - 23 bit Mantissa
32-bit Float for Rotronic Modbus Devices
The 32-Bit Float value is represented by two 16-bit registers. The 4 Bytes have to be mapped to the Modbus
address range as shown below
1.2.3 32-bit Integer Value
Example: Integer Value 0x12345678
32-bit Integer for Rotronic Modbus Devices
The 32-Bit Integer value represents two 16-bit registers. The 4 bytes of the 32-bit Integer value have to be mapped to the
Modbus address range as shown below.
Because there is no standard and it is mostly a matter of personal preference, it is configurable how the four
bytes are being mapped to the two registers.
1.2.4 Selectable Swap Modes for Rotronic Devices
Selectable swap modes (see Device Specific Settings-> Modbus Operation Mode) only for 32-bit Float and 32bit Integer values based on Little Endian memory organisation.
Coils and registers in Modbus are addressed starting at zero. Therefore coils numbered 1…16
are addressed as 0…15 or registers numbered e.g. 10'001…10'016 are addressed as
10'000…10'015.
Note!
Function Codes 0x02 and 0x0F are not supported by PF4/5 device.
The content of not specified coils/registers are undefined.
2.2 Device Specific Coils
With Modbus Coils you can get the state of one or more coils or activate/deactivate one or more coils.
Assisted Modbus commands are Read Coils (0x01), Write Single Coil (0x05). Modbus Command Write Multiple Coils (0x0F) is not supported.
2.2.1 Relay and Valve
Command to energize/de-energize the relay and/or the valve of the PF4/5 manually.
PF4/5 – Bedienungsanleitung
Coil
Name
Flags
Description
•Get state of relaySwitch relay ON/OFF
manually. The relay will be de-energized every measuring cycle, when alarm is off
• Get state of valve
• Switch valve ON/OFF
Note:
effect
2…8
Reserved
• Undefined
*
An energized relay/valve stays energized until the related coil is de-energized
Coils
Name
Flags
Description
Zero Adjustment of Differential
Pressure
This action takes about 15 seconds to execute. During this time, communication with the device
If in Relay Settings the flag Relay x Alarm OFF is set, it is not possible to energize the relay x
manually. The relay will be de-energized every measuring cycle, when alarm is off.
Relay *
1
If in Relay Settings one or more Relay Alarm Bits are set, it is not possible to energize the relay
Valve *
2
A Valve is only included in PF5 devices. In PF4 devices activating the Valve will have no
•
2.2.2 Sensor Actions
Direct sensor actions.
Attention!
Be careful to use these commands, due to any possible miss adjustments.
Modbus command Write Multiple Coils (0x0F) is not supported.
9
10
11
12
13 Acquire Humidity Data *
14 Delete Acquired Humidity Data
15 Adjust Acquired Humidity Data !
Acquire Differential Pressure
Data
Adjust Acquired Differential
Pressure Data
• Zero adjust of the differential pressure sensor
*
• Deletes all previously acquired values
!
corresponding lookup table (Customer Lookup
PF4/5 – Bedienungsanleitung
not possible
• The previously set reference temperature (see
temperature sensor
Only available for devices including HC2A or
Pt100 Probe
Before acquiring data, a reference value must be set (see Reference Value Settings)
temperature adjustment)
!
The device must be restarted to take over the new data (see Device Actions)
Current values in 32-bit IEEE754 float format of all PF4/5 sensors.
Note!
These values are changing every measurement cycle, so always read the two corresponding
registers in one Modbus command.
Humidity
Temperature
Differential Pressure
Calculation
Analog Input
Flow
Volume Flow
Ambient Pressure
Internal
Temperature
31’019 …
31’999
Reserved
2.4.3 Current Values: Integer Values
Current values in 16-bit integer format of all PF4/5 sensors, updated every measurement cycle.
The current values are the result of the reduction to 16-bit values of the multiplication of the current 32-bit
IEEE754 float values (see Current Values: Float Values) and the corresponding scaling values (see
Value Scaling).
Integer
PF4/5 – Bedienungsanleitung
32’009
Internal Temperature
*
• Current internal temperature value
• Undefined
• Gives back Modbus Exception Code 02
These are 32-bit values, separated in two succeeding registers (16-bits). How to bring together part 1
Device Specific Settings and Selectable Swap Modes for Rotronic Devices)
t
Represents the Unix Time (UTC) since 1.1.1970 in seconds
“
Character values separated in succeeding registers. 2 characters per register
These are float-values (32-bit IEEE754), separated in two succeeding registers (16-bits).
Devices)
The showed values depend also of the selected unit (see Value Unit)
Transmit
01 04 79 18 00 06 e9 53
Receive
01 04 0c 41 f3 70 a3 41 ba 00 00 3d 80 e9 a2
97 8a
Transmit
MBAP 01 04 79 18 00 06
Receive
MBAP 01 04 0c 41 f3 70 a3 41 ba 00 00 3d 80
e9 a2 Field
and part 2 of the 32-bit value, depends on the Swap Mode of the Modbus communication (see
How to bring together part 1 and part 2 of the 32-bit float-value, depends on the Swap Mode of the
Modbus communication (see Device Specific Settings and
Selectable Swap Modes for Rotronic
2.4.5 Example: Read Input Register
2.4.5.1 Read Current Values: Float Value (Registers 31'001 to 31'006)
Via the Modbus Holding Registers you can read and write device specific data to the PF4/5.
Assisted Modbus commands are Read Holding Registers (0x03), Write Single Register (0x06) and Write Multiple Registers (0x10).
Attention!
Changes to register content in the PF4/5 can change the functionality of the PF4/5. This may
cause the PF4/5 to become inoperable.
Changes of register contents should only be made with the necessary knowledge of the
Modbus protocol.
Notes!
Most of the Specific Holding Registers cannot be validated, if Modbus command Write Multiple Register is used.
Changing values in the Holding Registers needs normally a restart of the device (see Device
Actions).
Changing values in the Holding Registers will always change the FDA settings of the internal
device data except, changing the reference value registers of the Reference Value Settings.
2.5.1 Value Type
Selection of the possible calculation and analog input modes.
Fixed values are used to simulate a measuring value for testing purposes. To activate Fix Values, you have to
set the corresponding Fix Value Bits to ON.
Note!
The selected fixed values should be in valid ranges. Valid ranges depends on selected
measuring value and selected unit.
The Scale Low value will be projected to Range Low value and the Scale High value to Range High value of the
selected Output Range (0…1V, 0…5V, 0…10V, 0…20mA, 4…20mA).
It applies: Scale High must be greater than Scale Low
Scale Low and Scale High should not exceed the range of ±100'000'000.0
Example:
Calculation of the resulting value (Output Value):
For most sensors, it is possible to set alarm values for a Low and High level with Hysteresis and pre-alarms
values to Low and High level.
Values of the selected sensor, which are located below the low alarm or above the high alarm (or pre-alarm),
trigger an alarm (or pre-alarm). The value specified for the alarm function Hysteresis is used for both the Low
and the High alarm. Hysteresis is not used for pre-alarm.
To activate the alarm, you have to set the corresponding Alarm Bit to ON.
Note!
Be sure to select alarm values inside the operating range of the sensors. Valid ranges depends
on selected measuring value and selected unit.
In order to make use of the PF4/5 relay output, you must first enable the Alarm Bits and set the
corresponding Alarm Levels (low and high) for each sensor that you want to monitor (see
Alarm Settings).
Be aware that more than one Alarm Source can activate the relay
0
44’801
44’802
44’803
44’804
44’805
44’806
44’807
Alarm Level Differential
Pressure
Alarm Level Humidity
Use only if HC2A is used
Alarm Level Temperature
Use only if HC2A or Pt100 is
used
Alarm Level Calculation
Use only if HC2A is used
Alarm Level Analog Input
Alarm Level Flow
Use only if Flow is activated
Alarm Level Volume Flow
Use only if Flow is activated
1
2
-
-
-
-
-
-
44’808
Alarm Off
No.
0
1
until it will be de-energized
as soon as the alarm
2
PF4/5 – Bedienungsanleitung
duration (Timeout) even if the
alarm condition has ended
Off after alarm ends or after
Timeout
44’809
On Delay
!
•On delay time for relay (0 … 65536 [s])
If alarm condition occurs, the relay will be energized after specified OnDelay
time
• Maximal alarm time for relay (0 …
65536 [s])
Time in seconds between the occurrence of the trigger criterion and the de-
chosen
• If ON: It’s possible to mute the alarm
for Mute Time
44’812
Mute Time
!
• Mute time (0 … 65536 [s])
Time in seconds the relay will be muted before the alarm went on again (if
How to bring together part 1 and part 2 of the 32-bit float-value, depends on the Swap Mode of the
Modbus communication (see Device Specific Settings and
It is not possible to verify the value, written to this register.
Most of the Specific Holding Registers cannot be validated, if Modbus command Write Multiple
and part 2 of the 32-bit value, depends on the Swap Mode of the Modbus communication (see
Selectable Swap Modes for Rotronic
Color Bits:
E
Red Green Blue
2.5.15 Example: Read Holding Register
2.5.15.1 Read Display Settings (Registers 44'602 to 44'605)
2.5.16.1 Write Display Settings (Registers 44'602 to 44'605)
RTU Example:
TCP Example:
RTU number 1 0x01
Byte count 1 0x08
Register value
(see Display
2 * N
Settings)
Note!
After writing a Write Multiple Register command, it needs a restart of the device to activate the
selected changes (see Device Actions or Reset Device).
For detailed information about Modbus protocol Write Multiple Register, see:
(http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf