Chapter 2 Function Reference — Timeout_Config
NI-DAQ FRM for PC Compatibles 2-400
©
National Instruments Corporation
Timeout_Config
Format
status = Timeout_Config (deviceNumber, timeout)
Purpose
Establishes a timeout limit that is used by the synchronous functions to ensure that these
functions eventually return control to your application. Examples of synchronous functions
are
DAQ_Op, DAQ_DB_Transfer and WFM_from_Disk.
Parameters
Input
Parameter Discussion
timeout is the number of timer ticks. The duration of a tick is 55 ms (0.055 s), and there are
approximately 18 ticks/s.
–1: Wait indefinitely (timeout disabled).
0 to 2
31
: Wait timeout
*
0.055 s before returning.
Using This Function
The synchronous functions do not return control to your application until they have
accomplished their task. If you have indicated a large amount of data and/or a slow acquisition
or generation rate, you might want to terminate the function prematurely, short of restarting
your computer. By calling
Timeout_Config before calling the synchronous function,
you can set an upper bound on the amount of time the synchronous function takes before
returning. If the synchronous function returns the error code timeOutError, you know that
the number of ticks indicated in the timeout parameter have elapsed and the synchronous
function has returned because of the timeout.
The following is a list of the synchronous functions:
DIG_DB_Transfer
DAQ_DB_Transfer
Lab_ISCAN_Op
WFM_DB_Transfer
DAQ_Op
Name Type Description
deviceNumber i16 assigned by configuration utility
timeout i32 number of timer ticks