LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Chart History Data Property Node - lose first point

Solved!
Go to solution

with a waveform chart,

when i use a blank array constant to clear the history data property node, i dont get the first point, only the last 3

 

it isnt present in the history either

 

I made a second chart fed from the same source and didnt clear its history and it works fine (4 data points)

 

any ideas, clarification, or suggestions would be appreciated

 

thank you

 

cwhw112_1-1700442415725.png

 

 

0 Kudos
Message 1 of 3
(15,119 Views)

Hi cwhw,

 


@cwhw112 wrote:

any ideas, clarification, or suggestions would be appreciated


Race conditions!

 

See this:

There was no execution order aka "THINK DATAFLOW!" in your VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(15,088 Views)
Solution
Accepted by cwhw112

Specifically, your FOR loop and the history clearing run in parallel, so by the time it clears, one point might have already been written, then wiped. Similarly, inside the loop you read the history in parallel to writing to the chart history. You cannot predict what happens first, but the outcome critically depends on order.

 

 

Execution order is most easily enforced via dataflow. try the following (and if you configure the Vi to clear indicators when called, the "history data 3" indicator won't show stale data from previous runs until the history is written.)

 

altenbach_0-1700465525728.png

 

0 Kudos
Message 3 of 3
(15,082 Views)