Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Setting Digital Channels to Input or Output

Solved!
Go to solution

Which classes/methods in Measurement Studio NIDAQ-mx support allow me to programmatically set a digital channel for input or for output? The only methods I've come across provide lists of previously-configured i/o channels.

 

Thanks

0 Kudos
Message 1 of 4
(3,633 Views)
Solution
Accepted by topic author palley

If you are using a device that has bi-directional digital lines, then you don't have to specifically set a channel as input ot output. Use the DAQmxCreateDIChan or DAQmxCreateDOChan channel functions with the lines that you want to use. Automatically the line will be configured as Input or Output.

 

If the device doesn't support bidirectional digital lines, then you cannot set a input channel as output channel and viceversa.

 

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
Message 2 of 4
(3,614 Views)

Whoops! I was a little premature in labeling your response a fix.

 

I haven't found that method available to me from within Measurement Studio (8.1), at least not within the documentation for .NET(2.0).

 

I see that it is documented in the C-language documentation. How do I get access to it or is there another strategy from within the .NET environment?

 

Thanks.

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

You can use the CreateChannel method in NationalInstruments.DAQmx.DIChannelCollection.

 



palley wrote:

Whoops! I was a little premature in labeling your response a fix.



If you feel that issue is not yet solved, you can uncheck the accepted solutions tag. If you mark a thread as solved, there is a chance that others may not look at it and you problem will remain unsolved.

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 4 of 4
(3,577 Views)