03-28-2016 10:23 AM
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
03-28-2016 10:51 AM
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.
03-28-2016 11:16 AM
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.
03-28-2016 11:40 AM
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.
03-29-2016 03:25 AM
I tried that as well, using a sequence structure, but still get the same errors. I've attached the updated program.
03-29-2016 04:36 AM
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.
03-30-2016 04:36 AM
This also did not resolve the issue.
03-30-2016 05:06 AM
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.