NI Home > Community > NI Discussion Forums

Measurement Studio for VB6

Showing results for 
Search instead for 
Do you mean 
Posts: 1

DAQmx C API to use digital IO in VB6

[ Edited ]

I'm trying to develop a VB6 application using DAQmx C API at Windows 7.

I would like to set a digital port as follows,


line0~3 : digital output

line4~7 : digital input


You know, this was not a problem on Windows XP.

It's easy to set a digital port to multiple purposes using CWDAQ control.

But now, CWDAQ control at VB6 doesn't work in Windows 7 meaning that It cannot recognize the DAQ board, because NI stopped servicing for VB6.

So I'm trying to use DAQmx C API instead of CWDAQ control.

The C API example codes are treating for the whole line setting like only for output or only for input.

There's no examples about setting a port to multiple purposes.

I hope anyboby can help me to  use a digital port as half for Input and remains for output.






Posts: 28

RE: DAQmx C API to use digital IO in VB6

Hi, Y.S.


The example you want to refer to is on NI website below.

There are two tasks for DI, DO in the code.


It may need to be changed device name, some configuration, and a small part of code as your systme environments.

SangYun Lee