06-20-2021 08:00 AM
I've used this code:
do_channel = task.do_channels.add_do_chan(lines, name_to_assign_to_lines, line_grouping)
do_channel.do_output_drive_type = DigitalDriveType.OPEN_COLLECTOR
The output still seems 5V or 0V. Does not seem like open collector. The device manual says that this mode is supported, so what am I doing wrong?
Solved! Go to Solution.
06-20-2021 11:23 AM - edited 06-20-2021 11:25 AM
It is because there is an onboard 4.7k pullup resistor to 5V as stated in the manual
If your next question would be whether there is a way to disable it - NO, unless you want to open up the device, identify these resistors and desolder them and risk other sorts of malfunction/damage to the device.
06-20-2021 06:02 PM
Thanks for quick response!
Actually, my question is how does this fit together with the fact the device has open collector output? If the output is forced to be pulled to 5V - what is the point really? If I want "real open collector" I'll need to use an external transistor. Not sure what purpose this serves?
06-20-2021 07:50 PM
Active drive configuration makes the DO function in 3.3V level whereas the open collector allows operating in 5V levels. This happens when the microcontroller/FPGA at the heart of the device has only 3.3V compatible DO whereas it can tolerate 5V level DI.
06-20-2021 07:55 PM
This device design has been targeted for 3.3V or 5V operation and not to cover all voltages levels.
Similar question on another thread,
https://forums.ni.com/t5/Digital-I-O/USB-6501-1-5V-Output-through-Open-Drain-Configuration/td-p/4106...
You could use something like this to convert the push-pull into true open collector output, https://www.ti.com/lit/ds/symlink/sn74lvc1g07.pdf?ts=1622567899185&ref_url=https%253A%252F%252Fwww.t...
06-27-2021 02:37 AM
OK now it is all clear. To be perfectly honest, if you review the code, usage of the open collector terminology is misleading. This is true in the sense that its the internal implementation of the two voltage levels available as output, however one usually assumes that this means that the output is itself open collectors - without the internal pullup. Knowing the internals is great, however the naming should really be different in code.
Thanks for your answer!