thx

On 3/6/19 1:51 PM, Tim Mitsch wrote:

Hello Gunther

This bug is known and we fixed it already in development branch.
The problem is not the amount of variables rather than one-byte variables like 
BOOL,BYTE,USINT, ... - Simens uses a filling-byte when acquiring a single 
one-byte request
Right now we have the bugfix-release 0.3.1 as RC1 in vote, so you can try using 
a checkout development-branch from GitHub or just wait a few days until vote is 
finished and the version is available on MavenCentral.
Or you can use the staging-repository by integrating that in your pom and 
change plc4x-version to 0.3.1: 
https://repository.apache.org/content/repositories/orgapacheplc4x-1008

Best
Tim

Am 06.03.19, 13:40 schrieb "Gunther Gruber" 
<[email protected]><mailto:[email protected]>:

    I try to read multiple variables synchronous from a S7-1500 and get a 
exception. I use the code from the hello world example. When i split up the 
variables into smaller units like 5-8 it works. any suggestion on this? Is 
there a limit to the number of variables?

    Gunther


    String vars = 
"%Q73:WORD,%Q75:WORD,%I73:WORD,%I75:WORD,%I74:WORD,%I77:WORD,%F81.1:BOOL,%Q82:REAL,%F86:INT,%F89:REAL,%I40:INT,%Q2.5:BOOL,%Q3:INT,%I66:WORD,%Q20:REAL,%I61:WORD,%Q25:WORD,%I58.0:BOOL,%F1:BYTE,%F1.0:BOOL,%F1.1:BOOL,%F1.2:BOOL,%F1.3:BOOL,%F28.0:BOOL,%I58:WORD,%F0.7:BOOL,%F0.6:BOOL,%F0.5:BOOL,%F0.4:BOOL,%F0.3:BOOL,%F0.2:BOOL,%F0.1:BOOL,%F0.0:BOOL,%F0:BYTE";

    for (String item : splitVariables(vars)){
      variables.add(item);
    }


    460 [main] INFO com.ida.moira.collector.plc4j.PLCCollectorOperatorTest  - 
Synchronous request ...
    487 [nioEventLoopGroup-2-1] WARN io.netty.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.
    io.netty.handler.codec.DecoderException: java.lang.NullPointerException
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98)
        at 
org.apache.plc4x.java.s7.netty.S7Protocol.channelRead(S7Protocol.java:410)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
        at 
io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
        at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
        at 
io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
        at 
io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
        at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NullPointerException
        at 
org.apache.plc4x.java.s7.netty.S7Protocol.decodeVarPayload(S7Protocol.java:608)
        at 
org.apache.plc4x.java.s7.netty.S7Protocol.decodePayloads(S7Protocol.java:580)
        at org.apache.plc4x.java.s7.netty.S7Protocol.decode(S7Protocol.java:456)
        at 
org.apache.plc4x.java.s7.netty.S7Protocol$1.decode(S7Protocol.java:85)
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
        ... 31 more




--

Gunther Gruber

Software Developer

[cid:[email protected]]


Intelligent Data Analytics GmbH & Co. KG



c/o TechQuartier

Platz der Einheit 2

60327 Frankfurt

Telefon: +49 6421/4805274

Telefax: +49 6421/4805275

E-Mail: [email protected]

Internet: www.ida-analytics.de<http://www.ida-analytics.de/>



Unternehmenssitz: Frankfurt am Main | Handelsregister beim Amtsgericht: 
Frankfurt am Main, Registernummer: HRA 49357 | USt. ID-Nr.: DE310205810 | 
Finanzamt: Frankfurt am Main

Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics GmbH | 
Sitz: Frankfurt am Main | Handelsregister beim Amtsgericht: Frankfurt am Main | 
Handelsregister-Nummer: HRB 106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn 
Krugmann, Matthias Leinweber, Marc Seidemann

If you are not the addressee, please inform us immediately that you have 
received this e-mail by mistake, and delete it. We thank you for your support.

Reply via email to