01-16-2023 11:44 AM
Hi NI team,
We're having difficulty with USB-6501 and the software and hoping you can help. Our system has:
1. DELL Windows 10 Enterprise x64 computer
2. 2 NI USB-6501 in our test fixture hooked up to the Win10 computer via the included USB cables, and a relay driver IC on the DIOs
3. NI MAX Version 2022 Q3 with NI DAQmx
4. Python 3.10 and nidaqmx 0.6.5 from https://pypi.org/project/nidaqmx/
This page, https://www.ni.com/docs/en-US/bundle/usb-6501-feature/page/digital-output.html, says two things:
1. "The default configuration of the NI USB-6501 DIO ports is open collector, allowing 5 V operation, with an onboard 4.7 kΩ pull-up resistor."
2. "Additionally, you can configure the DIO ports as active drive. When configured as active drive, the total current sourced by all DO lines simultaneously should not exceed 65 mA."
This page, https://www.ni.com/docs/en-US/bundle/usb-6501-specs/page/specs.html, says:
Output driver type
Active drive (push-pull) or open collector (open-drain), software selectable
Since Active Drive is configurable and software selectable, how does one toggle between both (we want to know how to change to either mode any time we need) Active Drive and Open Collector in:
1. NI MAX
a. So we can always do it manually, as needed. We don't see any option in the Test Panel. Right-clicking in the Device Tree has no Configure option.
2. Python nidadmx package
a. We're confused by the API. It doesn't tell you what the full line(s) of code should look like https://nidaqmx-python.readthedocs.io/en/latest/do_channel.html#nidaqmx._task_modules.channels.do_ch...
b. Can you provide a full code example to configure the DAQs' drive type? We tried this and it doesn't work (and we'll need all Ports and Lines later):
01-16-2023 02:31 PM
The mistake is that you're treating a 'property' as a 'method'
import nidaqmx from nidaqmx.constants import DigitalDriveType with nidaqmx.Task() as task_dev1_all, nidaqmx.Task() as task_dev2_all: task_dev1_all.do_channels.add_do_chan("Dev1/port0/line0:7") task_dev1_all.do_channels.do_output_drive_type = DigitalDriveType.ACTIVE_DRIVE task_dev2_all.do_channels.add_do_chan("Dev2/port0/line0:7") task_dev2_all.do_channels.do_output_drive_type = DigitalDriveType.ACTIVE_DRIVE
01-17-2023 10:46 AM
Thanks, santo_13. The code executes without crashing, but no change occurs to the DAQ. We put a voltmeter on the DAQ pins, which still show high output above 3.3 V (so still Open Collector pulled to 5 V) when we toggle them high via NI MAX (which doesn't show any option to configure drive type). Is there something missing?
01-17-2023 12:20 PM
With a fresh-out-of-the-box USB-6501 we tried this (stepping through to observe the changes on a voltmeter) and it only changed one port0 line 0 to high open collector. The same thing happens with our original 2 DAQs.
01-19-2023 08:02 PM
It is weird that the settings reflect on only one line. Do you have the means to try the same on .NET or LabVIEW?
01-24-2023 03:23 PM
.NET or LabVIEW? Not at this time, and our project requires things to run in Python.
01-24-2023 10:28 PM
What was your load current?
Spec guarantees 2V with up to 7.5/8.5mA load.
01-25-2023 11:24 AM
This occurred even with no load on the "fresh" DAQ after having run that code above. The actual voltages vary wildly across different lines & ports. Have you been able to run the Python code and observe proper drive & voltage performance with the same model of DAQ?
01-25-2023 02:51 PM - edited 01-25-2023 02:52 PM
Unfortunately, I don't have the hardware to try it out. I am guiding you based on my experience with several other DAQ devices.
If you believe your device is not performing to its specifications, you could raise a support ticket with NI to get it repaired/replaced.