01-27-2010 04:29 PM
Hi,
I'm trying to run an exsisting task that was created in NI Measurement and Automation Explorer inside excel. I have seen MANY visual basic examples on how to run an existing task, my problem is this:
"DAQmxErrChk: sub or function not defined"
In the visual basic editor, under "Tools - References" I can choose different libraries to include. I have included all of the NI libraries I have, and the issue still persists. I know that the "DAQmxErrChk" function accepts certain arguements, but without it, I cannot find a way to read in a value from the cDAQ card I use (NI cDAQ-9172). All that I need to do is read the voltage from one input.
Any help would be greatly appreciated.
Solved! Go to Solution.
01-28-2010 12:57 PM
medendoc,
Did you include the DAQmx library nidaqmx.tlb file located in C:\WINDOWS\system32
This KnowledgeBase decribes some of the small difference between error handling in C and error handling in VB. In your case it sounds like all you will need to do is add the NIDAQmxErrorCheck.bas file from the shared folder.
Here is an example of doing digital IO in Excel.
02-03-2010 03:18 PM
02-03-2010 05:56 PM
02-05-2010 12:46 PM