Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6501 Configuration

Hello,
 
I am working on interfacing with a 6501 using C#.  The example code for writing digital outputs creates a task, then creates a channel, then creates a channel write, then actually writes to the port.  I have ran this code and it seems to work.  My question is, should there be a step in this process that configures the 6501?  I do not see anything that explicitly sets the pins to be outputs.  When using the test panel in MAX, you need to configure the pins.  Is there a way to do this in code?
 
Thanks
 
0 Kudos
Message 1 of 2
(3,436 Views)
Hi BStolt,

The configuration of the digital lines to be used as outputs takes place at the function call to create the channel.  In the WriteDigChan example, the call to
digitalWriteTask.DOChannels.CreateChannel(physicalChannelComboBox.Text,"",ChannelLineGrouping.OneChannelForAllLines);
is used to create the channel.  In this function call, all of the digital lines input by the user in the physicalChannelComboBox are the lines configured for digital output.

Regards,
Andrew W
National Instruments
0 Kudos
Message 2 of 2
(3,425 Views)