Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Checking if trigger was used.

I am writting a software for PCI-6224 card to acquire analog data upon external trigger via digital channel. I am writting this using ANSI C library. Because of my needs I check if acquisition is complete with DAQmxIsTaskDone() every 100ms or so and retrieve data when acquisition have finished. The problem is that I need to run some other code when the task is triggered. Is there any easy way of getting to know when the data acquisition have been triggered?

0 Kudos
Message 1 of 4
(6,023 Views)

Hello DeXodus,

 

you can use a DAQmx Event Handling in LabWindows/CVI and check there with an counter if the trigger line is received.

 

So the PFI line from the card was used for trigger the DAQ acquisition and trigger the event or callback function.

 

Hope this helps.

best regards
Alexander
0 Kudos
Message 2 of 4
(5,993 Views)

Is there any other way without callbacks. The problem is that I am wrapping the c++ code with cython for use in python program. So I just made a class to be wrapped in my c++ code. In this case using callback is very inconveniant. Is there a way to just call a function to get the status of the trigger?

0 Kudos
Message 3 of 4
(5,979 Views)

Hello DeXodus,

 

sorry, no. Instead of the callback you can poll the the available samples to read property to see, if some samples are acquired.

Another option is to work with change detection and to start a second loop or task with this.

best regards
Alexander
0 Kudos
Message 4 of 4
(5,966 Views)