UMB communication
Snow depth sensor SHM 31, V2.1 39
Table 15: Measuring channels starting from 5000
9.3. Communication in binary protocol
In this case, communication with the snow depth sensor takes place using the RS485 connection
e.g. with UMB ConfigTool.NET. Please refer to the UMB protocol manual, if desired, for a general
description of communication in the UMB binary protocol over the RS485 interface. The
description of the UMB protocol can be downloaded from the Lufft website at www.lufft.com.
9.3.1. Data frame
The data frame is constructed as follows:
11 ... (8 + len)
optional
Control character for the start of a frame (01h); 1 byte
Header version number, e.g.: V 1.0 <ver> = 10h = 16d; 1 byte
Receiver address; 2 bytes
Number of data bytes between STX and ETX; 1 byte
Control character for the start of payload transmission (02h); 1 byte
Version number of the command; 1 byte
Data bytes; 0 – 210 bytes
Control character for the end of payload transmission (03h); 1 byte
Check sum, 16 bit CRC; 2 bytes
Control character for the end of the frame (04h); 1 byte
Control characters: SOH (01h), STX (02h), ETX (03h), EOT (04h).
9.3.2. Addressing with class ID and device ID
Addressing is performed using a 16-bit address. This is split into a class ID and a device ID.
Address (2 bytes = 16 bit)
Bits 15 – 12 (upper 4 bits)
Bits 11 – 8
(middle 4 bits)
Bits 7 – 0 (lower 8 bits)
SHM31 Snow Depth Sensor
Master or control devices
ID = 0 is provided as broadcast for classes and devices. Thus, it is possible to transmit a broadcast
on a specific class. However this only makes sense if there is only one device of this class on the
bus; or in the case of a command, e.g. reset.
9.3.3. Example of creating addresses.
If an SHM 31 sensor is to be addressed with the device ID 001, this is done as follows:
The class ID is: 11d = Bh; the device ID is: 001d = 001h
Combining the class ID and the device ID creates the address B001h (45057d).
9.3.4. Example of a binary protocol query
If, for example, a sensor with the device ID 001 is polled from a PC for the current snow depth,
this takes place as follows: