HygroSmart HS3 User’s Manual
Michell Instruments
29
APPENDIX B
B.2 Code
examples
This example shows the raw bytes to send to the probe to request relative humidity and temperature.
In this example there is one probe in the loop on address 1.
Request Relative Humidity:
Address
Function
code
Start
address Hi
Start
address Lo
Length
Hi
Length
Lo
CRC 16
Lo
CRC 16
Hi
X01
X03
X00
X01
X00
X01
X25
XCA
Reply HS3 Probe:
Address
Function code Byte count Data0 Hi
Data0 Lo
CRC Lo
CRC Hi
X01
X03
X02
X01
xC5
X79
X87
Request temperature:
Address Function
code
Start
addrss Hi
Start
address Lo
Length
Hi
Length
Lo
CRC 16
Lo
CRC 16
Hi
X01
X03
X00
X01
X00
X01
xD5
X15
Reply HS3 Probe:
Address
Function code Byte count Data0 Hi
Data0 Lo
CRC Lo
CRC Hi
X01
X03
X02
X00
xEA
x39
xCB
Useful resources:
www.simplymodbus.ca/FAQ.htm
- excellent and easy to understand resource explaining the Modbus
protocol
www.scadacore.com/
fi
eld-applications/programming-calculators/online-hex-converter/
- convert
raw data into various data-types, useful for troubleshooting Modbus connections
www.baseblock.com/PRODUCTS/comtestpro.htm
- free Modbus master-client for PC