CHAPTER 2. USBOARD-USS5
2.6. COMMANDS
(continued from previous page)
if
(uCrc16
&
0x8000
){
uCrc16
=
(uCrc16
&
0x7fff
)
<<
1
;
uCrc16
^=
0x1021
;
}
else
{
uCrc16
<<=
1
;
}
uCrc16
^=
(
unsigned int
)(ucData[
0
])
|
((
unsigned int
)(ucData[
1
])
<<
8
);
}
return
uCrc16;
}
2.6 Commands
You can find the command set at
(page 17).
Note:
Byte 0 in this documentation refers to the first data byte after the header. Individual bytes are transferred with
the Least Significant Bit first.
In the following, the CAN IDs are given as an offset to the base address, so
+3
means base address plus 3.
2.6.1 CMD_CONNECT
Use this command to establish and check the connection to the board.
Command
ID:
+0
CMD_CONNECT
0
0
0
0
0
0
0
Answer
ID:
+1
CMD_CONNECT
1
2
3
4
5
6
7
2.6.2 CMD_SET_CHANNEL_ACTIVE
This command can be used to activate or deactivate individual sensors without transmitting the complete parameter
set. Two bytes for the channels 1 to 8 and 9 to 16 contain the information whether the sensors should be active. These
bytes are bit-coded, each bit representing the state of one sensor. Every active channel is marked with a 1.
For example,
0x1F
as the first byte means channels 1 to 5 are active and channels 6 to 8 are not active.
Command
ID:
+0
CMD_SET_CHANNEL_ACTIVE
(Sensors 1 to 8)
(Sensors 9 to 16)
0
0
0
0
0
Answer
No answer.
19