Hi,
I am using LV8.0 to communicate with my microcontroller that is used to collect the data from 3 channels of a 12bit ADC. So basically, I have 6 bytes (2 bytes for each ADC channel) each time to send to the PC via the serial port. What I want is to recieve the data and dislay them continously in the correct order (first byte, second byte, ...).
However, right now I am facing with the order of bytes each time I stop & start again the VI. Sometimes, the second byte comes first and the other time the sixth byte come first.
Here is my example:
I send 6 bytes: 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA
What I recieve: 0xFD, 0xFC, 0xFB, 0xFA, 0xFF, 0xFE or 0xFB, 0xFA, 0xFF, 0xFE, 0xFD, 0xFC or 0xFA, 0xFF, 0xFE, 0xFD, 0xFC, 0xFB... it's random...
As I guess, there is some problem with the buffer and what I need to do
is to packet my data with a header and teminator so that the VI can
recognize what are the start and stop of the packet. Is this correct? If not, could you please correct me and advise me what I should do?
Anyone has a code and ever face with the same problem?
Thanks,
Anh
Message Edited by anhdtvt on 12-13-2006 01:42 PM