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'

 採用された回答

MathWorks Support Team
MathWorks Support Team 2022 年 10 月 8 日
編集済み: MathWorks Support Team 2021 年 9 月 7 日
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 ExchangeInstrument Control Toolbox についてさらに検索

製品

リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by