Chapter 4
Programming
©
National Instruments Corporation
4-7
NI PXIe-5450 User Manual
Creating an Application with LabWindows/CVI
This topic assumes that you are using LabWindows/CVI to manage your
code development and that you are familiar with the ADE.
To develop an NI-FGEN application in LabWindows/CVI, follow these
general steps:
1.
Open an existing or new project file.
2.
Load the NI-FGEN function tree (
niFgen.fp
) from
VXIPnP\<WinNT|9x>\niFgen
.
3.
Use the function tree to navigate the function hierarchy and to generate
function calls with the proper syntax and variable values.
NI-FGEN Example Programs for LabWindows/CVI
To locate the example programs installed with NI-FGEN, refer to the
NI-FGEN Instrument Driver Readme
.
If you are using LabWindows/CVI 7.0 or later, you can use the NI Example
Finder to search or browse examples. NI-FGEN examples are classified by
keyword, so you can search for a particular device or measurement
function.
To browse the NI-FGEN examples available in LabWindows/CVI, launch
LabWindows/CVI, select
Help»Find Examples
, and navigate to
Hardware Input and Output»Modular Instruments»NI-FGEN
. You
can also access the examples using the Start menu, by selecting
Start»
All Programs»National Instruments»NI-FGEN»Examples
.
Creating an Application with Visual C/C++
This topic assumes that you are using Visual C/C++ to manage your code
development and that you are familiar with the ADE.
To develop an NI-FGEN application in Visual C/C++, follow these general
steps:
1.
Open an existing or new Visual C/C++ project.
2.
Create source files—
.c
(C source code) or
.cpp
(C++ source
code)—and add them to the project. Make sure that you include the
NI-FGEN header file (
niFGEN.h
) in your source code files as follows:
#include "niFGEN.h"
3.
Specify the directory that contains the NI-FGEN header file under the
Preprocessor»Additional include directories
settings in your