|
当我将在NI-DAQmx C参考帮助中找到的参数传递给Visual Basic中的DAQmx函数时,会出现以下错误:Requested value is not a supported value for this property。
比如,我的Visual Basic代码中有一个DAQmxCreateAIVoltageChan函数,根据NI-DAQmx C参考帮助所述,terminalConfig的可能值如下:
DAQmx_Val_Cfg_Default
DAQmx_Val_RSE
DAQmx_Val_NRSE
DAQmx_Val_Diff
DAQmx_Val_PseudoDiff
当我尝试使用这些值时,会得到Requested value is not a supported value for this property的错误。如何确定哪些值被Visual Basic中的NI-DAQmx函数所接受?
可以在头文件 NIDAQmx.h
中找到与每个参数相关联的整型值。 然后仅传递这个整数值到Visual Basic的NI-DAQmx函数中。
C:\Program Files\National Instruments\NI-DAQ\NI-DAQmx ANSI C Dev\include\NI-DAQmx.h
|