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'

 채택된 답변

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);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기

제품

릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by