02-10-2011 09:28 AM
Hi,
I'm writing a small application in VBA for Excel. I've installed DAQmx 8.7. The daqmx.tlb is referenced.
My problem is that I can't find DAQmxWriteDigitalU8 function. If I type in DAQmxWriteDigital and press Ctrl-Space it only Offers DAQmxWriteDigitalLines and none of the functions for DigitalOut, descibed in the C-API help. What could be the problem? AnalogIn works fine.
With kind regardes,
Alex
02-10-2011 01:36 PM - edited 02-10-2011 01:43 PM
Not all DAQmx functions have VB exposure. I simply don't know why but suspect it has something to do with the differance in base type defs. Ideally, you would want to use the latest version of DAQmx since 8.7 is a bit long in the tooth. DAQmx 9.2.3 seems to be the latest today. here is another good link to information about how the DAQmx API expects to support non NI IDEs
02-11-2011 04:50 AM
Hello Jeff,
thank you for the quick response. I've switched to nidaq 9.2.3, nothing changed. Let me express the problem a bit more general: how can I write Port0 or Port1 of my NI USB 6009 from Excel VBA. I would like to write port-wise, not every single line.
With kind regards,
Alex
02-11-2011 11:35 AM
Hi Alex,
As far as I know, the NI-DAQmx VB6 TLB has been frozen since NI-DAQmx 8.3. I would not expect new versions of NI-DAQmx to add new VB6 functions.
Does your computer have the NI-DAQmx C API Visual Basic 6.0 Help installed on the Start Menu? It has a section titled "Differences Between the NI-DAQmx C API and the NI-DAQmx Visual Basic 6.0 API" that explains why some functions are unavailable:
It is still possible to read or write an entire 8-bit port simultaneously, but it requires writing functions to convert your data to/from an 8-element array of line values.
Brad