I want to access S7-200 Smart using PLC4x. I have tested PLC4x on S7-1200, and it works. However, when I try to access S7-200, it always fails.
The CPU of the PLC is 6ES7 288.
Here are the code snippets:
plc.connectionURL = "s7://192.168.1.34";
PlcConnection plcConnection = driverManager.getConnection(plc.connectionURL);
When I try to connect, an error occurs and the following exception is thrown:
23:13:45.914 [nioEventLoopGroup-2-1] WARN i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
Caused by: java.util.concurrent.ExecutionException: org.apache.plc4x.java.api.exceptions.PlcIoException: Connection terminated by remote.
I have also tried accessing the same PLC using the tool from http://www.hslcommunication.cn/ and it works properly. Therefore, the PLC does not seem to be the problem.
I have also tried using the s7connector library, but it only works on S7-1200, not on S7-200 Smart.
Please help me and thanks very much!
Please try the following
See detail plc4x/issues/731