User manual

Chapter 3 Software Overview
NI-DAQ User Manual for PC Compatibles 3-6 ni.com
After your application receives an event message, it can carry out the
appropriate task, such as updating the screen or saving data to disk.
To restart your data acquisition process after it completes, you do not need
to call the message configuration calls again. They remain defined as long
as your application does not explicitly remove them or call
Init_DA_Brds
.
To add or remove a message, first clear your data acquisition process.
Then, call one of the three event message configuration functions.
NI-DAQ Events in Visual Basic for Windows
ActiveX Controls for Visual Basic
Unlike standard control-flow programming languages, event occurrences
drive Visual Basic code. You interact with outside events through the
properties and procedures of a control. For any given control, there is a
set of procedures called event procedures that affect that control.
For example, a command button named Run has a procedure called
Run_Click()
that is called when you click on the Run button. If you
want something to run when you click the Run button, enter code in the
Run_Click()
procedure. When a program starts executing, Visual Basic
looks for events related to controls and calls control procedures as
necessary. You do not write an event loop.
There are three NI-DAQ ActiveX controls for Visual Basic applications:
General Data Acquisition Event (
daqevent.ocx
)
Analog Trigger Event (
atrigev.ocx
)
Analog Alarm Event (
alarmev.ocx
)
The NI-DAQ installer places all of these ActiveX controls in the
NIDAQ
subdirectory of your Windows 2000/NT/98/95 directory under the file
names shown.