05-08-2015 10:53 AM
Hi all,
I have an HP E3631A connected to my computer using an RS232 to USB adapter and controlled with a Labview VI (see attached). When the VI is started it controls the power supply nicely, but after a while (ranges from use to use, approximately 40 minutes or so) labview loses connection and no longer controls the supply. When I try to stop the VI, labview freezes. When I try to close labview, a message of "Resetting VI: ... " shows on the screen. I have used the same adapter and power supply on another computer and didn't experience this issue. I have also adjusted the USB power options to disable the "selective suspend setting". Any other thoughts on what the problem might be? Thanks in advance.
05-11-2015 10:29 AM
What version of LabVIEW are you seeing this behavior in? What version of the VISA drivers are you using? Are there any key differences between the computer that worked with this setup and the one that you are seeing this behavior in?
Additionally, is this a continuous hanging or does it occur sporadically? If it is a continuous problem, is it occuring at a certain process in your VI?
05-11-2015 10:50 AM - edited 05-11-2015 10:51 AM
Are you using a USB to Serial adaptor with a PROLIFIC chipset?
Chances are it is counterfeit. The newer Prolific drivers can detect the counterfeit chipsets and will exhibit this exact behavior.
I fought this exact same issue a year or so ago.
The only thing you can really do is switch to a built-in serial port, or if you must use a USB to Serial adaptor get one that has the FTDI chipset in it.
05-11-2015 03:51 PM - edited 05-11-2015 04:03 PM
Thanks for the tip. The adapter does have a PROLIFIC chipset, so this could be the issue (I got the adapter from Amazon early in 2013).
05-11-2015 03:56 PM
The computer with the problem is using Labview 2014/VISA version 14.0.1, while the one with no issues uses Labview 2012/VISA 14.0. I checked that the USB/RS232 adapter drivers were the same (and they are). Other than that there aren't many significant differences in the computers. Both have i5 or i7 processors and 8GB of RAM.
The disconnection is conntiuous. I'm not sure if it occurs at a particular process seeing as though the VI runs for 40 minutes or an hour before the problem presents itself.
05-11-2015 07:08 PM
If it's not the USB to Serial adaptor then I hate to say it but your code is a mess.
You really need to break it down in to steps and use a logical program architecture like a state machine that would be easy to troubleshoot.
One big loop is never a good idea.