RS485 with MODBUS-RTU Protocol
Serial interface
The following parameters are possible for data transfer via the EIA-485 interface on the ModBus sensors made by
Mela
®
:
•
Baud rate:
19200 / 9600 / 4800 / 2400 / 1200 / 600
•
Data bits:
8
•
Parity:
N / E / O
•
Stop bits:
1 / 2
Modus 19200@8N2 is pre-defined.
Access to Modbus registers
To ensure compatibility with all Modbus masters, all available registers can be read both with function code 03
hex
(read
holding register), as well as with function code 04
hex
. Registers with additional write permission can be modified with
function code 06
hex
(write holding register). All registers available with Modbus sensors by Mela are listed in table 1.
Register-no.
Data type
Value
Permission
0
FLOAT32
Temperature (°C)
readable
1
2
UINT16
Alarm code temperature
3
FLOAT32
Relative humidity (%rH)
4
5
UINT16
Alarm code humidity
6
UINT32
Serial number sensor
7
8
UINT32
Serial number sensor
9
10
FLOAT32
Dew point temperature (°C)
11
12
FLOAT32
Enthalpy (kJ/kg)
13
14
FLOAT32
Mixing ratio (g/kg)
15
16
FLOAT32
Absolute humidity (g/m³)
17
18
FLOAT32
Wet-bulb temperature (°C)
19
20
UINT16
Alarm code hx processor
205
UINT16
Modbus address
read and writeable
Functioning
The measured values for relative humidity, temperature and the corresponding alarm codes are saved in registers
0…5 in a cycle time of 2s. Registers 6(8) and 7(9) contain the sensor‘s serial number. If an hx value is scanned from
registers 10…19, this is recalculated at the time of the scan, based on the current temperature and the relative humi-
dity. The hx processor emits an alarm code if the values for temperature or relative humidity are outside the permis-
sible input range. No calculation is made in this case, and the register displays the last valid value for each variable.
The memory organisation for the temperature and air humidity readings, as well as for the serial number, is Little
Endian. This means that the low byte word is in the lower register and the high byte word is in the higher register.
Table 1 - Modbus register