Home > Back-end >  MSComm control problem
MSComm control problem

Time:10-23

Accept 12 data in a binary way, MSComm is how to accept, such as to accept a set of data from 000100010001001001001, 0010010010, how in the MSComm oncomm event handling to the three point out

CodePudding user response:

A serial port can receive 8 bits of data,
12 of the data, should be separate to send, can high before, and low in the 0000, 0001 and 00010001,

CodePudding user response:

reference 1st floor xjq2003 response:
serial port can receive 8 bits of data,
12 of the data, should be separate to send, can high before, and low in the 0000, 0001 and 00010001,

Well, with two bytes to accept it, how can we put them together, accept can you give examples, for example, I only know that now in the oncomm
These, OleVariant s;
Char STR.
Int t=0;
S=MSComm1 - & gt; The Input;
Lenth=s.A rrayHighBound (1);
BYTE BYTE [2048].
for(int i=0; i{STR=s.G etElement (I);
Byte [I]=STR;
Series1 - & gt; AddXY (t, byte [I]);
T++;
If (t> 1000)
Series1 - & gt; The Clear ();
} can you help me see I don't what's the problem with this code, because now I don't the serial communication cable, I just have so a train of thought, there are many don't understand
  • Related