Showing results for 
Search instead for 
Did you mean: 

Connection error causing LabVIEW to crash/freeze

I've created a VI that connects to multiple instruments and saves the data from the instruments. Recently there have been problems arising with one of the instruments, a Newton's 4th power analyzer PPA510. The specific cause of the problem is unknown but the end result is an error with code -1073807194 (Hex 0xBFFF00A6) The connection for the given session has been lost. This error has happened both near the beginning of collecting data from the instrument and in the middle. When this happens and Newton's 4th is the only instrument that is connected LabVIEW runs properly with the control I added to stop the VI if an error occurs.


When this happens and there are multiple instruments that are connected besides the Newton's 4th, LabVIEW stops responding. The indicator light I added shows that there is an error and the data collection stops (shown by the graphs no longer updating) but the VI doesn't stop. Even trying to Abort the VI does not work. LabVIEW then continues to not respond even after letting it run for a while and I eventually force it to close via the task manager. A window then pops up saying that it is trying to reset the VI that was just forced close. Even after waiting 30 minutes this fails and stops responding. The next time LabVIEW is opened, when trying to trying to select the COM Port for the VISA session, LabVIEW freezes and says that it is "Not Responding." This continuously happens no matter how many times LabVIEW is restarted. The only way that has been found to fix it is to completely restart the computer. 


I'm trying to figure out a way to stop LabVIEW from crashing when multiple instruments are connected or to fix the connection error within the code. I don't think that there is an error in the code itself causing this because I have been using this code for weeks already to collect data from the Newton's 4th both by itself and with multiple instruments. 



-The Newton's 4th has 2 methods to collect data through a computer, datalog and multilog. The method I am using is multilog. 

-Other instruments which I have used simultaneously with the Newton's 4th include: Extech 4-Channel Temperature meter SDL200, Extech Differential Pressure Manometer HD 750, Mark-10 Force Gauge BG 200, and Clarke-Hess 2335A Wideband power analyzer. 

0 Kudos
Message 1 of 5

How is the PPA510 and others instruments communicating with the PC?  What operating system are you using?    


It looks like the PPA510 has RS232 and USB options.  RS232 shouldn't loose a connection once established, but I've had issues with USB ports on some PCs with Windows 7/8/10.  


In newer windows versions there's a power saving options that allows USB ports to go into a low power mode, I've found that going into low power mode the VISA sessions gets dropped and the instrument stop responding often with odd errors. 


If that's your problem the solution is to change the power saving plan to "always on", and also make sure that the USB power saving mode is disabled.



Hope this helps..easier than writing code to catch a instrument dropping out.

0 Kudos
Message 2 of 5

The PPA 510 is connected via USB (USB type A to type B cable). The other instruments connect via either a RS-232 to USB cable or a USB type A to mini. I've never had connection issues with any of the other instruments. 

The operating system is Windows 7 64-bit with LabVIEW 2016. 


0 Kudos
Message 3 of 5

As a first step, even if you don't want to try switching the power settings, switch the PPA510 USB port with one of the other instruments and see if you now have the problem with that instrument instead.  I found it was USB port specific, not instrument specific.

0 Kudos
Message 4 of 5

Since the code is buggy, post  a zipped up version for us to review. (no harm since whow ants to steal buggy code?).


Tell us what is the top-level VI and someone may take a loo and help out.


Now if you do not post the code we will have to do a lot of wild speculating and play the game of 50 guesses.


I will start out.


There is a timeout that is being violated when you use multiple instruments. When running just one, your code is getting back to the instrument regularly and no time out.


So either increase the timeout (if possible) OR move to a multiple producer single consumer architecture and separate the code for each instrument into unique loops.


Offering what I can with no real idea what I am talking about.



Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 5