I have noticed a bug in the 1.3 runtime. I have a library that calls in the ethernet library it seems that if this creates a client and it connects after about 10-15 seconds the PLC hardcrashes and reboots even resetting retain variables.
I noticed i can replicate the same issue without having any ethernet code at all by removing my sketch code completely and turn on the allow connect to PLC for IDE programming under the ethernet option. If i connect the the PLC with the IDE and do nothing at all with that option enabled it will do that same thing 10-30 seconds and hardcrash.
It seems something is really messed up with the current runtime and ethernet protocols.
Hi @zm1868179. I did not experience that type of issue on my side. My PLC only crashed when the mqtt object was instantiated. Does the PLC successfully connect to your network before it crashes? Are you using a static IP or DHCP? Are you transferring data over the ethernet connection yet, e.g. a webserver?
My suggestion is that you take it up with Arduino Support. They will have a look at your code and help you to isolate the bug. I have not had any connectivity issues at all since I peppered my sketch the mqttclient.stop() call. Your case sounds to be more complicated than mine since the PLC crashes even when you have no sketch running.
I may have to reach out to support as I can remove all sketch code and have no sketch code at all only have the programming modbus tcp enabled and I get the reboot issue but it doesn't appear unless I connect to the PLC via the IDE don't have to do anything just connect and wait and it will crash.
My PLC is using DHCP via the router it's connected to but it's assigned a static by the router I only have the issue on the latest runtime.
With my sketch code added and not having the programming over tcp enabled I get the same thing as soon as it starts tcp communication it will crash and reboot in just a few seconds.
If I roll back to 1.2 I don't have this issue at all with my code
I was actually having a very similar issue with the ethernet library. Worked with arduino support. After some debugging found that it was happening every 30 seconds. In order to resolve it, instead of just keeping the connection open, i opened and clsoed it before and after necessary communications were done.