06-30-2009 08:24 AM
I'm using viWrite and viRead in LabWindows to format a command string asking for data to write to a network analyzer over ethernet and read back the results. Once every several hundred occurances the device seems to get hung on the read, which times out. I wrote a 'while' loop around this and check on the viStatus to detect for the error and requery the device if needed.
However, when I run the program and the device times out on the viRead; if I'm running in debug mode it throws an exception bringing up a window asking whether I want to 'Debug' or 'Continue.' If pressing 'Debug' shows that it's the viRead command that hung with a timeout, and pressing 'Continue' lets the program loop, ask for more data, and continue successfully. But if I've configured the software for a 'Release' build, when the device times out the software throws an exception and the program crashes completely.
I just want my code to continue running, noting that there was a timeout and re-querying the hardware. Is there any way to tell VISA not to create the exception? I'm writing this program for techs to run, and they don't need to be asked to press the 'Continue' button whenever the device times out.
Thanks for the help.
Solved! Go to Solution.
07-01-2009 05:30 PM