MODBUS

<< Click to Display Table of Contents >>

Navigation:  Humidity & Temperature Devices > Transmitter > HF5A >

MODBUS

The transmitter can be addressed directly using the MODBUS protocol, to request the measured humidity and temperature values. The parameters highlighted in yellow should be selected according to the table below.

 

Important:

In order to communicate directly with the digital signaling of the HygroFlex 5 Advanced you have to connect the RXTX+ , RXTX- and the S-GND.

 

 

Specification RS-485 MODBUS RTU

Default Settings

Baud rate

19'200

Parity

None

Data bits

8

Stop Bits

1

Slave ID

247 (per default)

 

 

 

Command: (MSB first)

Probe address

Command ID


Start address


Number of records

MODBUS CRC

0x00

0x04

0x00

0x00

0x00

0x00

0x0000

 

 

Probe address

0…255, if '0' then all probes respond regardless of the address.The default probe address is 247.

 

 

Device Data

Register

Protocol

Name

Description

Data type

30’001

30'000

 

Serial Number

Serial number of the device (part 1)

 

Int. 32-bit

30’002

30'001

Serial number of the device (part 2)

30’003

30'002

 

 

Vendor Name

 

 

Rotronic (Asci characters)

 

 

 

Char

30’004

30'003

30’005

30'004

30’006

30'005

30’007

30'006

 

 

Product Type

 

 

HF5A

 

 

Char

30’008

30'007

30'009

30'008

30'010

30'009

 

 

Device Status

Register

Protocol

Name

Description

Data type

30’101

30'100

Device Flags

See amp

Int. 16-bit

30’102

30'101

 

Probe Serial Number

Serial number of the device (part 1)

 

Int. 32-bit

30’103

30'102

Serial number of the device (part 2)

30’104

30'103

Probe Type


Int. 16-bit

30’105

30'104

Measurement flags Value 1


Int. 16-bit

30’106

30'105

Measurement flags Value 2


Int. 16-bit

30’107

30'106

 

Next calibration date

unix timestap (part 1)

 

Int. 32-bit

30’108

30'107

unix timestap (part 2)

 

 

 

Current Values SI

Current values in 32-bit IEEE754 float format.

Note!

These values are changing every measurement cycle, so always read the two corresponding registers in one Modbus command.

 

 

Register

Protocol

Name

Description

Data type

31’001

31'000

 

Relative Humidity %rH

Current humidity value (part 1)

 

Float 32-bit

31’002

31'001

Current humidity value (part 2)

31’003

31'002

 

Temperature °C

Current temperature value (part 1)

 

Float 32-bit

31’004

31'003

Current temperature value (part 2)

31’005

31'004

 

Dew Point Temperature

 

Current calculation value (part 1)

 

Float 32-bit

31’006

31'005

Current calculation value (part 2)

31'007

31'006

 

Frost Point Temperature

Current calculation value (part 1)

 

Float 32-bit

31'008

31'007

Current calculation value (part 2)

31'009

31'008

 

Wet-Bulb Temperature

Current calculation value (part 1)

 

Float 32-bit

31'010

31'009

Current calculation value (part 2)

31'011

31'010

 

Enthalpy

Current calculation value (part 1)

 

Float 32-bit

31'012

31'011

Current calculation value (part 2)

31'013

31'012

 

Psychometric Difference

Current calculation value (part 1)

 

Float 32-bit

31'014

31'013

Current calculation value (part 2)

31'015

31'014

 

Vapour Concentration

Current calculation value (part 1)

 

Float 32-bit

31'016

31'015

Current calculation value (part 2)

31'017

31'016

Saturation Vapour Concentration

Current calculation value (part 1)

 

Float 32-bit

31'018

31'017

Current calculation value (part 2)

31'019

31'018

 

Specific Humidity

Current calculation value (part 1)

 

Float 32-bit

31'020

31'019

Current calculation value (part 2)

31'021

31'020

 

Mixing Ratio

Current calculation value (part 1)

 

Float 32-bit

31'022

31'021

Current calculation value (part 2)

31'023

31'022

 

Vapour Partial Pressure

Current calculation value (part 1)

 

Float 32-bit

31'024

31'023

Current calculation value (part 2)

31'025

31'024

 

Vapour Saturation Pressure

Current calculation value (part 1)

 

Float 32-bit

31'026

31'025

Current calculation value (part 2)

31'027

31'026

 

Volume Mixing Ratio

Current calculation value (part 1)

 

Float 32-bit

31'028

31'027

Current calculation value (part 2)

31'029

31'028

 

CO2 ppm

Current calculation value (part 1)

 

Float 32-bit

31'030

31'029

Current calculation value (part 2)

31'031

31'030

 

Differential Pressure

Current calculation value (part 1)

 

Float 32-bit

31'032

31'031

Current calculation value (part 2)

 

 

 

Current Values Imperial

Current values in 32-bit IEEE754 float format.

Note!

These values are changing every measurement cycle, so always read the two corresponding registers in one Modbus command.

 

Register

Protocol

Name

Description

Data type

31’101

31'100

 

Relative Humidity %rH

Current humidity value (part 1)

 

Float 32-bit

31’102

31’101

Current humidity value (part 2)

31’103

31’102

 

Temperature °F

Current temperature value (part 1)

 

Float 32-bit

31’104

31’103

Current temperature value (part 2)

31’105

31’104

 

Dew Point Temperature

 

Current calculation value (part 1)

 

Float 32-bit

31’106

31’105

Current calculation value (part 2)

31'107

31’106

 

Frost Point Temperature

Current calculation value (part 1)

 

Float 32-bit

31'108

31'107

Current calculation value (part 2)

31'109

31'108

 

Wet-Bulb Temperature

Current calculation value (part 1)

 

Float 32-bit

31'110

31'109

Current calculation value (part 2)

31'111

31'110

 

Enthalpy

Current calculation value (part 1)

 

Float 32-bit

31'112

31'111

Current calculation value (part 2)

31'113

31'112

 

Psychometric Difference

Current calculation value (part 1)

 

Float 32-bit

31114

31'113

Current calculation value (part 2)

31'115

31114

 

Vapour Concentration

Current calculation value (part 1)

 

Float 32-bit

31'116

31'115

Current calculation value (part 2)

31'117

31'116

Saturation Vapour Concentration

Current calculation value (part 1)

 

Float 32-bit

31'118

31'117

Current calculation value (part 2)

31'119

31'118

 

Specific Humidity

Current calculation value (part 1)

 

Float 32-bit

31'120

31'119

Current calculation value (part 2)

31'121

31'120

 

Mixing Ratio

Current calculation value (part 1)

 

Float 32-bit

31'122

31'121

Current calculation value (part 2)

31'123

31'122

 

Vapour Partial Pressure

Current calculation value (part 1)

 

Float 32-bit

31'124

31'123

Current calculation value (part 2)

31'125

31'124

 

Vapour Saturation Pressure

Current calculation value (part 1)

 

Float 32-bit

31'126

31'125

Current calculation value (part 2)

31'127

31'126

 

Volume Mixing Ratio

Current calculation value (part 1)

 

Float 32-bit

31'128

31'127

Current calculation value (part 2)

31'129

31'128

 

CO2 ppm

Current calculation value (part 1)

 

Float 32-bit

31'130

31'129

Current calculation value (part 2)

31'131

31'130

 

Differential Pressure

Current calculation value (part 1)

 

Float 32-bit

31'132

31'131

Current calculation value (part 2)

 

 

Example: Read Current Float Value (Registers 31'001 to 31'003)

 

Example:

 

Transmit

01 04 79 18 00 08 68 92

Receive

01 04 08 e6 3a 33 42 bb 93 bf 41 29 69

 

Field

Bytes

Value

Description

Checksum

2

CRC

CRC Checksum





RTU number

1

0x01

Modbus RTU Address

Function code

1

0x04

Read Discret Inputs

Starting address

2

0x7918

= 31'000 ( Attention! register number – 1 )

Quantity of input registers

2

0x0008

= 8, means read 8 registers


Byte count

1

0x08

= 8 = 2 * N, means numbers of returned bytes

Input registers

 

2 * N

0x4233ae6

= 44.81 %rh Humidity

0x41bf93bb

= 23.95 °C Temperature

 

For detailed information about Modbus protocol Read Discrete Inputs see:

(http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf).

 

Device Specific holding Registers

Via the Modbus Holding Registers you can read and write device specific data of the HF5A-Digital.

 

Assisted Modbus commands are Read Holding Registers (0x03), Write Single Register (0x06)

Function 03/06 – Read/Write Single register

 

Register

Protocol

Name

Description

Data type

40'001

40'000

Device adress

Device address (Default 0x00F7)

 

Int. 16-bit

40'002

40'001

Byte Order

Swap modes / Byte Order (Default 0x0000 - No swap)

 

 

 

Read Modbus Address (Registers 40'001)

 

Example:

Note: the device answers to address 0. This can be used to get the current device address

Transmit

00 03 9c 40 00 01 aa 5f

Receive

01 03 02 00 01 79 84

 

Field

Bytes

Value

Description

Checksum

2

CRC

CRC Checksum





RTU number

1

0x01

Modbus RTU Address

Function code

1

0x03

Read Holding Register

Starting address

2

0x9c40

= 40001 ( Attention! register number – 1 )

Quantity of Holding registers

2

0x0001

= 1, means read 1 register


Byte count

1

0x02

= 2   2 * N, means numbers of returned bytes

Holding register

 

N

0x0001

= 1, current address

 

 

Write Modbus Adress (Registers 40'0001)

 

Example:

Note: The device answers with the current Modbus RTU Address, afterward's the address is changed.

 

Transmit

F7 06 9C 40 00 01 73 18

Receive

F7 06 9C 40 00 01 73 18

 

 

Field

Bytes

Value

Description

Checksum

2

CRC

CRC Checksum





RTU number

1

0x01

Modbus RTU Address

Function code

1

0x03

Read Holding Register

Starting address

2

0x9c40

= 40001 ( Attention! register number – 1 )

Value

2

0x0001

= 1, new Modbus address

 

 

Byte Order / Swap modes

 

Selectable Swap Modes for Rotronic Devices

Selectable swap modes only for 32-bit Float and 32-bit Integer values based on Little Endian memory organisation.

 

Value

Swap Mode

Source Bytes

Target Bytes

0x0000

Big endian - No Swap

[ a b ] [ c d ]

[ a b c d ]

0x0001

Little endian - byte and word swap

[ a b ] [ c d ]

[ d c b a ]

0x0002

Mid-big endian - byte swap

[ a b ] [ c d ]

[ b a d c ]

0x0003

Mid-little endian - word swap

[ a b ] [ c d ]

[ c d a b ]

 

Read Swap mode (Registers 40'001)

Example:

Transmit

01 03 9c 41 00 01 fa 4e

Receive

01 03 02 00 02 39 85

 

Field

Bytes

Value

Description

Checksum

2

CRC

CRC Checksum





RTU number

1

0x01

Modbus RTU Address

Function code

1

0x03

Read Holding Register

Starting address

2

0x9c41

= 40002 ( Attention! register number – 1 )

Quantity of Holding registers

2

0x0001

= 1, means read 1 register


Byte count

1

0x02

= 2 = 2 * N, means numbers of returned bytes

Holding register

 

N

0x0002

= 2, Mid-big endian - byte swap

 

 

Example:

Set Swap Mode “Mid-big endian - byte swap”

Transmit

01 06 9c 41 00 02 76 4f

Receive

01 06 9c 41 00 02 76 4f

 

Field

Bytes

Value

Description

Checksum

2

CRC

CRC Checksum





RTU number

1

0x01

Modbus RTU Address

Function code

1

0x06

Write Holding Register

Starting address

2

0x9c41

= 40002 ( Attention! register number – 1 )

Value

2

0x0002

= 2, Mid-big endian - byte swap


 

 

Data format

Serial number (unsigned int): 0…232-1

Humidity (unsigned int): 0…10000 corresponding to 0.00…100.00 %rh

Temperature (signed int): -4000…+8500 corresponding to -40.00…+85.00 °C

 

 

Response in the event of an error

Probe address


Error code

MODBUS CRC

0x00

0x84

0x00

0x0000

 

Error codes


0x02

Start address and number of records invalid

0x03

Number of records invalid