LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to improve front panel speed when using a FOR loop for sequentially reading single channel data?

I am using a FOR loop for sequentially reading data one channel at a time from daytronic daq. The slider on the front panel takes forever to show completed progress. However if I open the block diagram the for loop executes much faster and when I switch back to the front panel the slider is showing the correct progress. Is there anything I need to do set up the front panel? Any ideas?
0 Kudos
Message 1 of 6
(3,738 Views)
Are you calling this vi from some other main vi? or from TestStand?
0 Kudos
Message 2 of 6
(3,738 Views)
No this is the main vi. Actually I'm using a for loop within a for loop. The inner FOR-loop reads the data from 38 channels using an array. The outer FOR-loop repeats this (the inner for-loop) 100 times to get the mean and standard deviation.
Originally (done by my predecessor)- there were 38 sub-vi's reading the data and file takes a lot of time for compilation.
I compared the two versions. In fact, my vi runs much faster when i'm view the block diagram. However, it does not run faster when viewing just the front panel.
By the way there are tons of indicators and controls in this vi - but no graphs or charts.
0 Kudos
Message 3 of 6
(3,738 Views)
I suspect the problem has more to do with the update rate of your video card. Try moving the slider off screen or hide it behind another window. I bet you will see similar perfomace increases.

There are several things you can do to fix the problem. You can remove the indicator, update it less often on the block diagram or defer panel updates. Look in the shipping document LabVIEW performace and Memory Management (found by opening LabVIEW >> help >> search the LabVIEW bookshelf) to learn about the second option. The third option uses the VI class VI server to get a reference to the front panel that has a property for delaying screen updates. I have attached LV70 code below to explain.
0 Kudos
Message 4 of 6
(3,738 Views)
Jeremy, thanks.
I'm using LabVIEW version 6.0. Could you please send me your code in that version?
0 Kudos
Message 5 of 6
(3,738 Views)
here is a screen shot.
0 Kudos
Message 6 of 6
(3,738 Views)