Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Active drive setting of NI USB 6501 on Linux

Solved!
Go to solution

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!

0 Kudos
Message 1 of 3
(218 Views)
Solution
Accepted by szzzh

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

 

0 Kudos
Message 2 of 3
(191 Views)

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?

0 Kudos
Message 3 of 3
(153 Views)