Operating Manual V8.2/03.2017
Non Invasive Road Sensor
44
G. Lufft Mess- und Regeltechnik GmbH, Fellbach, Germany
19.4 Communication in ASCII Protocol
Text-based communication with devices is possible using ASCII protocol.
To do this, in the device configuration, interface settings, the protocol mode must be set to
ASCII (see page27).
ASCII protocol is network-compatible and serves exclusively for online data requests. The
device will not respond to incomprehensible ASCII commands.
Note:
The use of binary protocol is recommended for lengthy transmission routes (e.g.
network, GPRS/UMTS), as ASCII protocol is unable to detect transmission errors (not CRC-
secured).
Note:
TLS channels are not available in ASCII protocol.
19.4.1 Structure
An ASCII co
mmand is introduced by the ‘&’ character and completed by the CR (0Dh) sign.
There is a space character (20h) between the individual blocks in each case; this is
represented by an underscore character ‘_’. Characters that represent an ASCII value are in
ordinary inverted commas.
19.4.2 Summary of ASCII Commands
Command Function
BC
AZ
M
Online data request
l
X
Switches to binary protocol
k
R
Triggers software reset
k
D
Software reset with delay
k
I
Device information
k
These operating instructions describe the online data request only. You can find the
description of the other commands in the UMB protocol.
19.4.3 Online Data Request (M)
Description:
By way of this command, a measurement value is requested from a specific
channel.
Request:
‘&’_<ID>
5
_‘M’_<channel>
5
CR
Response:
‘$’_<ID>
5
_‘M’_<channel>
5
_<value>
5
CR
<ID>
5
Device address (5 decimal places with leading zeros)
<channel>
5
Indicates the channel number (5 decimal places with leading zeros)
<value>
5
Measurement value (5 decimal places with leading zeros); a measurement
value standardized to 0
– 65520d. Various error codes are defined from 65521d – 65535d.
Example:
Request:
&_20481_M_00100
By way of this request, channel 100 of the device with address 20481 (NIRS31-UMB with
device ID 001) is requested.
Response:
$_20481_M_00100_34785
This channel outputs a temperature from
–40 to +70°C; this results in the following
calculation:
0d
corresponds to -40°C
65520d
corresponds to +70°C
34785d
corresponds to [+70°C
– (-40°C)] / 65520 * 34785 +(-40°C) = 18.4°C
Note:
TLS channels are not available in ASCII protocol.