LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout for analog trigger

I've written a C program to control my PCI MIO 16E4 Daq Board using
asynchronous function.
The trigger is defined in Configure_HW_Analog_Trigger and the
aquisition is done with DAQ_Start.
I want to set a timeout to avoid the board waiting too long for the
trigger to occur but the only NIDAQ function that I've found in NIDAQ
is Timeout_Config which is used for synchronous function only.
Any help appreciated.
Greetings.
Claudio
0 Kudos
Message 1 of 2
(2,303 Views)
You are likely to get more responses to this question if you post in the Multifunction I/O category rather than the LabVIEW category.

I am also not seeing a timeout parameter for the asynchronous NI-DAQ functions, but there are ways to implement a timeout scheme. In the DAQsingleBufAnalogTrig.c example, you see that they call DAQ_Check in a loop to get the status of the analog operation. You could set your program to loop a fixed number of times and if the acquisition is still not finished and the number of retrieved samples is 0, you can conclude that a timeout has occurred. Or instead of setting a fixed number of loop cycles, you could keep track of the time elapsed using the Timer functions provided by your compiler environment.
0 Kudos
Message 2 of 2
(2,303 Views)