User manual

Chapter 3 Software Overview
© National Instruments Corporation 3-5 NI-DAQ User Manual for PC Compatibles
Event Message Functions
NI-DAQ Event Message functions are an efficient way to monitor your
background data acquisition processes, without dedicating your foreground
process for status checking.
The NI-DAQ Event Message dispatcher notifies your application when a
user-specified DAQ event occurs. Using event messaging eliminates
continuous polling of data acquisition processes.
Config_Alarm_Deadband
Specify alarm on/off condition for data
acquisition event messaging.
Config_ATrig_Event_Message
Specify analog input trigger level and slope
for data acquisition event messaging.
Config_DAQ_Event_Message
Specify analog input, analog output, digital
input, or digital output trigger condition for
event messaging.
Event Messaging Application Tips
To receive notification from the NI-DAQ data acquisition process in
case of special events, you can call
Config_Alarm_Deadband
,
Config_ATrig_Event_Message
,or
Config_DAQ_Event_Message
to specify an event in which you are interested. If you are interested in more
than one event, you can call any of those three functions again for each
event.
After you have configured all event messages, you can begin your data
acquisition by calling
SCAN_Start
,
DIG_Block_In
, and so on.
When any of the events you specified occur, NI-DAQ notifies your
application.
Event notification can be done through user-defined callbacks and/or the
Windows Message queue. When a user-specified event occurs, NI-DAQ
calls the user-defined callback (if defined) and/or puts a message into the
Windows Message queue, if you specified a window handle. Your
application receives the message when it calls the Windows
GetMessage API.