Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQ function timeout

In the NI-DAQ function reference, it does not mention if the function is async or sync function. I need to know if there are some problems and the NI-DAQ hanged up, will the following function return after a period of time (i.e. timeout)?

1>DIG_In_Line()
2>DIG_Out_Line()
3>AI_Read()
4>AO_Write()

How much is the default "timeout" value? Is this value can be configured using NI-DAQ functions?

Many thanks.
0 Kudos
Message 1 of 4
(3,100 Views)
Hello JH,

Thank you for contacting National Instruments.

Only the AI_Read() function will return a timeout error code if it does not complete in a set amount of time. The other functions should execute immediately when called.

You can set the "timeout" value by calling the Timeout_Config function.

Let me know if you have further questions.

Sincerely,

Sean C.
Applications Engineer
National Instruments
Message 2 of 4
(3,100 Views)
Thank you, Sean.

I am considering the worst case: if the NI-DAQ or the hardware have some problem, and at that time I call function DIG_In_Line(). Will the function still return in a timed manner? If this function call does not return, it will block the execution of my program.

Do you have answer? Thank you very much.

Jerry
0 Kudos
Message 3 of 4
(3,100 Views)
Hello,

If there is something wrong with your hardware, your code will immediately return an error. To check this, use an unassigned board number in the DIG_In_Line() function. You will immediately recieve the error -10401. You can then choose to ignore the error, or halt the program. To ignore the error, select Run >> Break On and deselect Library Errors.

Let me know if you have any further questions.

Sincerely,

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,100 Views)