D-28, Daqseterrorhandler, Daqsetoption – Measurement Computing WaveBook rev.3.0 User Manual
Page 224: Daqsettimeout

D-28 daqX API - Command Reference,
6-24-99
WaveBook User’s Manual
daqSetErrorHandler
DLL Function
daqSetErrorHandler(DaqHandleT handle, DaqErrorHandlerFPT handler);
C
daqSetErrorHandler(DaqHandleT handle, DaqErrorHandlerFPT handler);
Visual BASIC
VBdaqSetErrorHandler&(ByVal handle&, ByVal handler&)
Delphi
daqSetErrorHandler(handle:DaqHandleT; handler:DaqErrorHandlerFPT)
handle
Handle to the device to which to attach the specified error handler
Parameters
handler
Pointer to a user defined error handler function.
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqSetDefaultErrorHandler,daqDefaultErrorHandler,daqGetLastError,daqProcessError
Program References
ADCEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ERREX.PAS (Delphi)
Used With
All devices
Description
daqSetErrorHandler
specifies the routine to call when an error occurs in any command. The default routine displays a message and
then terminates the program. If this is not desirable, use this command to specify your own routine to be called when errors occur. If you
want no action to occur when a command error is detected, use this command with a null (0) parameter. The default error routine is
daqDefaultHandler
.
daqSetOption
DLL Function
daqSetOption(DaqHandleT handle, DWORD chan, DWORD flags, DaqOptionType optionType,
FLOAT optionValue);
C
daqSetOption(DaqHandleT handle, DWORD chan, DWORD flags, DaqOptionType optionType,
FLOAT optionValue);
Visual BASIC
VBdaqSetOption&(ByVal handle&, ByVal chan&, ByVal flags&, ByVal optionType&, ByVal
optionValue!)
Delphi
daqSetOption(Handle:DaqHandleT; chan:DWORD; flags:DWORD; optionType:DaqOptionType;
optionValue:FLOAT)
handle
The handle to the device for which to set the option
chan
The channel number on the device for which the option is to be set
flags
Flags specifying the options to use.
optionType
Specifies the type of option.
Parameters
optionValue
The value of the option to set
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqAdcExpSetChanOption,
Program References
None
Used With
All devices
Description
daqSetOption
allows the setting of options for a device’s channel/signal path configuration.
The chan parameter specifies to which channel the option applies. The optionType specifies the type of option to apply to the channel.
The optionValue parameter specifies the value of the option. The flags parameter specifies how the option is to be applied. For more
information on the options and their valid settings, refer to the Option Value and Option Type tables.
daqSetTimeout
DLL Function
daqSetTimeout(DaqHandleT handle, DWORD mSecTimeout);
C
daqSetTimeout(DaqHandleT handle, DWORD mSecTimeout);
Visual BASIC
VBdaqSetTimeout&(ByVal handle&, ByVal mSecTimeout&)
Delphi
daqSetTimeout(handle:DaqHandleT; mSecTimeout:DWORD)
handle
Handle to the device for which the event time-out is to be set
Parameters
mSecTimeout
Specifies time-out ( ms ) for events
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqWaitForEvent, daqWaitForEvents
Program References
None
Used With
All devices
Description
daqSetTimeout
allows you to set the time-out for waiting on a single event or multiple events. This function can be used in conjunction
with the daqWaitForEvent and daqWaitForEvents functions to specify a maximum amount of time to wait for the event(s) to be
satisfied.
The mSecTimeout parameter specifies the maximum amount of time (in milliseconds) to wait for the event(s) to occur. If the event(s) do
not occur within the specified time-out, the daqWaitForEvent and/or daqWaitForEvents will return.