Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxWriteDigitalU8 not found in nidaqmx.tlb

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

 

0 Kudos
Message 1 of 4
(3,215 Views)

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


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4
(3,207 Views)

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

0 Kudos
Message 3 of 4
(3,195 Views)

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:

 

  • Visual Basic 6.0 does not support any unsigned numbers, except unsigned 8-bit integers. If a function uses an unsigned data type in C, you must use the signed equivalent in Visual Basic 6.0. This requirement can reduce the range of values you can pass for some function parameters. Even though Visual Basic 6.0 supports unsigned 8-bit integers, DAQmxReadDigitalU8 and DAQmxWriteDigitalU8 are not included in the NI-DAQmx Visual Basic 6.0 type library. Use DAQmxWriteDigitalLines and DAQmxReadDigitalLines to write and read digital data to 8-bit or wider ports.

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

---
Brad Keryan
NI R&D
Message 4 of 4
(3,177 Views)