03-01-2021 03:22 PM
I'm trying to program an NI9403 module in a cDAQ 9171 chasis in excel vba. I simply want to make all the lines on port0 to be 1. I create a task and then create a digital output channel. However when the DAQmxCreateDOChan() runs, it gives me error -200088. Task specified is invalid or does not exist. I just created the task right before creating the channel though. Could anyone help me see why I am seeing this error? Thanks!
Dim taskHandle As Long
' Create the DAQmx task.
DAQmxErrChk DAQmxCreateTask("test", taskHandle)
' Add a digital input channel to the task.
DAQmxErrChk DAQmxCreateDOChan(taskHandle, "cDAQ1Mod1/port0/line0:7", "testa", DAQmx_Val_ChanForAllLines)
03-03-2021 12:35 PM
The issue is fixed. I found out it is because my excel is 64 bit version. I uninstalled it and installed 32 bit version Excel. Now it is working.
10-19-2021 03:39 PM
Is there any latest updates from NI so that we can use this for 64 bit Excel?. As the Windows image coming with our new PC has Excel 654 bits and we are not able to control USB 6501 from Excel. Appreciate if NI can give a solution.
Thanks,
Leyo