Your comments

Thank you, it's working now!

Image 1455

S7 connection failed. I'm getting this error. I'm using the code you sent me.

Hi Thomas,

I was able to resolve the issue in the meantime.

The problem was related to the connection/reconnection logic inside the S7Interface script (Unity 6.3 + realvirtual 6.3).

Specifically, there was a mismatch between the old Time.time-based reconnect handling and the newer async DateTime-based logic.

Because of this, the interface continuously reset its internal state, which resulted in a permanent "Waiting to connect..." status and no communication cycle starting.

Fix (summary):

Removed or adjusted the old reconnect logic using Time.time (_lastreconnect)

Used only the new DateTime-based reconnect handling (_lastReconnectTime)

Prevented the connection state from being reset in FixedUpdate()

Ensured that the async connection (ConnectS7Async) can complete without being interrupted

After this change:

Connection establishes correctly

Thread cycle starts normally

Communication with the PLC works again

So the issue seems to be caused by a state handling conflict in the current version.

Thanks for your support!