Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

Comm port not detected by VISA / MAX after attached device power cycle

Go to solution

I have a device communicating via virtual comm port over USB. The device and labview program both work fine, most of the time. The program is designed to auto-connect to the attached hardware. This works perfectly when i unplug and reconnect the USB cable.

However, if the device gets power cycled whilst the USB cable is attached and the program/vi is running things go wrong. The device enters a bootloader phase for a few seconds on power up, if labview attempts to query the comm port during this phase the comm port is then corrupted in some manner and no longer recognised by VISA / NI MAX. However, all other programs, hyperterminal, device manager etc can see and communicate with the port once the bootloader has finished. To get Labview / NI MAX to see the port again i have to physically unplug the USB cable. The program does not need to be restarted to detect the comm port again, And, infact, restarting labview or my compiled program does not fix the issue. Only physically unplugging the USB port allows VISA / NI MAX to see the port is connected.

It looks to me like a problem with VISA where somehow if a device isn't properly identified by VISA on the first attempt it just ignores the port exists until an physical intervention. Is there a way to force VISA to fully re-evaluate all connected comm ports?

0 Kudos
Message 1 of 4
Accepted by topic author MJanus

Hello MJanus,


As far as I know most virtual com ports aren't fully supported by VISA so some quirks in its operation are to be expected:


Officially we don't support the use of virtual com ports, so unfortunately the functionality you have now is probably as good as you're going to be able to get with this setup. I realise it's not the answer you were hoping to hear and I apologise for the inconvenience, but it's not really possible for VISA to work well with all virtual com port software due to the wide variety of products available.



Jake A

Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 4

Dear Jake A,


Thanks for the answer. You are right, it is not the answer i was hoping for. But at least now i know to give up trying to come up with a solution. It would however be nice if there was a VISA refresh API so one could force an update.




0 Kudos
Message 3 of 4

Having the same problem.  Are there any workarounds?  National Instruments VISA seems to butcher virtual COM ports bad especially plug-n-play.  I have a program written in C# (.NET) that actually works EVERY time.  I would expect the same from the experts at National Instruments. 


I would like to have a LabVIEW program that ACTUALLY works... any suggestions??

0 Kudos
Message 4 of 4