11-06-2015 07:03 AM
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?
Solved! Go to Solution.
11-09-2015 08:09 AM - edited 11-09-2015 08:09 AM
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: http://digital.ni.com/public.nsf/allkb/6E1922B526572CB8862571AA00544057?OpenDocument
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.
11-16-2015 02:16 AM
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.
09-13-2021 06:42 PM - edited 09-13-2021 06:48 PM
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??