,
////////////////////////////////////////
Char FS [30].
AnsiString Fa [30].
////////////////////////////////////////
FS [0]=0 x81;//beyond 128, shows 00
FS [1]=0 x01;
FS [2]=0 x11;
////////////////////////////////////////
Comm8 - & gt; CommPort=8;
Comm8 - & gt; An InputMode=comInputModeBinary;
Comm8 - & gt; Settings="9600, N, 8, 1";
Comm8 - & gt; PortOpen=true;
////////////////////////////////////////
for(int i=0; i<11. I++)
{
Fa [I]=FS [I];
Comm8 - & gt; The Output=Fa [I];
}
Comm8 - & gt; PortOpen=false;
CodePudding user response:
Use unsigned char, do not use charChar FS [30].
To:
Byte FS [30].
CodePudding user response:
Demon elder brother:Unsinged char FS [30].
AnsiString Fa [30].
FS [0]=0 x81;//beyond 128, shows 00
FS [1]=0 x01;
FS [2]=0 x11;
After change the char types to unsigned char types;
Serial assistants hexadecimal display "31 32 39 31 and 37",
Serial assistants ACSII shows "129117",
, according to data using a serial port assistant to send the past don't do other processing, just want to on the serial port assistant hexadecimal receive hexadecimal data!