write String type data prompt 【PlcRuntimeException: Not implemented yet】

177 Views Asked by At

I need to write string, real, integer, byte data to the PLC, but will prompt me when I write string data StaticHelper.serializeS7String How can I meet my requirements?

org.apache.plc4x.java.api.exceptions.PlcRuntimeException: Not implemented yet
at org.apache.plc4x.java.s7.utils.StaticHelper.serializeS7String(StaticHelper.java:141)
at org.apache.plc4x.java.s7.readwrite.io.DataItemIO.staticSerialize(DataItemIO.java:321)
at org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.serializePlcValue(S7ProtocolLogic.java:436)
at org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.write(S7ProtocolLogic.java:269)
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:161)
at org.apache.plc4x.java.spi.messages.DefaultPlcWriteRequest.execute(DefaultPlcWriteRequest.java:69)
at SyncWriteTest.main(SyncWriteTest.java:76)
1

There are 1 best solutions below

1
On

We have had similar reports recently and we have at least implemented the reading of all of these types in 0.8.0-SNAPSHOT ... perhaps give this version a try. And when it comes to reading strings ... please pay attention to the new extended syntax for STRING types ... when using the default PLC4X will load all 254 chars of a string, which currently causes issues with S7 1200 devices. So please limit the size of the strings by adding the max number to the Type: STRING(10) will load 10 chars instead of 254.