From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital port determine wether it is set to input or to output

Hi there I am new to NI,

 

I use the NI-USB-6001

I can setup the ports for input and output by using the examples in:

"...Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Digital\Read Values"  

DAQmxErrChk(DAQmxCreateDOChan(taskHandle, "Dev1/port0/line1", "", DAQmx_Val_ChanPerLine));

 

 

But how do I retrieve the information if a port or port pin is setup as an input or an output port.

 

 

0 Kudos
Message 1 of 2
(2,106 Views)

Hi, as far as I know there are no functions to retrieve configuration information of channels. A workaround could be naming the tasks according to the configurations, which can later in your application give you an idea wether it is an input/output. 

0 Kudos
Message 2 of 2
(1,916 Views)