05-23-2012 11:33 AM
Hi,
I am a newbie to LabView and have been trying to fix up a VI that uses a wireless XBee module to collect and plot data from a portable wind turbine every 5 seconds (I didn’t write it, just trying to fix it). The XBee is connected by a virtual COM port to the computer. Under normal operating conditions, the program works perfectly. However, there are a few situations where the program ceases to work. Problems start to arise when either:
If either of these happens, I get the following error:
Error -1073807339 occurred at VISA Read in MWEL_Simple_rev4.vi
VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost.
If I stop and re-run the VI, I then get:
Error -1073807194 occurred at Property Node (arg 😎 in VISA Configure Serial Port (Instr).vi->MWEL_Simple_rev4.vi
VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost.
I have currently been fixing this problem by closing LabView then disabling and re-enabling the COM port using the device manager.
After doing a bit of reading (most of which is over my head), I believe that the error occurs because the VISA isn’t being closed properly. If this is the case, how can I go about closing the VISA properly? Is there a way to check if the signal is coming in before attempting to read it? Any advice on this problem or tips on using LabView would be much appreciated.
If you have any questions about the setup, I will do my best to answer them.
Thanks in advance,
Ethan
Using LabView 2009 and Windows 7
05-23-2012 11:57 AM
The first problem is easiest to solve - don't let the computer go to sleep.
05-24-2012 02:18 PM
Hi metrooo,
I would suggest that you open up LabVIEW and go to Tools>Options then under the Environment Category place a checkmark in the Automatically close VISA sessions. This will close any sessions that are open when LabVIEW is exited.
DylanC