06-24-2024 02:07 PM
Hello, I'm using the NI USB 6501 on Linux, with a custom driver. The driver talks to the NI USB device by writing up USB packets and sending over using PyUSB library. I now want to change the drive type of some pins from "open collector" to "active drive". Does anybody know what the USB packet template for that functionality is like? Thanks!
Solved! Go to Solution.
06-25-2024 11:59 AM
Okay after some Wireshark probing on windows using the LabVIEW program, I think I figured this out. This is the USB packet template for setting the IO mode and the drive type for each pin.
02 10 00 00 00 05 00 00 00 00 05 00 00 00 00 00
These three bytes are the mask for IO pins. A 0 bit means input and 1 bit means output. Those are for port 0, 1, 2 respectively.
02 10 00 00 00 05 00 00 00 00 05 00 00 00 00 00
And these are for setting the drive type. A 0 bit means open collector, and 1 bit means active drive.
02 10 00 00 00 05 00 00 00 00 05 00 00 00 00 00
07-10-2024 09:10 AM
Hey, I've tried using the custom driver but I'm getting connection timed out error. Do you have any idea why it may be?