
S7 Interface 100% CPU when no connection to PLC is available
How can we prevent a 100% CPU usage, when no plc is connected ?
My setup requires PLC to come in and out of the network, and every time the PLC goes out of the network, the CPU reaches 100% within 2 minutes.
Answer

Hi, this setup is not considered in the current implementation. We need to implement a non blocking reconnection method to the S7. We will implement it for the next release.

Would you be able to test if I am sending you a beta implementation of the new interface code? This would be very kind because at the moment I don't have a S7 here available on my table.

Ok will check this afternoon and send you here with a private message a new beta script.

I replaced the old script, but I have the same error. On first run of UnityScene, the S7 Interface component is being disabled. If I enabled it in run mode, that's when the cpu quickly winds up to 100% - I'm be no means an expert on this, but could it be that you need to implement IDisposable into S7Client, and wrap the "Client = new S7Client" like so: using(var Client = new S7Client), so that the garbage collector can take care of it ?

I think we need to check on your computer. Do you have a time slot tomorrow morning?
Customer support service by UserEcho
Ok will check this afternoon and send you here with a private message a new beta script.