Discussions au sujet des autres produits NI

annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

DAQmx Push Pull Mode under C# NET

I don't seem to find anywhere a solution to change the Digital Output to a Push-Pull Mode. Many message indicates this is possible, simply look the DAQmx manual.
The only thing I was able to find is the DOChannel.OutputDriveType property to select the type of Output I desire.... OK, but with which function do I use this property.... Don't seem to find anything valuable anywhere....
 
ex:
if (DaqSystem.Local.Devices.Length == 0) return;

            try
            {
                using (Task digitalWriteTask = new Task())
                {
                    //  Create an Digital Output channel and name it
                    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);
                  }
            }

So what function is required to change the output type of port2 ??
 

 
0 Compliments
Message 1 sur 4
3 160 Visites
Hello Fred.

Which board do you use?

I give you this link, I hope it will be helpful.


Regards.
0 Compliments
Message 2 sur 4
3 136 Visites

Hi,

could you give us the reference of your DAQ card?

You can access to this property with the "channel property" function. I don't have the DAQmx reference manual here to help you more.

Regards

Manuel R
AE dans une autre vie
0 Compliments
Message 3 sur 4
3 132 Visites

It's ok, I received a response.

Thanks a lot

Fred

 

 

 

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 Compliments
Message 4 sur 4
3 126 Visites