08-09-2011 01:18 PM
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
Solved! Go to Solution.
08-09-2011 02:04 PM - edited 08-09-2011 02:06 PM
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:
08-09-2011 02:27 PM
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
08-09-2011 02:38 PM
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...
08-10-2011 09:55 AM
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
08-10-2011 10:02 AM
08-10-2011 10:18 AM
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