Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnecting to S71500 after network broken #525

Open
Lekysofar opened this issue Feb 28, 2024 · 1 comment
Open

Reconnecting to S71500 after network broken #525

Lekysofar opened this issue Feb 28, 2024 · 1 comment

Comments

@Lekysofar
Copy link

Lekysofar commented Feb 28, 2024

Hi Guys,

I met a problem to re-connect to S71500 after simulating unplug net cable.
what I do is to close the connection, wait for few seconds, then open a connection, wait for 10 senconds to check the connection is open or not. will repeat the process of close, wait, open, check try to rebulid the connection.

However the connection could not be established, the worse is that connection instance is increasing to 98.

Any suggestion on my issue?
Untitled

Thanks a lot.

@Ced-90
Copy link

Ced-90 commented May 30, 2024

Hi all,

I add a similar issue because of power outage on my network device with a program which was continuously reading/writing on a PLC (S7-1500). Once the network was reestablished, I could read my PLC but can not write on it and had no error coming back to me.

I had to close and launch again my program.

From my testing, plc.close() or recreating a new plc did not work to get the connection working again after a network crash simulated by unplugging the RJ45 during more than 30s.

A solution I found is to create a new plc before closing the damaged one.

Plc Working_PLC = new Plc(CPU, IP, rack, slot);

//{… do stuff … }

//{ network crash _ Working_PLC not writing data anymore _ need to reestablish connection}

Plc PLC_buffer = new Plc(CPU, IP, rack, slot);

Working_PLC.Close();

Thread.Sleep(10);

Working_PLC = PLC_buffer;

Depending the application, I either detect the crash by controlling the writed value on the PLC or I recreate a connection at a given time interval, just in case.

It’s probably not the best solution, but it’s working enough for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants