Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Program Interrupted by Various Errors

Hello,

 

I am running a VI that controls and monitors the flow rate and pressure of gas using 2 Bronkhorst Flow Meters and Pressure gauges, which all connect to a single USB port. The VI uses predefined Bronkhorst sub-VI's and works in the expected manner. However, the program is very frequently interrupted by 1 of 4 error messages:

 

Error -1073807298 (Possible reason: VISA: Could not perform operation because of I/O error)

Error -1073807246 (Possible reason: VISA: The resource is valid, but VISA cannot currently access it)

Error -1073807339 (Possible reason: VISA: Timeout expired before operation completed)

Error -1073807343 (Possible reason: VISA: Insufficient location information or the device or resource is not present in the system)

 

All of these errors appear under similar circumstances. As noted before, the program runs fine, except for frequent pauses for error messages, and continues to run fine after pressing continue on the error message box. I have searched for solutions for each of these 4 errors individually, and none seemed to hint at the problem with my system. One solution suggested that the wrong VISA resource was chosen, which is surely not the case. Another solution suggested that another application (e.g. HyperTerminal) was competing for the same port as my devices, but the errors persist after all applications except LabView after closed. Any help is greatly appreciated. I've attached the VI for reference. Also, I am running Labview Version 10.0.1 (32-bit).

 

Thanks,

Patrick

0 Kudos
Message 1 of 8
(4,832 Views)

A problem we see often with USB DAQ devices is that Windows likes to randomly turn off USB hubs as a "power saving feature".  You may be having the same issue here.  Go into the Windows Device Manager and make sure that is turned off for all of the USB hubs in your computer.


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
0 Kudos
Message 2 of 8
(4,829 Views)

Thanks for your speedy reply, crossrulz. Unfortunately, I tried this and the errors persist. This doesn't surprise me, since sometimes the error message will appear many times in rapid succession, sometimes up to 7 times in a row (i.e. I will press "continue" in the error message box and another error message box will pop up immediately after). This would be too short of a time span for the USB to lapse back into power-save mode.

0 Kudos
Message 3 of 8
(4,825 Views)

Looking at your code more closely, you have a race condition in there.  You are branching the VISA reference.  In the top branch, you are closing the reference.  If that top branch finishes before one of the other two branches, you will get an error like what you have been getting.

 

The simple fix is to move the initialization to before the loop and the closing after the loop.


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
0 Kudos
Message 4 of 8
(4,815 Views)

I tried that as well, using a sequence structure, but still get the same errors. I've attached the updated program.

0 Kudos
Message 5 of 8
(4,787 Views)

No.  You really should move the initialize and the close to be outside of the loop.  Hardware tends to not like constant connect-disconnect.  You only need to initialize one and close one.


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
0 Kudos
Message 6 of 8
(4,781 Views)
0 Kudos
Message 7 of 8
(4,758 Views)

My last thought is that you might be sending the unit too much data while it is still processing commands.  Try not forking the VISA reference and just have one long chain.


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
0 Kudos
Message 8 of 8
(4,756 Views)