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
[Bug]: S7 connection problem #1593
Comments
Hello, Just to discard If it is an S7-300, it should be String url = "s7://XXX.XXX.XXX.XXX.:102?remote-rack=0&remote-slot=2"; So, Are you using NetToPLCSim or something similar? I say it because of the IP address is a local PC. Regards, |
Hello César José García León, thank you for looking into the problem and responding. We have three real S7 PLCs in our test lab:: S7-1200, S7-1515, S7-1516 Here is my current test code:
Log output with version 0.11.0 => works and looks good
Log output with version 0.12.0 (I have removed the content of DEBUGDOOM because I don't know what is in there)
|
I'm facing the same Exceptions, but the connections working fine. I'm able to read and write data as well as getting notifications. |
Hi mrwhy-orig, thank you for your comment. Can you also take a look at the connection status after the connection has been established. Is it connected in your case? Which PLC version do you use? |
Hello, This exception is generated internally by Netty when initiating the connection and should not affect the general operation of the driver. Greetings, |
Hello glcj, you are right it is possible to perform read requests with the connection. I have not tested other operations but mrwhy-orig commented that it is possible. I also mentioned in the issue description that the connection requests seem to work.
My problem is that when I call plcConnection.isConnected() it is always false in version 0.12.0. I'm not sure about following log but it says that more then one exception was raised.
The second problem is the log: I have tried to change the log level of PLC4X and netty to ERROR but the DEBUGDOOM stuff is still present in the log. It seems that in my case there is no good workaround with version 0.12.0. |
If I do a search for "S7HMuxImpl.IS_CONNECTED" I get only reading results ("channel.attr(S7HMuxImpl.IS_CONNECTED).get()" and not a single set ... so I would assume that's the reason, why "isConnected" always returns false (It checks this in order to say if the driver is connected or not) I just ran my ManualTest against my real S7 and besides the multi-item-write bug that I was planning on working on today, that all worked perfectly. But opening a new bug for the "isConnected" stuff .. that should work. |
I just double-checked and my last assumption is actually not true ... it's not always returning false. |
I had a look into version 0.10.0 and 0.11.0 As far as I can follow the code: the method isConnected from DefaultNettyPlcConnection was not overwritten by S7HPlcConnection. So maybe you just need to completely remove the isConnected method in S7HPlcConnection? Apart from the isConnected method, I would say that the WARN and DEBUGDOOM logging from the nioEventLoopGroup process is still problematic. It seems to work, but it messes up all the logging and important messages can get lost. |
What happened?
The PlcConnection is not working propertly in my setup for S7 PLC. Maybe it is related to Issue 1257.
My test code (the test is not successful).
Apart from that, some requests seem to work properly when the connection is used afterwards.
Log output produced with test code in Version v0.12.0
If I try to debug then I run into a timeout but there is also NullPointerException. But I think that is something else and maybe not important.
Log output produced with test code in version v0.11.0 (so the same test code works perfectly in version v0.11.0).
Version
v0.12.0
Programming Languages
Protocols
The text was updated successfully, but these errors were encountered: