0

我需要向PLC写入字符串、实数、整数、字节数据,但是写入字符串数据时会提示我 StaticHelper.serializeS7String 怎样才能满足我的要求?

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)
4

1 回答 1

0

我们最近有类似的报告,我们至少在 0.8.0-SNAPSHOT 中实现了所有这些类型的读取......也许可以试试这个版本。在读取字符串时……请注意 STRING 类型的新扩展语法……使用默认 PLC4X 时将加载字符串的所有 254 个字符,这目前会导致 S7 1200 设备出现问题。因此,请通过将最大数量添加到类型来限制字符串的大小:STRING(10) 将加载 10 个字符而不是 254 个字符。

于 2020-08-31T12:59:20.830 回答