Daqwaitforevents – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 313

Programmer’s Manual
908594
Daq API Command Reference 4.6-35
daqWaitForEvents
Also See: daqWaitForEvent, daqSetTimeout
Format
daqWaitForEvents(handles, events, eventCount, eventSet, waitMode)
Purpose
daqWaitForEvents
waits on specific device events to occur on the specified devices.
Parameter Summary
Parameter Type
Description
handles DaqHandleT
Pointer to an array of handles which represent the list of device
on which to wait for the events
daqEvents DaqTransferEvent
Pointer to an array of events which represents the list of events
to wait on
eventCount DWORD
Number of defined events to wait on
eventSet BOOL
Pointer to an array of booleans indicating if the events have
been satisfied
waitMode DaqWaitMode
Specifies the mode for the wait
Parameter Values
handles:
obtained from the DaqOpen function
events:
see table below
eventCount:
valid values range from 1 to 16
eventSet:
valid values are either true (
≠ 0) or false ( = 0)
waitMode:
see table below
Parameter Type Definitions
daqEvents-(DaqTransferEvent)
Definition Description
DteAdcData
Data is present in the acquisition buffer
DteAdcDone
Acquisition data transfer operation is complete
waitMode-(DaqWaitMode)
Definition Description
DwmNoWait
Do not wait. Return immediately with the current state of all events
DwmWaitForAny
Wait until any event condition has been satisfied then return current states for all events
DwmWaitForAll
Wait until all event conditions have been satisfied then return current states for all events
Returns
DerrNoError
No Error
Function Usage
This function will wait on the specified events and will return based upon the criteria selected with the waitMode
parameter. A time-out for all events can be specified using the function. Events to wait on are specified by passing
an array of event definitions in the events parameter. The number of events is specified with the eventCount
parameter.
Note: The default timeout is 10 seconds.