![Cyndar Electronic Technology XD-TOF-25 Скачать руководство пользователя страница 23](http://html1.mh-extra.com/html/cyndar-electronic-technology/xd-tof-25/xd-tof-25_operating-instructions-manual_2704637023.webp)
Sensing the world
·
Leading the change
22
2
32
<ETX>
03
byte[] status ={ 0x02, 0x73, 0x52, 0x4E, 0x20, 0x4C, 0x43, 0x4D, 0x73, 0x74, 0x61, 0x74, 0x65,
0x03 }; //
Ask device status
clientStream.Write(status, 0, status.Length)
;
//Send login instruction to radar
if (clientStream.CanRead)
{
byte[] stateanswer = new byte[1024]; //Open up cache
StringBuilder myCompleteMessage = new StringBuilder(); //
Receive result variable
int numberOfBytesRead = 0;
do
{
numberofBytesRead = clientStream.Read(stateanswer, 0, stateanswer.Length);
//
Read TCPIP communication receive buffer
myCompleteMessage.AppendFormat("{0}",Encoding.ASCII.GetString(stateanswer, 0,
numberOfBytesRead));
//
Write all the information stack read by the network port to the receiving result variable
}
while (clientStream.Data
Av
ailable); //
If the data does not arrive, the loop is received
//
string result = myCompleteMessage.ToString();
string[] split = result.Split(new char[] { ' ' });//
lidarstatestr= split[3] // The first byte in lidarstatestr is the radar state
STEP9
:Set scan parameters
<STX>sMN{SPC}mLMPsetscancfg{SPC}
5DC{SPC}1{SPC}D05{SPC}FFF92230{SPC}225510<ETX>
<STX>sMN{SPC}mLMPsetscancfg{SPC}5DC{SPC}1{SPC}7D0{SPC}FF
F92230{SPC}225510<ETX>
02
73 4D 4E
20
6D 4C 4D 50 73 65 74 73 63 61 6E 63 66
67
20
35 44 43
20
31
20
44 30 35
20
46 46 46 39 32 32
33 30
20
32 32 35 35 31 30
03
Footer
(error)
(Routine 5) Read device status
You can continue to operate the acceptance information in myCompleteMessage to determine
further operations. The following continues to extract key instruction information, which
may contain ETX, STX, you need to further elaborate processing
Divide the received character string into N character string arrays with spaces.
XD-TOF series completes the setting of radar sweep parameters through commands:
Command
(15Hz/0.33°)
Command
(15Hz/0.2°)
Actual sending
command
15Hz/0.33°
(Hex)