RF602 [Revision 1.2.0] 28.01.2019
Laser Triangulation Sensors. RF602 Series
13
11.7.2. Answer
'Answer' is the data burst that can be transmitted by ‘slave’ in the course of the
session.
All messages with a message burst contain 1 in the most significant digit.
Data in a
message are transferred in tetrads
. When byte is transmitted, lower tetrad goes first, and
then follows higher tetrad. When multi-byte values are transferred, the transmission begins
with lower byte.
When ‘answer’ is transmitted, the message contains:
·
SB-bit, characterizes the updating of the result. If SB is equal to "1", this means
that the sensor has updated the measurement result in the buffer, if SB is equal to
"0" - then non-updated result has been transmitted (see Note 1, p.
). SB=0
when parameters transmit;
·
two additional bits of cyclic binary batch counter (CNT). Bit values in the batch
counter are identical for all sendings of one batch. The value of batch counter is
incremented by the sending of each burst and is used for formation (assembly) of
batches or bursts as well as for control of batch losses in receiving data streams.
The following is the format of the ‘answer’ data burst for the message transmission
(MSG):
Byte
Bits
Description
7
6
5
4
3
2
1
0
0
1
SB
CNT
MSG[0] lo
lower tetrad of the 0th byte
1
1
SB
CNT
MSG[0] hi
higher tetrad of the 0th byte
2
1
SB
CNT
MSG[1] lo
lower tetrad of the 1st byte
3
1
SB
CNT
MSG[1] hi
higher tetrad of the 1st byte
...
...
...
...
...
...
11.7.3. Data stream
‘Data stream’ is an infinite sequence of data bursts or batches transmitted from
‘slave’ to ‘master’, which can be interrupted by a new request. In transmission of ‘data
stream’ one of the ‘slaves’ fully holds a data transfer channel, therefore, when ‘master’
produces any new request sent to any address, data streaming process is stopped. Also,
there is a special request to stop data streaming.
11.7.4. Output rate
Output rate ("OR") depends on Baud rate of serial interface ("BR"), and is
calculated by such a manner:
OR = 1 / (44/BR+1*10-5) Hz
For example, for BR=460800 bit/s, Output rate = 9,4 kHz.
11.7.5. Request codes table
Request
code
Description
Message
(size in bytes)
Answer
(size in bytes)
01h
Device identification
—
- device type (1)
- firmware version (1)
- serial number
(2)
- base distance
(2)
- range
(2)
02h
Read a parameter
-
code of parameter
(1) - value
of parameter
(1)