07-24-2012 05:48 PM
I implemented on a microcontroller (PIC16F877) a program which send BCD codes (8 bits each transmission) via USB. Due to synchronization issues, the data are sent continuously. I can receive the data on labview. However, I must not read the data all the time and therefore the data read aren't on the right order. I added a start frame to my data and I would like to know how I can move my bytes to organize them on the right order (Frame/Data1/Data2/..)? (Maybe using a loop with a comparison)
Then how can I select only some bits? Do I have to reset the other bits?
I hope I was clear enough. I'm quite a beginner with labview (started a few weeks ago)
Solved! Go to Solution.
07-24-2012 05:55 PM
Might need some sort of start/stop bit pattern to key off of. Assuming no data loss, once you find the "start" of the byte pattern you can bring in some fixed number of bytes per read operation and build an array from that to parse out.
07-24-2012 06:38 PM
Yes I am using a frame (special byte). I am changing the string into a bytes array. Then I'll look for the frame into the array and take only the data needed that are after. I think this should work. Lets try
07-25-2012 09:00 AM
The information read in the buffer is of string types. To work on the BCD code I must probably change it into a byte array and then decode byte per byte. But it doesn't work. The translation is wrong. Do u have any idea why?
I attached my VI. This one is just a test code that I will implement after on my VI reading the USB input