Closed ld-satori closed 3 years ago
You can leave the connection open, you just need to periodically send some sort of message. What I do is plc.get_plc_name()
every 30s or so (I think the timeout is pretty high, but forgetting exactly what it is) and that will keep the PLC from closing the connection.
@ottowayi thanks
Since the controller will drop the inactive connection after a period of idle time, I am wondering what is the best approach to keep pinging the controller and keep the connection long live. Will the following work? Thanks