User manual
Chapter 3 Software Overview
NI-DAQ User Manual for PC Compatibles 3-12 ni.com
Each of these properties should be set as follows:
AnalogAlarmEventn.property name = property value
For instance, to set the
ChanStr
property to Analog Input channel 0 for
Analog Alarm Event 1:
AnalogAlarmEvent1.ChanStr = "AI0"
Set up your program flow like this:
1. Set the properties of the Analog Alarm Event control. Next configure
the acquisition or generation operations using the appropriate NI-DAQ
functions.
2. Set the
Enabled
property of the Analog Alarm Event control to
1(True).
3. Invoke the
AnalogAlarmEventn
.
Refresh
method to set the Analog
Alarm Event in the NI-DAQ driver. Each subsequent invocation of
AnalogAlarmEventn
.
Refresh
deletes the old Analog Alarm Event
and sets a new one with the current set of properties.
4. Start an asynchronous data acquisition operation.
5. Call any one of the four following procedures:
•
AnalogAlarm_HighAlarmOn
•
AnalogAlarm_HighAlarmOff
•
AnalogAlarm_LowAlarmOn
•
AnalogAlarm_LowAlarmOff
You can perform necessary event processing within this procedure,
such as updating a global count variable or toggling digital I/O lines.
The four Analog Alarm procedures are prototyped as follows:
Sub AnalogAlarmn_HighAlarmOn
(DoneFlag As Integer,
ScansAsLong)
Sub AnalogAlarmn_HighAlarmOff
(DoneFlag As Integer,
ScansAsLong)
Sub AnalogAlarmn_LowAlarmOn
(DoneFlag As Integer,
ScansAsLong)
Sub AnalogAlarmn_LowAlarmOff
(DoneFlag As Integer,
ScansAsLong)










