LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing scan rate during runtime

I have labview 6.1, Windows 2000 and a PCI-MIO-16E board. I am using 12 channels to log data, all at the same rate. However, I would like to be able to change the scan rate during runtime. On first startup of my main vi I use AI Config and then AI Start to kick off the card, and I am currently trying to use AI Clear, then AI Config and a new AI Start with the new scan rate to restart the card. It works, but sometimes takes a second ro two to start refreshing data displayed on the VI. Does anyone know of a better method of doing this? I don't have an external clock running to sync from, I'm just using the on board timers.

Thanks

Andy
0 Kudos
Message 1 of 3
(2,685 Views)
What you are doing should work. How long it takes for the update to become effective depends on how long it takes to end the original acquistion and how many samples of the new one must be taken before updating the display. One or two seconds may not be too far off if the original acquisition is slow or taking lots of points.

One way around this is to always sample at the highest rate and simply discard the unwanted data when slower sampling is adequate. Of course this may not be acceptable if the hardware or software cannot sustain the highest rate continuously.

Lynn
0 Kudos
Message 2 of 3
(2,671 Views)
Configure more than one I/O task at start up.

Start only one at a time.

By configuring the tasks (buffers etc.) up front, the "switch time" can be dcreased.

Make sure your groups numbers are unique.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,660 Views)