06-01-2012 03:42 PM
I have a basic question. I want to refresh/update a Labview Graph on the front panel with online signals rolling from the right to the left.
What I have done till now is:
I acquired the data using DAQmx and stored the data in 100 shift registers. The stored data in the shift registers are then fed into the Graph inside a while loop. The amount of time(defined as T_iteration) for every while loop would be dependent on the specified # of samples collected by DAQmx and sampling rate.
If T_iteration = 0.02sec, my question is: could the while loop be implemented that fast, i.e. at 50Hz, with online Graph update? Or could the Graph be updated at 50Hz?
Thanks in advance!
DAQ_boy
06-01-2012 04:01 PM
Any reason not to use a Chart, which directly implements the scrolling for you? You can even put the points in one-at-a-time at 50 Hz (easy) and the whole thing will scroll.
06-01-2012 04:24 PM
Thanks Bob. I would try strip chart and see how it works.
06-01-2012 05:11 PM
What is it that you are really trying to do?
100 shift registers and timing dependent on DAQ sampling sounds like a recipe for disaster.
Look at the Producer/Consumer Design Pattern. This will allow separation of the data acquistion from the display.
Your users cannot process 50 graph updates per second. Human eyes and brains don't work that fast. For most graphs 2-10 updates per second usually works well.
Lynn