04-09-2017 11:41 AM
How Do I Control My USB Device from Another Computer?
04-09-2017 11:59 AM
Hi Jeff,
simple solution: plug this USB device into the other computer…
Other solution: use some kind of "server application" to handle your "USB device". Use a client application o your other computer to communicate with your server app…
04-09-2017 05:59 PM
To paraphrase GerdW (who is much too nice to say this), You Ask a Vague Question, You Get a Vague Answer.
It would help to know (a) what "USB Instrument" you mean, (b) what you want to "control" with it, and (c) (and most important) the LabVIEW code (meaning the VIs themselves, not pictures of parts of the Block Diagram) that you are trying to use to do what you want to do.
Bob Schor
04-10-2017 11:56 AM
Ok I'll rephrase the question.
I have a USB device NI USB-6525 plugged in NI PXI chassis 1.
PXI chassis 1 and PXI chassis 2 are connected vie ENET.
I want to control the USB device from either PXI chassis 1 or PXI chassis 2, not at the same time.
I can see the device in MAX on PXi chassis 1 but not on PXI chassis 2.
I can control the USB device using NI DAQmx commands/session application I created in labview on PXi chassis 1
How do I get the USB device resource to show up in max on the PXI chassis 2 so I can select the devices resource in the PXI chassis 2 labview application?
04-10-2017 03:23 PM - edited 04-10-2017 03:24 PM
Hi Jeff,
Ok I'll rephrase the question.
The answer stays the same: create a server-client architecture to forward "USB device" data to your 2nd PXI system.
How do I get the USB device resource to show up in max on the PXI chassis 2 so I can select the devices resource in the PXI chassis 2 labview application?
You will not see this USB device using MAX on your 2nd PXI system. USB devices are handled "locally": when it is connected to PXI1 then MAX on PXI1 will see it!
Possible workaround: there are USB-to-LAN bridges available. Use such a bridge to connect your usb device to your LAN network. Then both PXI system could be able to see your device - when you get a device driver for this USB bridge able to be installed on your PXI systems…
04-17-2017 08:46 AM
Thanks for the suggestion, but I'm looking for a software solution.
04-17-2017 04:53 PM
Since you are looking for a software-only solution, where the USB device will always be plugged into PXI1, for example, then all of the code for interacting with the hardware (that is, the DAQmx commands) need to reside on PXI1, as this is (by your requirement) the only PXI that can "see" the USB device.
If your Host program is running via PXI1, you just communicate with the PXI however you like (I am partial to Network Streams), let the PXI "do its thing" with the USB hardware, and you're done. If your Host program is running via PXI2, you communicate with PXI2, it communicates with PXI1, PXI1 talks to the USB, passes data back to PXI2, which passes data back to the Host. Certainly do-able, but a few more hoops through which to jump.
Otherwise, you can pursue a Hardware Solution that would enable your single USB device to be (potentially) seen by both PXIs. I've not used such hardware, myself, but it does seem like a cleaner path ...
Bob Schor
04-18-2017 01:42 AM - edited 04-18-2017 01:44 AM
Hi,
I've not used such hardware, myself, but it does seem like a cleaner path ...
To provide more information:
- you need drivers for that hardware solution (I'm talking about the USB-LAN-Bridge) able to run on your host computer. I'm not sure you will find hardware for your PXI system. (Do they run using a standard WindowsOS?)
- When you get the needed drivers: you have a shared resource then! You cannot try to access the very same USB device from two different computers! (You might try this, but most often this results in other problems. :)) Either your USB device might get confused because of irritating commands issued by two different computers - or the USB-LAN-Bridge might block concurrent access to the device from two different clients… After all: it's a SHARED RESOURCE!
04-18-2017 09:06 AM
I am using a NI PXI chassis and controller with windows 7 OS
The idea is not to have two computers communicate with the USB device at the same time, only one of the computers will be communicating with the USB device at the time.
I have a test system that contains two PXI chassis with individual controllers. the pxi chasses are installed in different 19" rack located 10's of feed away. I wanted to write one piece of software application that would handle the both racks of equipment.
I can communicate with every other type of instrument in both racks (PXI and enet) except for USB devices...The PXI and ENET both use VISA calls, where the USB does not and hence It is the only device that cannot be added to MAX VIA Remote systems
04-18-2017 09:28 AM