02-13-2019 10:54 AM
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.
Solved! Go to Solution.
02-18-2019 07:14 AM
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.