LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart Flicker

Solved!
Go to solution

For some reason when I run my VI the chart flickers making it diffcult to read the display. Any ideas on how to get rid of this? If I increase the time delay it goeas away, but then the time gets messed up and the data is not diplayed correctly. Please Help- James

0 Kudos
Message 1 of 7
(3,304 Views)

Hi James,

 

- is there a reason to load the same file in each iteration?

- Is there a reason to load the same file each 50 milliseconds?

- Is there a reason to clear the charts each 50 ms?

- Is there a reason to send new data to the charts each 50ms?

- Is there a need for RaceConditions (clearing and updating with no given order)?

 

Solution:

Do all the "constant" operations outside the loop (loading the file, updating the chart, setting Scale.Multiplier and Scale.Format). In the loop you only need to change the XScale.Offset/Max...

I started doing it:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,294 Views)

Yes, the file must be reloaded with each iteration because new data is being added to the file roughly ever 2 seconds. I have a non NI device recording data, roughly every 2 secs, and putting that data into a text file. I then have labview pulling out that data and displaying it on a chart. There is no time data with this data, so the "get time", "wait" and other functions are there to establish the time. Basically, I just need a VI that pulls data from the txt file, plots that data on the chart with the time on the x-axis displayed in real time and then continues to pull new data as it is added. Thanks-James

0 Kudos
Message 3 of 7
(3,286 Views)

Hi James,

 

still no need to clear and update the charts with foll file content!

- Read the files every 1min or so (as you want to show data of hours of measurement).

- Determine the new data.

- Only wire the new data to the charts as they already buffer the older data.

- Increase loop iteration time: When the files get updated every 2s you don't need to read them each 50 milliseconds...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,280 Views)

I really appreciate the help! I don't have too much experince with LabView so, I'm not excatly sure how you do that. I've made some changes to the VI to try and do what you said. Please look at it and let me know if I'm headed in the right direction. I've attached a sample data file as well. Thanks -James

Download All
0 Kudos
Message 5 of 7
(3,253 Views)
Solution
Accepted by topic author JamesVAMSC

Hi James,

 

still no need to set the charts twice: when you set the history property of the charts then you don't need to wire the terminals...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(3,249 Views)

o, I see what your saying. Does mine run the same as your just with unessacry steps or does wiring both charts cause bad data display? Thanks so much for your help. Thanks-James

 

0 Kudos
Message 7 of 7
(3,245 Views)