Can not write string into S7-1500 with Java

429 views Asked by At

I use plc4j to read/write string from s7-1500. I can read string with statement:

builder.addItem("value-4.0", "%DB1.DB4.0:STRING");

which get string of "hello world" in it. But I can not write string into the address with statement:

builder.addItem("value-4.0", "%DB1.DB4.0:STRING", "hello,world.");

And the exception is as follow:

org.apache.commons.lang3.NotImplementedException: Serializing STRING not implemented at org.apache.plc4x.java.s7.utils.StaticHelper.serializeS7String(StaticHelper.java:196) at org.apache.plc4x.java.s7.readwrite.io.DataItemIO.staticSerialize(DataItemIO.java:418) at org.apache.plc4x.java.s7.readwrite.io.DataItemIO.staticSerialize(DataItemIO.java:275) at org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.serializePlcValue(S7ProtocolLogic.java:498) at org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.write(S7ProtocolLogic.java:245) at org.apache.plc4x.java.spi.optimizer.BaseOptimizer.lambda$optimizedWrite$2(BaseOptimizer.java:114) at org.apache.plc4x.java.spi.optimizer.BaseOptimizer.send(BaseOptimizer.java:151) at org.apache.plc4x.java.spi.optimizer.BaseOptimizer.optimizedWrite(BaseOptimizer.java:114) at org.apache.plc4x.java.spi.connection.AbstractPlcConnection.write(AbstractPlcConnection.java:159) at org.apache.plc4x.java.spi.messages.DefaultPlcWriteRequest.execute(DefaultPlcWriteRequest.java:65)

Anybody, please give some idea. Thanks a lot.

0

There are 0 answers