Why do I receive an the error "Undefined function or variable 'NIFGEN_VAL_OUTPUT_ARB'" when attempting to use NI-FGEN Instrument Drivers?

I am trying to modify the code example for "Using NI-FGEN Instrument Driver To Generate A Sine Wave", available at:
so that I can use an arbitrary waveform instead of a sine wave. However, when I replace the line:
invoke(ictObj.Configuration,'configureoutputmode',NIFGEN_VAL_OUTPUT_FUNC);
with 
invoke(ictObj.Configuration,'configureoutputmode',NIFGEN_VAL_OUTPUT_ARB);
I receive the error:
ERROR: Undefined function or variable 'NIFGEN_VAL_OUTPUT_ARB'

 Accepted Answer

The "NIFGEN_*" constants are defined in the "niFgen.h" header file included with the National Instruments drivers.
Search your machine for the "niFgen.h" file, open the file, and search it for the "NIFGEN_VAL_OUTPUT_ARB" variable. In this file, the variable is defined to a value of 1.
Now, above the invoke line in MATLAB, define a variable named "NIFGEN_VAL_OUTPUT_FUNC" to a value of 1, as shown:
NIFGEN_VAL_OUTPUT_FUNC = 1;
invoke(ictObj.Configuration,'configureoutputmode',NIFGEN_VAL_OUTPUT_ARB);

More Answers (0)

Categories

Find more on Instrument Control Toolbox in Help Center and File Exchange

Products

Release

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!