You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Gunther Gruber <gu...@IDA-Analytics.de> on 2019/02/20 16:26:33 UTC
plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
AW: plc4j Marker not implemented
Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hey Tim,
That sounds great... As stated previously I will be happy to prepare an RC as soon as Chris and you (and perhaps also Gunter in this case) gives positive feedback...
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Tim Mitsch
An: dev@plc4x.apache.org
Cc:
Hallo everybody and welcome Gunther
I think the NPE parsing "%M0.4:BOOL" is coming from the one-byte data-type bug that we have already fixed in develop branch.
@Gunther:
This isn't the only variable that you are scanning, are u? In v0.3.0, i think ur using, you should get no error if you only scan this address, could you verify this?
@all
Using the current develop-branch i could not reproduce the NPE on request of "%M0.4:BOOL" alone as well in combination with other values, testing with our S71500, so i think we should starting to prepare 0.3.1 bugfix release. The odd length bug for arrays of one-byte base types is also fixed in develop.
Best
Tim
Am 20.02.19, 19:39 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Thanks for the research Chris. Could you prepare a release in Jira and link the tickets to keep things organized?
I'm still missing the mojo :)
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org,Gunther Gruber
Cc:
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
Re: plc4j Marker not implemented
Posted by Tim Mitsch <t....@pragmaticindustries.de>.
Hallo everybody and welcome Gunther
I think the NPE parsing "%M0.4:BOOL" is coming from the one-byte data-type bug that we have already fixed in develop branch.
@Gunther:
This isn't the only variable that you are scanning, are u? In v0.3.0, i think ur using, you should get no error if you only scan this address, could you verify this?
@all
Using the current develop-branch i could not reproduce the NPE on request of "%M0.4:BOOL" alone as well in combination with other values, testing with our S71500, so i think we should starting to prepare 0.3.1 bugfix release. The odd length bug for arrays of one-byte base types is also fixed in develop.
Best
Tim
Am 20.02.19, 19:39 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Thanks for the research Chris. Could you prepare a release in Jira and link the tickets to keep things organized?
I'm still missing the mojo :)
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org,Gunther Gruber
Cc:
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
AW: plc4j Marker not implemented
Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hi Chris,
No not just you, we as we.... This includes all of us and we should really take more care with these things, especially regarding graduation...
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Version is created ... however I currently don't have track of the issues we closed in there ... will try to take care of that tomorrow (And create missing issues ... we really got to get better with that ... and with "we" I sort of mean "me" __ )
Chris
Am 20.02.19, 19:39 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Thanks for the research Chris. Could you prepare a release in Jira and link the tickets to keep things organized?
I'm still missing the mojo :)
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org,Gunther Gruber
Cc:
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
Re: plc4j Marker not implemented
Posted by Christofer Dutz <ch...@c-ware.de>.
Version is created ... however I currently don't have track of the issues we closed in there ... will try to take care of that tomorrow (And create missing issues ... we really got to get better with that ... and with "we" I sort of mean "me" __ )
Chris
Am 20.02.19, 19:39 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Thanks for the research Chris. Could you prepare a release in Jira and link the tickets to keep things organized?
I'm still missing the mojo :)
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org,Gunther Gruber
Cc:
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
AW: plc4j Marker not implemented
Posted by Julian Feinauer <j....@pragmaticminds.de>.
Thanks for the research Chris. Could you prepare a release in Jira and link the tickets to keep things organized?
I'm still missing the mojo :)
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org,Gunther Gruber
Cc:
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
Re: plc4j Marker not implemented
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Gunther,
glad to hear that … the thing is that in the code I had left a remark to myself (or anyone else) that I’m not sure if the short-name “F” is correct … so I changed that to “M” and removed that comment 😉
Unfortunately there are still 3 or 4 memory areas with an equal comment behind them … guess we’ll have to try all of them out some time.
Chris
Von: Gunther Gruber <gu...@IDA-Analytics.de>
Antworten an: "dev@plc4x.apache.org" <de...@plc4x.apache.org>
Datum: Donnerstag, 21. Februar 2019 um 13:17
An: "dev@plc4x.apache.org" <de...@plc4x.apache.org>
Betreff: Re: plc4j Marker not implemented
If i use address %F0:WORD i get some changing numbers from the s7 :), I will explore that further. Thx in advance.
On 2/20/19 7:19 PM, Christofer Dutz wrote:
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org<ma...@plc4x.apache.org>
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36><https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org<ma...@plc4x.apache.org>
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
--
Gunther Gruber
Software Developer
[cid:part1.B17D8F42.78B2D8B3@ida-analytics.de]
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: gunther.gruber@ida-analytics.de
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.
Re: plc4j Marker not implemented
Posted by Gunther Gruber <gu...@IDA-Analytics.de>.
If i use address %F0:WORD i get some changing numbers from the s7 :), I will explore that further. Thx in advance.
On 2/20/19 7:19 PM, Christofer Dutz wrote:
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org<ma...@plc4x.apache.org>
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36><https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org<ma...@plc4x.apache.org>
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
--
Gunther Gruber
Software Developer
[cid:part1.B17D8F42.78B2D8B3@ida-analytics.de]
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: gunther.gruber@ida-analytics.de
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.
Re: plc4j Marker not implemented
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Julian,
yes we should add that to the list of things for a 0.3.1 release.
I just did some research on this and it seems to be a naming-thing.
As I found here [1] it seems as if Flags / Markers are used synonym.
@Gunther Gruber could you please give an address a try and use "F" instead of "M" (and omit any "D" or "W" behind the first letter)?
If this works, we should however adjust the parser as it looks as if these marker-addresses also have the "D" and "W" (but not the "X" suffixes the DB addresses have).
So it seems that "%MW3" is a valid address ... I guess the parser would currently not parse "%FW3".
I know the "W" is redundant if we provide the type at the end, but I would not like to force on our users to know that.
Chris
[1] https://www.citect.schneider-electric.com/scada/clearscada/help/2017/Content/SimaticS7DriverGuide/ConfiguretheScanProperties.htm
Am 20.02.19, 19:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
AW: plc4j Marker not implemented
Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hi,
first, thanks for the report Gunther.
Should we consider this as a bug and also consider it for the 0.3.1 release?
Would like to have that soon to allow us to focus on new thinks.
Did anyone file a Jira for that?
@tim: did you make some progress with the "odd byte" fix?
Julian
Von meinem Mobiltelefon gesendet
-------- Ursprüngliche Nachricht --------
Betreff: Re: plc4j Marker not implemented
Von: Christofer Dutz
An: dev@plc4x.apache.org
Cc:
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)
Re: plc4j Marker not implemented
Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Gunther,
I double checked and indeed the memory area enum is missing a constant for markers. I'll investigate the issue.
Thanks for reporting and thanks for giving Plc4x a try :-)
Chris
Outlook f?r Android<https://aka.ms/ghei36> herunterladen
________________________________
From: Gunther Gruber <gu...@IDA-Analytics.de>
Sent: Wednesday, February 20, 2019 5:26:33 PM
To: dev@plc4x.apache.org
Subject: plc4j Marker not implemented
Hello,
i use plc4j for a small project demo. Thx for developing this driver, must have take some time to figure out the details to talk to these machines :)
I took the hello world example and try to read some variables from a S7-1500, however I get a null pointer exception. I guess only %I and %Q is implemented.
The variable i try to read is:
%M0.4:BOOL
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at collector.plc4j.PLCCollectorOperatorTest.initPLC(PLCCollectorOperatorTest.java:100)
at collector.plc4j.PLCCollectorOperatorTest.Test(PLCCollectorOperatorTest.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.NullPointerException
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeS7AnyParameterItem(S7Protocol.java:392)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameterReadWriteVar(S7Protocol.java:351)
at org.apache.plc4x.java.s7.netty.S7Protocol.encodeParameters(S7Protocol.java:302)
at org.apache.plc4x.java.s7.netty.S7Protocol.writeS7Message(S7Protocol.java:207)
at org.apache.plc4x.java.s7.netty.S7Protocol.write(S7Protocol.java:185)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:111)
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730)
at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1081)
at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1128)
at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1070)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
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)