
Operating Manual
Smart Weather Sensor
70
G. Lufft Mess- und Regeltechnik GmbH, Fellbach, Germany
19.3.3 Examples for Creating Addresses
If, for example, you want to address WS400-UMB with the device ID 001, this takes place as
follows:
The class ID for the Smart Weather Sensor is 7d = 7h;
the device ID is e.g. 001d = 001h
Putting the class and device IDs together gives the address 7001h (28673d).
19.3.4 Example of a Binary Protocol Request
If, for example, a Smart Weather Sensor with the device ID 001 is to be polled from a PC for
the current temperature, this takes place as follows:
Sensor:
The class ID for the Smart Weather Sensors 7 = 7h;
The device ID is 001 = 001h
Putting the class and device IDs together gives a target address of 7001h.
PC:
The class ID for the PC (master unit) is 15 = Fh;
the PC ID is e.g. 001d = 01h.
Putting the class and device IDs together gives a sender address of F001h.
The length <len> for the online data request command is 4d = 04h;
The command for the online data request is 23h;
The version number of the command is 1.0 = 10h.
The channel number is in <payload>; as can be seen from the channel list (page 66), the
current temperature in °C in the channel is 100d = 0064h.
The calculated CRC is D961h.
The request to the device:
SOH <ver>
<to>
<from>
<len> STX <cmd> <verc> <channel> ETX
<cs>
EOT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
01h
10h
01h 70h 01h F0h 04h
02h
23h
10h
64h 00h 03h 61h D9h 04h
The response from the device:
SOH <ver>
<to>
<from>
<len> STX <cmd> <verc> <status> <channel> <typ>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
01h
10h
01h F0h 01h 70h 0Ah
02h
23h
10h
00h
64h 00h
16h
<value>
ETX
<cs>
EOT
15
16
17
18
19
20
21
22
00h 00h B4h 41h 03h C6h 22h 04h
Interpretation of the response:
<status>
= 00h device o.k. (
≠ 00h signifies error code; see page 71)
<typ>
= Data type of the following value; 16h = float (4 bytes, IEEE format)
<value>
= 41B40000h as a float value corresponds to 22.5
The temperature is therefore 22.5°C.
The correct data transmission can be checked with the aid of the check sum (22C6h).
Note:
Little Endian (Intel, low byte first) applies when transmitting word and float variables of
addresses or the CRC, for example. This means first the LowByte and then the HighByte.