Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I stop a VISA Serial Read timeout error dialog box from halting my program?

Sometimes while using VISA serial read functions I get a timeout error different from the usual error code. I get a pop up window dialog box telling there has been a timeout and asking if I want to continue or stop. While this dialog box is open my LabVIEW program is suspended. I've tried increasing the timeout value. How do I prevent these pop-up messages?
0 Kudos
Message 1 of 5
(4,900 Views)
You can go to Tools>Options>New and Changed in LabVIEW 7.x and uncheck the Enable automatic error handling dialogs. This won't remove the fact that you are actually getting an error and you should have some form of error handling in the program. What is the exact error code that you see? Normally a timeout eror occurs when you don't read any data at all or the number of bytes available does not match what you specify. Do you get anything when you get the error or is the message shorted than you expect? To avoid the latter, you can use VISA Bytes at Serial port to determine exactly how many bytes to read or if the instrument sends a termination character at the end of the data, make sure you have term character enabled when you call VISA Configure Serial Port.
Message 2 of 5
(4,897 Views)
I am communicating serially with a Julabo FP50-HE oil bath. Usually when I have tried to read when the unit isn't responding I get a specific error code (-1073807339) from the VISA Serial Read function that I can see (and deal with) in the error out cluster. But sometimes I get a pop up window that simply declares that the serial port has timed out and presents two buttons: Continue and Stop. There is no error code. Thank you for your suggestion about unchecking the Enable Automatic Error handling. I will try this.
0 Kudos
Message 3 of 5
(4,888 Views)
Thank you! I beat my head against the wall for days on this. I knew how to do it once upon a time and just forgot the proceedure. Thank you!
0 Kudos
Message 4 of 5
(4,525 Views)
don't forget to check the bytes on serial port in case there are no bytes you don't have to call read VISA
greetings from the Netherlands
0 Kudos
Message 5 of 5
(4,512 Views)