LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Random resets of waveform chart

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 ?

Download All
0 Kudos
Message 1 of 3
(2,388 Views)

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.

 

 

0 Kudos
Message 2 of 3
(2,375 Views)

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

0 Kudos
Message 3 of 3
(2,371 Views)