User manual

Chapter 3 Software Overview
NI-DAQ User Manual for PC Compatibles 3-10 ni.com
The Analog Trigger Event requires that you set the asynchronous
data acquisition operation to use interrupts. For more information
on Analog Trigger Events, refer to the descriptions for the
Config_ATrig_Event_Message
function in the NI-DAQ
Function Reference Online Help file.
Each of these properties should be set as follows:
AnalogTriggerEventn.property name = property value
For example, to set the
ChanStr
property to Analog Input channel 0 for
Analog Trigger Event 1:
AnalogTriggerEvent1.ChanStr = "AI0"
Set up your program flow like this:
1. Set the properties of the Analog Trigger Event control. Next, configure
the acquisition or generation operations using the appropriate NI-DAQ
functions.
2. Set the
Enabled
property of the Analog Trigger Event control to
1(True).
3. Invoke the
AnalogTriggerEventn. Refresh
method to actually set
the Analog Trigger Event in the NI-DAQ driver. Each subsequent
invocation of
AnalogTriggerEventn. Refresh
deletes the old
Analog Trigger Event and sets a new one with the current set of
properties.
4. Start an asynchronous data acquisition operation.
5. When the Analog Trigger conditions are met, the
AnalogTriggerEventn_Fire
procedure is called. You can perform
the necessary event processing within this procedure, such as updating
a global count variable, or toggling digital I/O lines.
Index
N/A
Tag
N/A
Enabled
0False (default)
1True
Table 3-2. Analog Trigger Event Control Properties (Continued)
Property Allowed Property Values