04-09-2012 06:19 AM
Hello,
I'm building a Labview program to control and log my quadrocopter, it communicates by a serial link at a maximum rate of 40Hz.
To tune my quad I'm logging some data in a waveform chart, but I'm having some troubles the last few days.
I don't what I changed, but the waveform chart randomly resets. I do not edit any timestamp just merge the incoming data and feed them to the waveform chart.
I attached my labview program, I use Data and Data2 (on the Control tab).
What goes wrong ?
04-09-2012 08:06 AM
You are assuming you always get exactly 5, 9, 13, or 25 bytes. What happens if you get 10? The "Default" case executes, and that sends an empty array to the graph. Hence, it clears it.
04-09-2012 08:51 AM
I discoverd that also, I now changed it to only update the waveform when the right amount of data is received (which should always be 5, 9, 13 or 25, but that isn't the case) and if not the right data.
Then loop back the old data. This seems to work.
Now I only need to improve my datalink, so that is always receives the right amount of that. I use 0xED as termination, but the data itself could also contain the ED