0
Fixed

6.3 version problem with S7 TCPIP

Adam Peter vor 2 Monaten in realvirtual.io Starter and Professional aktualisiert von p kowalczuk uae Vor 10 Stunden 8

Hi all! 

I am using the latest reavirtual. However, I am having problems with S7 TCPIP because the component displays "waiting to connect" and other error messages, and communication with S7-1200/1500 does not work, although it works with version 6.0.3. What could be the problem and what could be the solution? Thank you in advance for your hel

Antwort

Antwort
Fixed

Ah sorry, please check with this: S7Interface.cs

Wird überprüft

Hi, can you send us please your Unity log. This will help us for finding a solution.

Thanks a lot.

Thomas

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!

Geplant

OK thanks for reporting. We will check and put the solution into next release.

In the meantime here is the updated S7Interface script @Adam, maybe you could check - currently I have no live access to an S7:

s7interface

Image 1455

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

Antwort
Fixed

Ah sorry, please check with this: S7Interface.cs

Hi, when I try to run PLCsimAdvance and configure it, the same error appears as on SS and, the PLCSimAdvancedCoupler.exe download page does not exist.

Image 1458

Thank you, it's working now!