LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visa interrupted by usb

Hello,

I have a problem with visa and I would appreciate some help. I am using a Serial to USB cable to connect a serial input to my program and I just noticed a bug. When my Serial Vi is running getting the information that is supposed to get,  I plugged a Flash Drive to my computer and pulled it before it could load since I had forgotten something(I know I am not supposed to do this but the operator might and I need to find a solution) however, I noticed that my serial communications stopped working and would not come back until I reconfigured the port. Is there a way to isolate my usb ports so that this does not happen?  

0 Kudos
Message 1 of 4
(2,634 Views)
I think it's OS-related. Probably not much you can do about it.
Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 4
(2,621 Views)

This might be off the wall, but I had a situation about a year ago where my usb port would suddenly get remapped to a new port number, causing MAX to launch another instances. Here is a fairly lengthy discussion, not sure it it helps, but I suggest reading it through, it evolves as I tried stuff.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 4
(2,611 Views)

Hi,

 

One thing to remember with USB communication is that USB is also a serial line so two ports on the same usb bus can interfere with each other.  This sounds like what is happening when you unplugged the USB drive.  The interactions on this bus is something that is handled by the OS.  Consequently, this is not something that LabVIEW can isolate.  However, one option that you could use in your program is to check for a specific error code related to the unresponsive serial communication, then in a case structure reconfigure the port, clear the error, and continue.  I know this is not the ideal behavior, but it will allow your program to continue running, without you having to manually stop and restart it.

Shelby S
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(2,579 Views)