User manual
Chapter 2 Fundamentals of Building Windows Applications
© National Instruments Corporation 2-9 NI-DAQ User Manual for PC Compatibles
NI-DAQ Examples
The NI-DAQ installer installs a suite of concisely written examples in the
following application development environments:
• LabWindows/CVI 5.0.x
• Microsoft Visual C++ 2.x (32-bit) or later
• Microsoft Visual Basic 4.0 (32-bit) or later
• Borland C++ 5.0
These examples illustrate how to use NI-DAQ functions to perform a single
task. All examples are devoid of any code to extract values from GUI
objects so that you can focus on how the code flow is formed. In addition,
most parameters are hardcoded at the top of the routine so that if you decide
to change them, you can simply change the assignment.
The examples correspond to the function flowcharts that you will see in
Chapter 3, Software Overview. If a task and a flowchart in the following
chapter suits your data acquisition needs, you should find a corresponding
example to get you started.
Each example consists of the following files:
• An appropriate project file for the programming language (except for
Borland C++, where
.bat
files are included to help build the
executable)
• A single source code file to illustrate the task at hand
• A library of NI-DAQ example utility functions (for buffer creation,
waveform plotting, error checking, and implementing a delay)
Note
None of the examples are installed in their executable (
.exe
) format. To run them,
you first must build them or load them into the IDE for the appropriate programming
language.
The examples are stored in the hierarchy shown below for each language:
.\AI
Analog Input examples
.\AO
Analog Output examples
.\DI
Digital Input examples
.\DO
Digital Output examples
.\CTR
Counter/timer examples
.\SCXI
SCXI examples
.\CALIB
Calibration examples










