![Lufft VS20k-UMB Скачать руководство пользователя страница 12](http://html1.mh-extra.com/html/lufft/vs20k-umb/vs20k-umb_user-manual_1947026012.webp)
User Manual VS2k-UMB / VS20k-UMB
V 2.3 / 28.01.2020
12
Chapter 10 Communication
The answer of 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
16h F0h
01h 30h
0Ah
02h
23h
10h
00h
59h 02h
16h
<value>
ETX
<cs>
EOT
15
16
17
18
19
20
21
22
00h
00h
FAh
44h
03h
5Eh
11h
04h
<status>
= Device o.k.
<typ>
= Data type of the following value; 16h = Float (4 Byte, IEEE Format)
<value>
= 44FA0000h corresponds to the float value 2000.00
The visibility is therefore 2000m.
The Checksumme (115Eh) will help to check if the data transmission was correct.
WARNING:
Little endian (Intel, lowbyte first) applies when transmitting word and float
variables, of addresses or CRC for example. This means first the LowByte and then the
HighByte.
10.1.5 CRC Calculation
CRC is calculated according to the following rules:
Norm:
CRC-CCITT
Polynomial:
1021h = x
16
+ x
12
+ x
5
+ 1 (LSB first mode)
Start value:
FFFFh
(Warning! In contrast to earlier Lufft protocols, in this case the start value for CRC calculations is not 0h but
FFFFh according to CCITT!!)
Further information can be found in the description of a CRC in the UMB Protocol V1_0.
10.2 ASCII Protocol
The ASCII protocoll allows to communicate easily with the devices.
The ASCII protocol serves exclusively for online data requests and is not protected by a
CRC. The device does not respond to unintelligible ASCII commands!
10.2.1 Composition
An ASCII command is introduced wi
th the character ‘&’ and ended with the character CR
(0Dh). There is an empty character (20h) between the individual blocks; displayed with an
underscore ‘_’. Characters which represent an ASCII value are in simple inverted commas.
10.2.2 Example of an ASCII request
If for example a visibility sensor with the device ID (serial number) 0001 is to be polled from a
PC according to the current visibility (0
– 2000 m), this takes place as follows:
A measurement value from a specific channel is polled with the command “M”.
Request:
‘&’_<ID>
5
_‚M’_<channel>
5
CR