VirtualBench

cancel
Showing results for 
Search instead for 
Did you mean: 

Virtualbench - Changing channel configurations between measurement

Solved!
Go to solution

Hi. I'm programming an application with Virtualbench for the first time. In my application I need to change the channels configuration in each measurement (change the acquisition time, sample rate, vertical range and so on). I need to get over a thousand measurements and when I try to change the channels configuration between the measurements, I get a message that says it is not possible to change them while in running state. So, to solve this, I'm forcing the Virtualbench to stop state with "MSO Stop.vi" between them. I'm not sure it is the best practice or it there is a better solution (I mean without use the MSO Stop. VI and MSU Run.VI each loop iteration). So I'll appreciate if anyone have a suggestion. Thanks.

0 Kudos
Message 1 of 2
(3,206 Views)
Solution
Accepted by topic author DCKS

Hi, 

 

Some driver functions and properties doesn't support calls and settings during runtime. For those is required to stop the acquisition, invoke the function and restart it. An example is the DAQmx driver that changing the sample rate is just possible when acquisition is not running. So you must call the DAQmx Stop.vi,  set the sample rate using the DAQmx Timing.vi  and invoke the DAQmx Start.vi to restart the acquisition. See links below:

 

Differences between the DAQmx Stop Task and Clear Task VIs

 

Using DAQmx Start Task and Stop Task VIs in LabVIEW

 

Despite I provide you the articles speaking about DAQmx driver, for MSO is the same way for programming and setting the sample rate. So it also requires you stop-start acquisition.

 

Any quesiton please let me know.

Lincoln

Message 2 of 2
(3,172 Views)