LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do it drop the first data for displaying data in waveform chart ?

Hi all ,
I use a waveform chart to display data's trend .
but find not a data that is sended firstly to chart  on panel of waveform chart  .
Who can help me ?
For detail ,see attach files
 
 
0 Kudos
Message 1 of 5
(2,718 Views)
Sorry , forget to upload another a file
0 Kudos
Message 2 of 5
(2,717 Views)
Hi See attachment
________________________________________________________


Try to make everything Automatic
Message 3 of 5
(2,708 Views)

You have a race condition between the loop and the code above that clears the history data. Apparently, the history data gets cleared after the loop wrote the first point to the history.

Currently there is no data dependency so there is no way to tell in what order things execute.

East solution: WIre the error-out to the loop boundary (see image). Now dataflow ensures that the loop cannot start until the history has been cleared. (And delete the value property node to the right of it where you write a zero. make no sense.)

Message Edited by altenbach on 05-06-2007 11:00 PM

Message 4 of 5
(2,709 Views)
Notice also that inside the loop, it is not defined what happens first
  1. Reading the chart history
  2. Writing a value to the chart

It depends on pure luck if the chart history and "appended array" show the same values. If by chance the history read happens before the writing to the chart, the display will also be out of sync. You should ensure that the reading of the history can only happen after the chart received the new data point.

Message Edited by altenbach on 05-06-2007 11:08 PM

0 Kudos
Message 5 of 5
(2,698 Views)