Thank you! I have settled the problem.
I'd like to share my experience to all.
If you wanna send the binary data, you send directly.
Example, send ASCII "A", the binary data was 65. Then I can program
int b;
b=65;
CWSerial1->Write(b);
If you wanna send more, I use the fool method.
int b,c,d;
b=65;
c=89;
d=255;
CWSerial1->Write(b);
CWSerial1->write(c);
CWSerial1->write(255);
If you wanna receive the data as binary. We need to use two method of Variant.
Variant receive;
unsigned int buff[4];
int count;
int i;
receive=CWSerial->Read();
count=receive.arrayHighBound(1);
for(i=0;i<=count;i++)
{
buff[i]=receive.GetElement(i);
}
Then you can see the return data in buff[4] array. This is my experience, I hope I can help other people in the future.
Regards!
Terry