Open Lekysofar opened 5 months ago
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.
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](https://github.com/S7NetPlus/s7netplus/assets/161585245/c24c3a40-26a3-4b32-b7ce-29d4f358d668)
Thanks a lot.