Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual COM Port Driver stops working

Hi, I am having problems with NI-VISA (Ver 18.0) and the CP210x SI-LABS VCP (virtual COM port) driver ver. 10.1.9 in a LabVIEW 2018 application. The application receives serial data from two contamination monitors over USB via two virtual COM ports. The app typically works fine for several days, but eventually one of the the COM ports stops returning data. I see that when this happens, in NI-MAX, under Devices and Interfaces, in the Setting pane for the COM ports, the Port Description field is set to Unknown (when working correctly it displays the name of the driver). The COM ports still show up in Windows Device Manager. The only way I’ve found to restore the drivers to working order is to re-start the computer, as restarting the app (.exe) won't fix it.

 

Wondering that I might be corrupting the driver by setting some parameters that might not be supported, I pared the property nodes for opening the COM ports down to Baud, Data Bits, Parity and Stop Bits, however this did not fix the problem. I am not writing to the port. The program uses a VISA Read vi in a loop, where the Byte Count input is set to Bytes at port to receive a message of 80 or so bytes sent out every 20 seconds. 

.

Has anyone else run into to this or know what might be causing this?  Would updating to VISA 20.0 help?  Thanks for any help on this!

0 Kudos
Message 1 of 10
(4,595 Views)

The first thing I would do is go into the Device Manager and to the properties of the USB hubs.  There is a power management setting that allows Windows to "save power" by seemingly turn of a USB hub.  Turn that off.  To go further, in the Power Options, go into the Advanced Power Settings.  There is an option in there called "USB selective suspend setting".  Disable that in all cases.

 

So my thought here is that Windows is somewhat randomly deciding to save power and therefore causing the COM port to reset.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 10
(4,551 Views)

Ahhh, yes, that makes sense, I will try that. Thanks!

0 Kudos
Message 3 of 10
(4,545 Views)

I  changed the Windows advanced power settings to disable USB Selective Suspend Setting, but a week later the COM port problem returned. After exiting the program, in NI-MAX I found the following below. After pressing F5 to refresh, the Device Status returned to normal and I was able to run the program without issue. I still don't know the reason for this, are there any ideas? Is there a way to detect and recover from this programmatically?MaxScn.png 

0 Kudos
Message 4 of 10
(4,471 Views)

How many tomes do you a port open? You only need one open at the beginning for each port and one close port when the program stops.

It has been noticed that too many open and closes cause problems.

greetings from the Netherlands
Message 5 of 10
(4,457 Views)

Hi Albert, We open the port and keep it open and then close it before the program exits. Sometimes we have to turn off and turn on the power to the device we are receiving data from, as it could be unsafe to leave it on all the time. Thank you for your good suggestion!

0 Kudos
Message 6 of 10
(4,453 Views)

Apparently there are still some issues with SiLabs VCP drivers on some win10 versions

https://silabs-prod.adobecqms.net/community/interface/forum.topic.html/cp210x_driver_issuewithwindow...

(some earlier driver versions had problems too e.g. https://www.silabs.com/community/interface/forum.topic.html/cp210x_driver_v101-91Gl).

You might try an usb-serial converter based on FTDI chips (I'm using several of those, so far I did not have problems under win10). 

0 Kudos
Message 7 of 10
(4,427 Views)

@paw510 wrote:

Apparently there are still some issues with SiLabs VCP drivers on some win10 versions

https://silabs-prod.adobecqms.net/community/interface/forum.topic.html/cp210x_driver_issuewithwindow...

(some earlier driver versions had problems too e.g. https://www.silabs.com/community/interface/forum.topic.html/cp210x_driver_v101-91Gl).

You might try an usb-serial converter based on FTDI chips (I'm using several of those, so far I did not have problems under win10). 


I am personally a big fan of StarTech.  I have had a TON of success with their ICUSB2324x, which is an industrial grade 4 port serial hub based on a TI chipset.  But if going really cheap, I have also had success with a TRENDnet TU-S9, which uses Prolific chipset.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 10
(4,421 Views)

But if going really cheap, I have also had success with a TRENDnet TU-S9, which uses Prolific chipset.

And yes, I forgot Prolific.  Actually I'm also using this converter

https://docs.rs-online.com/fb50/0900766b81587a69.pdf

based on the PL2303 chipset.  It was sometimes running (under win10)  for months with 24/24 acquisition, a reading every second or so, without any problems so far. (I wasn't using Visa though).

 

Message 9 of 10
(4,413 Views)

Thanks for the tips.  I wish I had a choice of hardware, but unfortunately our external device (Eaton CCT01 Contamination Monitor) is USB based, so there is no converter to swap out. I'll check the Windows 10 version number - Hopefully, if there is a known compatibility issue with the driver, SiLabs will be able to correct it in the next release. 

0 Kudos
Message 10 of 10
(4,401 Views)