06-26-2024 09:36 AM
My program is reading and writing data from SQL. When it is running on my laptop and I disconnect my laptop from the internet cable, it takes a few seconds to switch connection to Wifi, but my Labview program pops Error messages (which are built in with the perpose of showing what the problem is) and stops. The only way to run it again is to close the project and re-open it! Time consuming!
Is there a way to progrramatically tell the program to re-establish connection, once there is one, and continues running?
06-26-2024 09:45 AM
Hi Seli,
@LZD_Sydney wrote:
my Labview program pops Error messages (which are built in with the perpose of showing what the problem is) and stops. The only way to run it again is to close the project and re-open it!
As it is your program it is you who is responsible for its behaviour! Apparently your program does exactly what you have programmed to do…
Suggestion:
Instead of showing the error dialog and stop the program you should programmatically handle errors.
Something like:
IF TCP connection broken
THEN try to reconnect
06-26-2024 10:42 AM - edited 06-26-2024 10:43 AM
It seems you are not handing errors and relying on the automatic error handling instead.
(automatic error handling will popup an error for any function that has the error out unwired).
It should not stop unless you have it configured to stop on error, or press the "stop" button on the error popup. As Gerd already mentioned, you just need to handle the error. I assume that the local IP address changes when the connection is switched, so all connections need to be reestablished from scratch.