LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

internet interruptions stops LabView program!

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?

Seli6272@D
0 Kudos
Message 1 of 3
(279 Views)

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
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(272 Views)

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.

0 Kudos
Message 3 of 3
(239 Views)