apache / plc4x

PLC4X The Industrial IoT adapter

Home Page:https://plc4x.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PLCRuntime Exception: NotSupported on S7_315 while Subscribing [Bug]:

mrwhy-orig opened this issue · comments

What happened?

I am trying to subscribe to data changes in the S7 315 PLC. The canSubscribe method returns true. But with subscriptionRequest.execute().get() i get a PLCRuntimeException: Not Supported.
I'm trying to get Updates from the Digital Inputs.
I tried all three available methods to do so.

(EDIT) I used the Getting Started article as reference. Also Reading and Writing is working.
(EDIT2) The Stack Trace:
java.util.concurrent.ExecutionException: org.apache.plc4x.java.api.exceptions.PlcRuntimeException: Not Supported at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) at SPS.S7_300.registerEventConsumer(S7_300.java:136) at SPS.S7_300.subscribeToAddress(S7_300.java:124) at SPS.S7_300.<init>(S7_300.java:103) at com.cn.bssecsmaven.BsSECS.startSPSService(BsSECS.java:71) at com.cn.bssecsmaven.BsSECS.main(BsSECS.java:62) Caused by: org.apache.plc4x.java.api.exceptions.PlcRuntimeException: Not Supported at org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.subscribe(S7ProtocolLogic.java:386) at org.apache.plc4x.java.spi.optimizer.BaseOptimizer.send(BaseOptimizer.java:137) at org.apache.plc4x.java.spi.optimizer.BaseOptimizer.optimizedSubscribe(BaseOptimizer.java:120) at org.apache.plc4x.java.spi.connection.AbstractPlcConnection.subscribe(AbstractPlcConnection.java:194) at org.apache.plc4x.java.spi.messages.DefaultPlcSubscriptionRequest.execute(DefaultPlcSubscriptionRequest.java:58) ... 5 more

(EDIT3) It is reproducable with the plc4j example: plc4j-examples-hello-world-plc4x-subscribe

Version

v.0.12.0

Programming Languages

  • plc4j
  • plc4go
  • plc4c
  • plc4net

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • CANopen
  • DeltaV
  • DF1
  • EtherNet/IP
  • Firmata
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • S7

Ok. Digged into it... Seems to be a user error ;)
It is crucial to pass the controller-type parameter in the connection string.
Allowed are only S7_300 or S7_400 nothing like my S7_315. By changing this, this error is solved.