![Cyndar Electronic Technology XD-TOF-25 Скачать руководство пользователя страница 29](http://html1.mh-extra.com/html/cyndar-electronic-technology/xd-tof-25/xd-tof-25_operating-instructions-manual_2704637029.webp)
Sensing the world
·
Leading the change
28
byte[]outputRangeanwser = new byte[1024]; //Open up cache
StringBuilder myCompleteMessage = new StringBuilder(); //
Receive result variable
int numberOfBytesRead = 0;
do
{
numberofBytesRead = clientStream.Read(outputRangeanwser, 0, outputRangeanwser.Length);
//
Read TCPIP communication receive buffer
myCompleteMessage.AppendFormat("{0}",Encoding.ASCII.GetString(outputRangeanwser, 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
//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
string result = myCompleteMessage.ToString();
string[] split = result.Split(new char[] { ' ' });//
Split the received string into N string arrays with spaces
STEP12
:Reading scan angle output range
You can use this command to read the current radar scan angle output range:
ASCII
<STX>sRN{SPC}LMPoutputRange<ETX>
Hex
02 73 52 4E 20 4C 4D 50 6F 75 74 70 75 74 52 61 6E 67 65 03
The specific reply is:
<STX>sRA{SPC}LMP output Range{SPC}1{SPC}5DC{SPC}0{SPC}DBBA0<ETX>
02
73 52 41
20
4C 4D 50 6F 75 74 70 75 74 52 61 6E 67 65
20
31
20
35 44 43
20
30
20
44 42 42 41 30
03
<STX>
02
sRA
73 52 41
20
LMPoutput Range
4C 4D 50 6F 75 74 70 75 74 52 61 6E
67 65
20
31
20
1500
(
50Hz
)
35 44 43
(The output angle range is set to 0 degrees to 90 degrees)
Instruction
Actually send
instructions
Data content
Data content
Speed
configuration
Space
(
SPC
)
Space
(
SPC
)
Space
(
SPC
)
1 (configurable area)