07-27-2024 03:48 PM
Excel VBAで下記のコードを実行すると
次のエラーメッセージが出てしまいます。
NIDAQmx C APIの参照はできています。
何か解決方法はありませんか?
OS: Windows10
NI-DAQmxドライバ: ni-daqmx_19.1.1_offline.iso
NI-DAQ: NI 9401
コード:
Status = DAQmxCreateTask("", taskHandle)
Status = DAQmxCreateDOChan(taskHandle, "cDAQ1Mod1/port0/line0:1", "", DAQmx_Val_ChanPerLine)
Status = DAQmxSetDOUseOnlyOnBrdMem(taskHandle, "cDAQ1Mod1/port0/line0:1", True)
Status = DAQmxCfgSampClkTiming(taskHandle, "OnboardClock", 10000000#, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 4)
Status = DAQmxWriteDigitalLines(taskHandle, 4, 0, 10#, DAQmx_Val_GroupByChannel, data(0, 0), sampsPerChanWritten, ByVal 0&)
Status = DAQmxStartTask(taskHandle)
エラーメッセージ:
「エントリDAQmxCfgSampClkTiming_VB6が
DLLファイルnicaiu.dll内にみつかりません。」
解決済! 解決策の投稿を見る。
08-03-2024 11:35 PM
Hi,
I think you need to check what Excel bit version you are using.
If it is 64 bit, probably it is not going to work since the DAQmx C dll would work in 32-bit version of Excel.
Try to use 32 bit version of Excel and see if it works.
It works on my end using Excel Office 365, 32 bit version in Windows 10 with DAQmx version 21.8
08-06-2024 01:14 AM
As you said, the Excel I use is the 64-bit version. I don't have the 32-bit version on hand so I can't verify it,but thank you very much for letting me know the cause of the problem.