FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

restart the application when network connection is restored

Hi,

I'm using a fp2000 module and i need to stop the application running on it if the communication between host and fp is lost and start running it again if the communication is restored.Anything you could tell me would be very helpful.

Thanks a lot,

Jose.
0 Kudos
Message 1 of 3
(3,296 Views)
You need to have two while loops inside another while loop. The first will loop until it can open a connection and the second will loop as long as the communication works without errors. We use a small buffer for the errors and that way, if there is only one error, the connection isn't terminated.
Also, try looking for "TCP" on the site and see what you can find.

___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(3,288 Views)
Put the rest of your code into a case structure and use a boolean variable from the communication code to control whether this case executes or not.

___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(3,285 Views)