Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx DOChannel.OutputDriveType Push-pull Mode

I simply don't understand how to change the setting of the port to Active Drive or to Open Collector.
Where does the DOChannel.OutputDriveType is applied in this simple creation of a writen task ?
 
 
 
if (DaqSystem.Local.Devices.Length == 0) return;

            try
            {
                using (Task digitalWriteTask = new Task())
                {
                    //  Create an Digital Output channel and name it
                    //digitalWriteTask.DOChannels.CreateChannel("Dev1/port2/line3", "TimeOutWhite", ChannelLineGrouping.OneChannelForEachLine);
                    sLine = string.Format("{0}/{1}/{2}", sNameDevice, "port2", "line3");
                    digitalWriteTask.DOChannels.CreateChannel(
                        sLine,
                        "TimeOutWhite",
                        ChannelLineGrouping.OneChannelForEachLine
                        );
      DigitalSingleChannelWriter writer = new DigitalSingleChannelWriter(digitalWriteTask.Stream);
             writer.WriteSingleSampleSingleLine(true, !boAff);
                  }
            }
0 Kudos
Message 1 of 2
(4,396 Views)
Hi Fred1204,

The OutputDriveType is a property, so you have to set

digitalWriteTask.DOChannels.All.OutputDriveType = DOOutputDriveType.ActiveDrive;
or
digitalWriteTask.DOChannels.All.OutputDriveType = DOOutputDriveType.OpenCollector;

The output drive type of the NI-USB 6008 is always open-drain and cannot be changed to push-pull.
Please don't hesitate to get in contact with me by responding to this post

Best regards

Benjamin
0 Kudos
Message 2 of 2
(4,381 Views)