Re: More Details regarding Scraper, Lack of Documentation

2020-07-07 Thread Stefano Bossi
Thanks Christofer,

for your help and time.

I will read the documentation and I will let you know.

Regards,
Stefano



Il lun 6 lug 2020, 11:47 Christofer Dutz  ha
scritto:

> Hi all,
>
> so I just wrote some documentation on the Scraper … it’s now available
> from here:
> https://plc4x.apache.org/users/tools/scraper.html
>
> I hope it helps and I hope even more that it’s accurate. If you happen to
> find some issues with it, please tell me about it.
>
> Chris
>
>
>
> Von: Stefano Bossi 
> Antworten an: 
> Datum: Freitag, 3. Juli 2020 um 17:56
> An: 
> Betreff: Re: More Details regarding Scraper, Lack of Documentation
>
> Thanks for your effort.
>
> I would be interest too in the documentation of the scraper; I will be
> stay tuned too.
>
> Regards,
> Stefano Bossi
>
> On 03/07/2020 14:34, Christofer Dutz wrote:
>
> Hi Wolfgang,
>
>
>
> As the exact same question has come up multiple times In the last few
> days, I'll start writing it.
>
>
>
> I was hoping the folks who wrote it would take care of this, but I
> understand there's a need for more documentation and we haven't been doing
> an extremely good job with that.
>
>
>
> So please stay tuned.
>
>
>
> Chris
>
>
>
> 
>
> Von: Wolfgang Huse  wolfgang.h...@nutanix.com>
>
> Gesendet: Freitag, 3. Juli 2020 09:30
>
> An: dev@plc4x.apache.org <
> dev@plc4x.apache.org>
>
> Betreff: More Details regarding Scraper, Lack of Documentation
>
>
>
> Hello!
>
> I have read a lot of Scraper-Functionality, as example in the
> Logstash-Plugin but I don’t find any high level Documentation.
>
>
>
> How do I leverage scraper and what are the benefits compared to cyclic
> subscription of several values ?
>
>
>
> In my use-case I need to fetch 16 Values from a S7-300 every 1second. What
> Is the best approach to do this ?
>
>
>
> Mit freundlichen Grüßen – With kind regards
>
>
>
> Wolfgang Huse
>
>
>
>
>
>
>


[jira] [Created] (PLC4X-207) No registered handler found for message TPKTPacket[], , using default decode method

2020-07-07 Thread Anton Engman (Jira)
Anton Engman created PLC4X-207:
--

 Summary: No registered handler found for message TPKTPacket[], , 
using default decode method
 Key: PLC4X-207
 URL: https://issues.apache.org/jira/browse/PLC4X-207
 Project: Apache PLC4X
  Issue Type: Bug
  Components: API, Driver-Modbus, Driver-S7
Affects Versions: 0.8.0
Reporter: Anton Engman


I am using PLC4X to poll 29 signals from a Siemens S7-300 device, all the 
signals are of
data type REAL. Every second I send a request to the PLC asking for the values 
and then printing one of the values to the console:

 
{code:java}
PlcConnection conn = 
driverManager.getConnection("s7:tcp://?remote-rack=0=1=S7_300");
PlcReadRequest.Builder builder = conn.readRequestBuilder();
builder.addItem("value1", "DB.50.DBD0:REAL");
.
.
.
builder.addItem("value29", "DB.50.DBD116:REAL");
PlcReadRequest readRequest = builder.build();
while(true)
{
 PlcReadResponse r = readRequest.execute().get();
 System.out.println(r.getObject("value1"));
Thread.sleep(1000);
}
{code}
 

Everything works fine for some time, but after >50K requests or 8-12 hours with 
the current
polling rate at 1 second the code waits forever at the return value from 
PlcReadResponse r
= readRequest.execute().get() and doesn't continue. I enabled Trace logging to 
see what's
happening and every time this error occurs I get the following error message:
{code:java}
12:56:48.107 [nioEventLoopGroup-2-1] TRACE o.a.plc4x.java.spi.Plc4xNettyWrapper 
- Checking
handler HandlerRegistration#65120 for Object of type TPKTPacket
12:56:48.107 [nioEventLoopGroup-2-1] TRACE o.a.plc4x.java.spi.Plc4xNettyWrapper 
- Handler
HandlerRegistration#65120 has right expected type TPKTPacket, checking condition
12:56:48.107 [nioEventLoopGroup-2-1] TRACE o.a.plc4x.java.spi.Plc4xNettyWrapper 
- Registration
HandlerRegistration#65120 does not match object TPKTPacket (currently wrapped 
to S7MessageResponseData)
12:56:48.107 [nioEventLoopGroup-2-1] TRACE o.a.plc4x.java.spi.Plc4xNettyWrapper 
- Checking
handler HandlerRegistration#65119 for Object of type TPKTPacket
12:56:48.107 [nioEventLoopGroup-2-1] TRACE o.a.plc4x.java.spi.Plc4xNettyWrapper 
- Handler
HandlerRegistration#65119 has right expected type TPKTPacket, checking condition
12:56:48.107 [nioEventLoopGroup-2-1] TRACE o.a.plc4x.java.spi.Plc4xNettyWrapper 
- Registration
HandlerRegistration#65119 does not match object TPKTPacket (currently wrapped 
to S7MessageResponseData)
12:56:48.107 [nioEventLoopGroup-2-1] TRACE o.a.plc4x.java.spi.Plc4xNettyWrapper 
- No registered
handler found for message 
TPKTPacket[payload=COTPPacketData[parameters={},payload=S7MessageResponseData[tpduReference=0,parameter=S7ParameterReadVarResponse[numItems=19],payload=S7PayloadReadVarResponse[items={S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={66,61,-103,-102}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={66,65,51,51}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={65,-104,0,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={65,-120,0,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={65,-103,-103,-102}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={65,-127,-103,-102}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={65,-106,102,103}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={65,-96,0,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={66,-8,-26,-124}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={63,101,-95,48}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={0,0,0,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={63,-101,-114,57}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={68,122,0,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={65,-102,102,103}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={-66,109,9,123}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={0,0,0,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={-71,-67,-96,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={0,0,0,0}],S7VarPayloadDataItem[returnCode=OK,transportSize=REAL,dataLength=4,data={0,0,0,0}]}],errorClass=0,errorCode=0],eot=true,tpduRef=0]],
using default decode method{code}
And this error message is the last thing that is printed to my console, it's 
like the code
is going into an infinite loop or something.
I used Wireshark to look at the packets coming from the PLC, I thought that 
maybe there's
a malformed packet or something that's causing the error message above, but the 
packet looks
exactly the same as the packets which are decoded 

Re: S7 write test doubt

2020-07-07 Thread Iñigo Angulo
Hi Etienne,

Thank you for the advice. I will also use WireShark to try to make a clearer 
idea of where the problem is coming from. I will let you know of the progress i 
do.

Iñigo

- 
Iñigo Angulo 

ZYLK.net :: consultoría.openSource 
Ribera de Axpe, 11 
Edificio A, modulo 201-203 
48950 Erandio (Bizkaia) 
+34 944272119 
-

- Mensaje original -
De: "Etienne Robinet" <43...@etu.he2b.be>
Para: "dev" 
Enviados: Lunes, 6 de Julio 2020 12:47:39
Asunto: Re: S7 write test doubt

Hi,
If you get the internal error, maybe try WireShark. He will tell you the exact 
error so you can know exactly where the problem is coming from.
Regards

Etienne

> Le 3 juil. 2020 à 17:32, Cesar Garcia  a écrit :
> 
> Hi Iñigo,
> 
> If you have the opportunity to test the previous version, it is currently
> under evaluation by the team (0.6.1 PR).
> 
> You can check the versión here
> 
> https://github.com/glcj/plc4x/tree/s7alarm
> 
> In addition to the examples placed in the official repository, here you
> will find a number of examples with native S7 types.
> 
> https://github.com/glcj/PLC4XS7Examples
> 
> I will be attentive to any request since it is in my interest that this
> version is very well debugged.
> 
> I hope it is useful for you
> 
> 
>> El vie., 3 jul. 2020 a las 3:24, Iñigo Angulo () escribió:
>> 
>> Hi Chris,
>> 
>> Yes, I was thinking about why those dataypes were returning a List, thanks
>> for the explanation
>> 
>> I tried the SINT access. For reading values works perfectly. But when
>> writing, Im afraid I am getting the same INTERNAL_ERROR message as for INT
>> and DINT. I will make further tests, and let you know of the progress i
>> make.
>> 
>> Thanks!
>> 
>> Iñigo
>> 
>> -
>> Iñigo Angulo
>> 
>> ZYLK.net :: consultoría.openSource
>> Ribera de Axpe, 11
>> Edificio A, modulo 201-203
>> 48950 Erandio (Bizkaia)
>> +34 944272119
>> -
>> 
>> - Mensaje original -
>> De: "Christofer Dutz" 
>> Para: "dev" 
>> Enviados: Jueves, 2 de Julio 2020 16:42:16
>> Asunto: Re: S7 write test doubt
>> 
>> Hi Iñigo,
>> 
>> happy you made quite some progress.
>> 
>> If you were asking yourself why for BYTE, WORD and DWORD the driver is
>> returning a List ... these are considered Bit-Strings. If you want to
>> read/write a single byte as an integer value, please use SINT instead.
>> 
>> So regarding one of your questions ... could you instead of doing:
>>builderWriter.addItem("mivariable", "%DB20:DBB06:BYTE", 127);
>> Please try:
>>builderWriter.addItem("mivariable", "%DB20:DBB06:SINT", 127);
>> 
>> And if you're getting an INTERNAL_ERROR that's probably our fault. As I
>> mentioned, we haven't done too much writing as no one ever uses that ;-)
>> 
>> Chris
>> 
>> 
>> 
>> 
>> Am 02.07.20, 15:56 schrieb "Iñigo Angulo" :
>> 
>>Hi,
>> 
>>I have been doing further tests with the S7 driver. I would like to
>> ask you some doubts, which i am not sure if relate to the PLC4X driver or
>> the actual hardware (Siemens S7-300) i am using (pretty novice in PLC data
>> access im afraid...)
>> 
>> 
>>The "Read value" tests I have done work correctly for different
>> datatypes, for example:
>> 
>>builderReader.addItem("mivariable", "%DB20:DBX5.0:BOOL"); //Single
>> boolean value
>>builderReader.addItem("mivariable", "%DB20:DBB06:BYTE"); //returns
>> a PlcList (Array of 8 boolean values)
>>builderReader.addItem("mivariable", "%DB20:DBW06:WORD"); //returns
>> a PlcList (Array of 16 boolean values)
>>builderReader.addItem("mivariable", "%DB20:DBD06:DWORD");
>> //returns a PlcList (Array of 32 boolean values)
>>builderReader.addItem("mivariable", "%DB20:DBW06:INT"); //returns
>> a PlcInteger (16 bit integer (signed))
>>builderReader.addItem("mivariable", "%DB20:DBD06:DINT"); //returns
>> a PlcInteger (32 bit integer (signed))
>>builderReader.addItem("mivariable", "%DB20:DBD06:REAL"); //returns
>> a PlcFloat (32 bit IEEE 754 full precision floating point value (signed))
>> 
>> 
>>In the "Write value" tests, write request for all datatype seem to
>> work fine:
>> 
>>builderWriter.addItem("mivariable", "%DB20:DBX6.1:BOOL", true);
>> //write response code "OK"
>>builderWriter.addItem("mivariable", "%DB20:DBB06:BYTE", 127);
>> //write response code "OK"
>>builderWriter.addItem("mivariable", "%DB20:DBW06:WORD", 7);
>> //write response code "OK"
>>builderWriter.addItem("mivariable", "%DB20:DBD06:DWORD", 1);
>> //write response code "OK"
>> 
>> 
>>Except for the 'INT' and 'DINT' datatypes, which return an
>> INTERNAL_ERROR response code
>> 
>>builderWriter.addItem("mivariable", "%DB20:DBW06:INT", 1); //write
>> response code "INTERNAL_ERROR"
>>builderWriter.addItem("mivariable", "%DB20:DBD06:DINT", 1);
>> //write response code