07-13-2009 12:55 PM
Is it possible to control individual USB pins in LabVIEW? I know all of the built in VIs are higher level, but I was wondering if anyone had written anything that could do individual pin control.
07-14-2009 03:52 PM
Hi Quantum Code Monkey,
There are no low-level VIs in LabVIEW or the VISA driver that would give you the capability to do this. All of the built in VIs work within the USB protocol. To do this, you would essentially have to write your own driver that manipulates the underlying Windows USB interface.
Regards,
Stephen S.
07-14-2009 04:14 PM
08-03-2009 08:30 AM - edited 08-03-2009 08:31 AM
Question along similar lines:
I need to build a simple switching circuit that can be controlled by labview. Basically, the external system that I'm dealing with turns on and off with a two way switch, with ground to pin 1 being on and ground to pin to being off. I was figuring I'd be able to manufacture a custom USB cable for this and feed directly into labVIEW 8.5, but it's sounding like that's not possible. The building of a custom driver sounds a bit unreasonable... Are there any external hardware devices that could be easily used towards this purpose? What are my options?
08-03-2009 08:37 AM
Stephen_S. wrote:Hi Quantum Code Monkey,
There are no low-level VIs in LabVIEW or the VISA driver that would give you the capability to do this. All of the built in VIs work within the USB protocol. To do this, you would essentially have to write your own driver that manipulates the underlying Windows USB interface.
Regards,
Stephen S.
I don't think this is correct.
AFAIK......
It is normally impossible to directly control the pins of a USB port. The USB host controller normally controls the lines of the port. The state of individual lines at any given time is not known to the OS, nor is it neccessary. USB != RS232.
The host controller, provided with a message to send and a target and communication mode generally takes care of the rest itself. The actual bits and bytes of the communication is completely offloaded to the host controller chip and is unavailable for manipulation.
Shane.
08-03-2009
09:12 AM
- last edited on
03-15-2025
07:53 PM
by
Content Cleaner
Chainley -
There are devices that will let you do something like this. One that I have used before is the NI USB 6501
It's under $100 and depending on what you want to do with it, you may be able to just run it using the included software.