Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Set outputdrivetype for DO to OpenCollector on PCIe-6251, C#

Solved!
Go to solution

I am using a PCIe-6251 to interface to a humidity and thermal sensor (SHT75). Following the specs, I can only drive the output low and then use a 10kOhm pullup resistor to drive the signal high. For this reason I want to set my outputDriveType to opencollector, but doing so results in an exception with error code -200452. It doesn't matter wether I try to set the drivetype to opencollector or active drive, both types causes the error.

I use C# with Daqmx 9.3 in VS2010 .Net4.0.

Since the card is M-series (as far as I can tell), it should support open collector output mode.

 

Example code:

 

Task myTask = new Task();
myTask.DOChannels.CreateChannel("Dev2/port0/line0", "", ChannelLineGrouping.OneChannelForEachLine);

myTask.DOChannels.All.OutputDriveType = DOOutputDriveType.OpenCollector;

 

Hope someone can help.

 

Best regards

Mikkel Engbo

0 Kudos
Message 1 of 5
(6,078 Views)

Hi Mikkel

 

Thank's for you post. The PCIe-6251 does unfortunatly not support open-collector since it is an Active Drive card (Push-Pull).

 

The PCIe-6251 is an M-series device. All E-,M- and X-series card are Push-Pull.

 

For a PCI application, that requires an Open-Collector Digital Output I would recommend to go with the PCI-6518.

https://www.ni.com/en-us/shop/model/pci-6518.html

 

To find the correct card you should look in the specifications for a card only listing "Digital Output: Sinking" and not "Digital Output: Sinking, Sourcing" or "Digital Output: Sourcing".

 

Let me know if you have any further questions, or feel free to call NI Denmark and ask for me.

 

 

Best Regards

Anders Rohde

Applications Engineer

National Instruments Denmark

0 Kudos
Message 2 of 5
(6,068 Views)

Thanks for your reply. I am sorry I have misunderstood the specifications.

I have read the KB you refer to and also the manual for the M-series which the KB links to: https://www.ni.com/docs/en-US/bundle/pci-pcie-pxi-pxie-usb-62xx-features/resource/m-series-user-manu... and found a line that said:

"True 5 V high current drive DO" in chapter 2, system overview - however under the Digital I/O chapter, I can find no mentioning of the digital output drive type.

Under products, the NI homepage states that the digital output  6251 can both sink and source. As I have understood it, sinking is the open collector term for pulling the wire to zero.

From Wikipedia:  "If 1 or more of the device outputs are in the ground (i.e., logic 0) state, they will sink current and pull the line voltage toward ground."

 

I am really interested in understanding the NI terminology, so I hope you can clarify the matter for me.

 

Best regards

Mikkel Engbo

0 Kudos
Message 3 of 5
(6,064 Views)

When you want the signal to go high, configure the DIO line on the PCIe-6251 as an input. Your external 10kOhm resister should then pull the line high.

0 Kudos
Message 4 of 5
(6,051 Views)
Solution
Accepted by topic author MikkelE

Hi Mikkel

 

I agree with you that the specifications can be a bit tricky to understand. I did already contact the web department about this for a similar case last week, and I hope it will be changed soon.

 

Regarding you post:

"Under products, the NI homepage states that the digital output  6251 can both sink and source."

 

-- This is not correct, but I agree with you that it is written confusing. The specifications states: Output current flow: "Sinking, Sourcing". The intention with this line is that the digital output both sources and sinks current, and the status of the digital output (on/off) will determine if it sources or sinks output.  In the off state it will supply a path to ground and in the on state it will supply Vcc. 

 

 

"As I have understood it, sinking is the open collector term for pulling the wire to zero."

 

-- This is correct sinking is the same as Open Collector, sourcing is the same as Line driver. "Sourcing, sinking" is the same as push-pull. You can read more about the difference in these 3 options in the following KnowledgeBase:

 

What is the Difference Between a Line Driver, Open Collector, and Push-Pull Quadrature Encoders and Which One Should I Use?

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MXOSA2&l=en-US

 

Feel free to give me a call on (+45) 45 76 26 00, if you would like me to explain these principles in details.

 

 

Best Regards

Anders Rohde

Applications Engineer

National Instruments Denmark

0 Kudos
Message 5 of 5
(6,042 Views)