Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to stop analog data acquisition before all samples have been taken?

I have a test that will run for a variable amount of time and I am using a PCI-6251 board for analog signal measurements. When the test is over I need to be able to stop the data acquisition and run an fft on the results. I can't break the acquisition into smaller pieces or the results will not be continuous, and I don't want to wait for the worst-case (longest) possible test time to complete before processing the data. That approach would kill testing throughput. I can't figure out how to just stop the acquisition and get the results like you could with an oscilloscope.

Does anybody know how to do this?

 

Thank you

0 Kudos
Message 1 of 4
(2,980 Views)

Hi t_aw,

 

Welcome to the NI Discussion forums! I understand that you would like to be able to trigger a stop condition for your analog DAQ task. Please take a look at this KnowledgeBase article, "How Do I Use a Digital Trigger in LabVIEW to Start and Stop Acquiring Data?" In this KB article, you will configure a finite acquisition task to effectively act as a continuous task which you can trigger a stop condition for. In the example code included with the KB, the stop trigger is tied to a physical channel on the device, but it should not be too difficult to rework the program to take a user-generated event as the trigger. Please post again if you encounter any difficulties in interpreting the example code or tailoring it to your application.

0 Kudos
Message 2 of 4
(2,953 Views)

Thanks for the help. We don't use labview to control the DAQ card so I can't view the example, but maybe the description of the solution will get me headed in the right direction. At least it is good to know that this is possible to do. I looked through the ANSI C Examples that are installed with DAQmx but did not see any that apply to my situation. Maybe I can figure out from the knowledge base example description which function calls would be appropriate.

 

0 Kudos
Message 3 of 4
(2,936 Views)

Hi t_aw,

 

My apologies for assuming that you're using LabVIEW, but you are absolutely correct that you can achieve the same functionality in C/C++ code. I've attached a VI snippet of the example VI I referred you to. You should be able to work from there in finding the corresponding C code calls. For example, the "Start Digital Edge" VI in the diagram would correspond to a C function call of "DAQmxCfgDigEdgeStartTrig". I hope the VI snippet helps!

 

StartStopTrigger.png

0 Kudos
Message 4 of 4
(2,915 Views)