Re: Reading Array of Int

2020-08-11 Thread Stefano Bossi
HI Julian,

did you have the opportunity to have a look to the regression?

Do you want I open a ticket in jira ?

Regards,
Stefano Bossi



On 07/08/2020 14:23, Stefano Bossi wrote:
>
> Hi Julian,
>
> unfortunately I think I found a regression in your code.
>
> I am using the compiled 0.8.0-SNAPSHOT version of the library which
> fix the reading of INT Arrays, unfortunately this version isn’t no
> more able to real STRING Array !!!
> When I call a sync read of a STRING the
>
> |PlcReadResponse syncResponse = readRequest.execute().get(); |
>
> never come back, it freeze forever.
>
> Here are the captured frame when I ask for |--field-addresses
> '%DB1:6.0:STRING[6]'| via the HelloPlc4x
>
> Request:
>
> |S7 Communication Header: (Job) Parameter: (Read Var) Function: Read
> Var (0x04) Item count: 1 Item [1]: (DB 1.DBX 6.0 CHAR 8) Variable
> specification: 0x12 Length of following address specification: 10
> Syntax Id: S7ANY (0x10) Transport size: CHAR (3) Length: 8 DB number:
> 1 Area: Data blocks (DB) (0x84) Address: 0x30  .000  
> 0011 0... = Byte Address: 6      .000 = Bit
> Address: 0 |
>
> Answer:
>
> |S7 Communication Header: (Ack_Data) Parameter: (Read Var) Function:
> Read Var (0x04) Item count: 1 Data Item [1]: (Success) Return code:
> Success (0xff) Transport size: OCTET STRING (0x09) Length: 8 Data:
> fe0474657374 |
>
> The PLC respond correctly |0474657374| -> |test| STRING.
>
> I have downgraded the library to the 0.7.0 just for testing and it
> works, the answer on the wire is the same and the |get()| call report
> the data correctly.
>
> Is this a regression?
>
> Thanks,
> Stefano Bossi
>
> On 03/08/2020 11:58, Julian Feinauer wrote:
>
>> Thank you Stefano, first for your feedback and second fort he
>> compliments.
>>
>>  
>>
>> We are doing our best and it feels really good if people see our
>> efforts <3
>>
>> Julian
>>
>>  
>>
>> *Von: *Stefano Bossi 
>> *Datum: *Montag, 3. August 2020 um 11:49
>> *An: *, Julian Feinauer
>> , Christofer Dutz
>> 
>> *Betreff: *Re: Reading Array of Int
>>
>>  
>>
>> Thanks you guys 
>>
>> I have downloaded and compiled the develop code and now I cloud read
>> the INT array without any problem!
>>
>> You are managing a great project with a great support !!!
>>
>> Thanks,
>> Stefano
>>
>> On 02/08/2020 21:08, Julian Feinauer wrote:
>>
>> Hi,
>>
>>  
>>
>> sorry for the delayed working on it but I just took a look and think I 
>> fixed the issue.
>>
>>  
>>
>> It seems that arrays where not properly implemented in the S7 Driver (?).
>>
>>  
>>
>> I opened up a PR (https://github.com/apache/plc4x/pull/175) and hope 
>> that @Christofer Dutz finds some time to have a quick look (as he did most 
>> of the work there) and merge it, if he agrees with it.
>>
>>  
>>
>> If you could try out the branch and give your feedback I would be happy.
>>
>>  
>>
>> Thanks for the excellent preparation of work! : )
>>
>>  
>>
>> Julian
>>
>>  
>>
>> Am 02.08.20, 20:40 schrieb "Julian Feinauer" 
>>  <mailto:j.feina...@pragmaticminds.de>:
>>
>>  
>>
>>     Hi,
>>
>>  
>>
>>     I'm looking into it : )
>>
>>  
>>
>>     J
>>
>>  
>>
>>     Am 01.08.20, 16:17 schrieb "Christofer Dutz" 
>>  <mailto:christofer.d...@c-ware.de>:
>>
>>  
>>
>>     Hi Stefano,
>>
>>  
>>
>>     I think such a Jira would be a good idea.
>>
>>  
>>
>>     I’m currently working on the Beckhoff ADS and would try to have 
>> a look as soon as possible.
>>
>>  
>>
>>     Chris
>>
>>  
>>
>>  
>>
>>  
>>
>>     Von: Stefano Bossi  
>> <mailto:stefano.bo...@gmail.com>
>>
>>     Antworten an:  
>> <mailto:dev@plc4x.apache.org>
>>
>>     Datum: Samstag, 1. August 2020 um 11:25
>>
>>     An:  <mailto:dev@plc4x.apache.org>, Julian 
>> Feinauer  <mailto:j.feina...@pragmaticminds.de>
>>
>>     Betreff: Re: Reading Array of Int
>>
>>  
>>
>>     Hi ju

Re: Reading Array of Int

2020-08-07 Thread Stefano Bossi
Hi Julian,

unfortunately I think I found a regression in your code.

I am using the compiled 0.8.0-SNAPSHOT version of the library which fix
the reading of INT Arrays, unfortunately this version isn’t no more able
to real STRING Array !!!
When I call a sync read of a STRING the

|PlcReadResponse syncResponse = readRequest.execute().get(); |

never come back, it freeze forever.

Here are the captured frame when I ask for |--field-addresses
'%DB1:6.0:STRING[6]'| via the HelloPlc4x

Request:

|S7 Communication Header: (Job) Parameter: (Read Var) Function: Read Var
(0x04) Item count: 1 Item [1]: (DB 1.DBX 6.0 CHAR 8) Variable
specification: 0x12 Length of following address specification: 10 Syntax
Id: S7ANY (0x10) Transport size: CHAR (3) Length: 8 DB number: 1 Area:
Data blocks (DB) (0x84) Address: 0x30  .000   0011 0...
= Byte Address: 6      .000 = Bit Address: 0 |

Answer:

|S7 Communication Header: (Ack_Data) Parameter: (Read Var) Function:
Read Var (0x04) Item count: 1 Data Item [1]: (Success) Return code:
Success (0xff) Transport size: OCTET STRING (0x09) Length: 8 Data:
fe0474657374 |

The PLC respond correctly |0474657374| -> |test| STRING.

I have downgraded the library to the 0.7.0 just for testing and it
works, the answer on the wire is the same and the |get()| call report
the data correctly.

Is this a regression?

Thanks,
Stefano Bossi

On 03/08/2020 11:58, Julian Feinauer wrote:

> Thank you Stefano, first for your feedback and second fort he
> compliments.
>
>  
>
> We are doing our best and it feels really good if people see our
> efforts <3
>
> Julian
>
>  
>
> *Von: *Stefano Bossi 
> *Datum: *Montag, 3. August 2020 um 11:49
> *An: *, Julian Feinauer
> , Christofer Dutz
> 
> *Betreff: *Re: Reading Array of Int
>
>  
>
> Thanks you guys 
>
> I have downloaded and compiled the develop code and now I cloud read
> the INT array without any problem!
>
> You are managing a great project with a great support !!!
>
> Thanks,
> Stefano
>
> On 02/08/2020 21:08, Julian Feinauer wrote:
>
> Hi,
>
>  
>
> sorry for the delayed working on it but I just took a look and think I 
> fixed the issue.
>
>  
>
> It seems that arrays where not properly implemented in the S7 Driver (?).
>
>  
>
> I opened up a PR (https://github.com/apache/plc4x/pull/175) and hope that 
> @Christofer Dutz finds some time to have a quick look (as he did most of the 
> work there) and merge it, if he agrees with it.
>
>  
>
> If you could try out the branch and give your feedback I would be happy.
>
>  
>
> Thanks for the excellent preparation of work! : )
>
>  
>
> Julian
>
>  
>
> Am 02.08.20, 20:40 schrieb "Julian Feinauer" 
>  <mailto:j.feina...@pragmaticminds.de>:
>
>  
>
>     Hi,
>
>  
>
>     I'm looking into it : )
>
>  
>
>     J
>
>  
>
>     Am 01.08.20, 16:17 schrieb "Christofer Dutz" 
>  <mailto:christofer.d...@c-ware.de>:
>
>  
>
>     Hi Stefano,
>
>  
>
>     I think such a Jira would be a good idea.
>
>  
>
>     I’m currently working on the Beckhoff ADS and would try to have a 
> look as soon as possible.
>
>  
>
>     Chris
>
>  
>
>      
>
>  
>
>     Von: Stefano Bossi  
> <mailto:stefano.bo...@gmail.com>
>
>     Antworten an:  <mailto:dev@plc4x.apache.org>
>
>     Datum: Samstag, 1. August 2020 um 11:25
>
>     An:  <mailto:dev@plc4x.apache.org>, Julian 
> Feinauer  <mailto:j.feina...@pragmaticminds.de>
>
>     Betreff: Re: Reading Array of Int
>
>  
>
>     Hi julian,
>
>  
>
>     if you need or think could simplify the development I could open 
> a jira ticket and upload a couple of pcap capture for you.
>
>  
>
>     As I wrote I am using the 0.7.0 version from Maven and I am 
> talking with a real Siemens 1200 with firmware 1.2 (pretty old but I didn't 
> find a way to upgrade it ).
>
>  
>
>     Let me know.
>
>  
>
>     Thanks for help.
>
>  
>
>     Regards,
>
>     Stefano
>
>  
>
>     On 30/07/2020 07:49, Julian Feinauer wrote:
>
>  
>
>     Hey Stefano, I will try to have a look later today. Are you using 
> plc4x version 0.6 or 0.7?
>
>  
>
>  
>
>  
>
>     Thank you!
>
>  
>
&g

Re: Reading Array of Int

2020-08-03 Thread Julian Feinauer
Thank you Stefano, first for your feedback and second fort he compliments.

We are doing our best and it feels really good if people see our efforts <3

Julian

Von: Stefano Bossi 
Datum: Montag, 3. August 2020 um 11:49
An: , Julian Feinauer , 
Christofer Dutz 
Betreff: Re: Reading Array of Int

Thanks you guys 

I have downloaded and compiled the develop code and now I cloud read the INT 
array without any problem!

You are managing a great project with a great support !!!

Thanks,
Stefano

On 02/08/2020 21:08, Julian Feinauer wrote:

Hi,



sorry for the delayed working on it but I just took a look and think I fixed 
the issue.



It seems that arrays where not properly implemented in the S7 Driver (?).



I opened up a PR (https://github.com/apache/plc4x/pull/175) and hope that 
@Christofer Dutz finds some time to have a quick look (as he did most of the 
work there) and merge it, if he agrees with it.



If you could try out the branch and give your feedback I would be happy.



Thanks for the excellent preparation of work! : )



Julian



Am 02.08.20, 20:40 schrieb "Julian Feinauer" 
<mailto:j.feina...@pragmaticminds.de>:



Hi,



I'm looking into it : )



J



Am 01.08.20, 16:17 schrieb "Christofer Dutz" 
<mailto:christofer.d...@c-ware.de>:



Hi Stefano,



I think such a Jira would be a good idea.



I’m currently working on the Beckhoff ADS and would try to have a look 
as soon as possible.



Chris







Von: Stefano Bossi 
<mailto:stefano.bo...@gmail.com>

Antworten an: <mailto:dev@plc4x.apache.org>

Datum: Samstag, 1. August 2020 um 11:25

An: <mailto:dev@plc4x.apache.org>, Julian 
Feinauer <mailto:j.feina...@pragmaticminds.de>

Betreff: Re: Reading Array of Int



Hi julian,



if you need or think could simplify the development I could open a jira 
ticket and upload a couple of pcap capture for you.



As I wrote I am using the 0.7.0 version from Maven and I am talking 
with a real Siemens 1200 with firmware 1.2 (pretty old but I didn't find a way 
to upgrade it ).



Let me know.



Thanks for help.



Regards,

Stefano



On 30/07/2020 07:49, Julian Feinauer wrote:



Hey Stefano, I will try to have a look later today. Are you using plc4x 
version 0.6 or 0.7?







Thank you!







Julian







Holen Sie sich Outlook für 
Android<https://aka.ms/ghei36><https://aka.ms/ghei36><https://aka.ms/ghei36><https://aka.ms/ghei36>











Von: Stefano Bossi 
<mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com>



Gesendet: Mittwoch, 29. Juli 2020, 12:32



An: 
dev@plc4x.apache.org<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>;
 Christofer Dutz



Betreff: Re: Reading Array of Int







Thanks Chris,







yes definitely this is a workaround, I am experimenting and learning.







I really appreciate your time on the investigation of the issue.







Thanks,



Stefano Bossi















On 29/07/2020 12:08, Christofer Dutz wrote:







Well that’s a workaround, but not a fix …







We should focus on fixing this.







I’ll investigate the issue as soon as I’m done with the Beckhoff 
ADS/AMS stuff …







Perhaps Julian could find some time to investigate?







Chris















Von: Stefano Bossi 
<mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com>



Antworten an: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>



Datum: Mittwoch, 29. Juli 2020 um 11:41



An: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>



Betreff: Re: Reading Array of Int











I have adopted a workaround reading all the INT variable separated.







--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
'%DB1:280.0:INT'







In this way on the wire you have:



the query:







   

Re: Reading Array of Int

2020-08-03 Thread Stefano Bossi
Thanks you guys 

I have downloaded and compiled the develop code and now I cloud read the
INT array without any problem!

You are managing a great project with a great support !!!

Thanks,
Stefano


On 02/08/2020 21:08, Julian Feinauer wrote:
> Hi,
>
> sorry for the delayed working on it but I just took a look and think I fixed 
> the issue.
>
> It seems that arrays where not properly implemented in the S7 Driver (?).
>
> I opened up a PR (https://github.com/apache/plc4x/pull/175) and hope that 
> @Christofer Dutz finds some time to have a quick look (as he did most of the 
> work there) and merge it, if he agrees with it.
>
> If you could try out the branch and give your feedback I would be happy.
>
> Thanks for the excellent preparation of work! : )
>
> Julian
>
> Am 02.08.20, 20:40 schrieb "Julian Feinauer" :
>
> Hi,
>
> I'm looking into it : )
>
> J
>
> Am 01.08.20, 16:17 schrieb "Christofer Dutz" :
>
> Hi Stefano,
>
> I think such a Jira would be a good idea.
>
> I’m currently working on the Beckhoff ADS and would try to have a 
> look as soon as possible.
>
> Chris
>
>
>
> Von: Stefano Bossi 
>     Antworten an: 
> Datum: Samstag, 1. August 2020 um 11:25
> An: , Julian Feinauer 
> 
> Betreff: Re: Reading Array of Int
>
> Hi julian,
>
> if you need or think could simplify the development I could open a 
> jira ticket and upload a couple of pcap capture for you.
>
> As I wrote I am using the 0.7.0 version from Maven and I am talking 
> with a real Siemens 1200 with firmware 1.2 (pretty old but I didn't find a 
> way to upgrade it ).
>
> Let me know.
>
> Thanks for help.
>
> Regards,
> Stefano
>
> On 30/07/2020 07:49, Julian Feinauer wrote:
>
> Hey Stefano, I will try to have a look later today. Are you using 
> plc4x version 0.6 or 0.7?
>
>
>
> Thank you!
>
>
>
> Julian
>
>
>
> Holen Sie sich Outlook für 
> Android<https://aka.ms/ghei36><https://aka.ms/ghei36>
>
>
>
> ____
>
> Von: Stefano Bossi 
> <mailto:stefano.bo...@gmail.com>
>
> Gesendet: Mittwoch, 29. Juli 2020, 12:32
>
> An: dev@plc4x.apache.org<mailto:dev@plc4x.apache.org>; Christofer Dutz
>
> Betreff: Re: Reading Array of Int
>
>
>
> Thanks Chris,
>
>
>
> yes definitely this is a workaround, I am experimenting and learning.
>
>
>
> I really appreciate your time on the investigation of the issue.
>
>
>
> Thanks,
>
> Stefano Bossi
>
>
>
>
>
>
>
> On 29/07/2020 12:08, Christofer Dutz wrote:
>
>
>
> Well that’s a workaround, but not a fix …
>
>
>
> We should focus on fixing this.
>
>
>
> I’ll investigate the issue as soon as I’m done with the Beckhoff 
> ADS/AMS stuff …
>
>
>
> Perhaps Julian could find some time to investigate?
>
>
>
>     Chris
>
>
>
>
>
>
>
> Von: Stefano Bossi 
> <mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com>
>
> Antworten an: 
> <mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>
>
> Datum: Mittwoch, 29. Juli 2020 um 11:41
>
> An: 
> <mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>
>
> Betreff: Re: Reading Array of Int
>
>
>
>
>
> I have adopted a workaround reading all the INT variable separated.
>
>
>
> --connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
> --field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
> '%DB1:280.0:INT'
>
>
>
> In this way on the wire you have:
>
> the query:
>
>
>
> Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 
> bits) on interface utun2, id 0
>
>
>
> Null/Loopback
>
>
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
>
>
> Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 
> 48, Ack: 50, Len: 67
>
>
>
> TPKT, Version: 3, Length: 67
>
>
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
>
>
> S7 Communication

Re: Reading Array of Int

2020-08-02 Thread Julian Feinauer
Hi,

sorry for the delayed working on it but I just took a look and think I fixed 
the issue.

It seems that arrays where not properly implemented in the S7 Driver (?).

I opened up a PR (https://github.com/apache/plc4x/pull/175) and hope that 
@Christofer Dutz finds some time to have a quick look (as he did most of the 
work there) and merge it, if he agrees with it.

If you could try out the branch and give your feedback I would be happy.

Thanks for the excellent preparation of work! : )

Julian

Am 02.08.20, 20:40 schrieb "Julian Feinauer" :

Hi,

I'm looking into it : )

J

Am 01.08.20, 16:17 schrieb "Christofer Dutz" :

Hi Stefano,

I think such a Jira would be a good idea.

I’m currently working on the Beckhoff ADS and would try to have a look 
as soon as possible.

Chris



Von: Stefano Bossi 
Antworten an: 
Datum: Samstag, 1. August 2020 um 11:25
An: , Julian Feinauer 

    Betreff: Re: Reading Array of Int

Hi julian,

if you need or think could simplify the development I could open a jira 
ticket and upload a couple of pcap capture for you.

As I wrote I am using the 0.7.0 version from Maven and I am talking 
with a real Siemens 1200 with firmware 1.2 (pretty old but I didn't find a way 
to upgrade it ).

Let me know.

Thanks for help.

Regards,
Stefano

On 30/07/2020 07:49, Julian Feinauer wrote:

Hey Stefano, I will try to have a look later today. Are you using plc4x 
version 0.6 or 0.7?



Thank you!



Julian



Holen Sie sich Outlook für 
Android<https://aka.ms/ghei36><https://aka.ms/ghei36>





Von: Stefano Bossi 
<mailto:stefano.bo...@gmail.com>

Gesendet: Mittwoch, 29. Juli 2020, 12:32

An: dev@plc4x.apache.org<mailto:dev@plc4x.apache.org>; Christofer Dutz

Betreff: Re: Reading Array of Int



Thanks Chris,



yes definitely this is a workaround, I am experimenting and learning.



I really appreciate your time on the investigation of the issue.



Thanks,

Stefano Bossi







On 29/07/2020 12:08, Christofer Dutz wrote:



Well that’s a workaround, but not a fix …



We should focus on fixing this.



I’ll investigate the issue as soon as I’m done with the Beckhoff 
ADS/AMS stuff …



Perhaps Julian could find some time to investigate?



Chris







Von: Stefano Bossi 
<mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com>

Antworten an: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>

Datum: Mittwoch, 29. Juli 2020 um 11:41

An: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>

Betreff: Re: Reading Array of Int





I have adopted a workaround reading all the INT variable separated.



--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
'%DB1:280.0:INT'



In this way on the wire you have:

the query:



Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) 
on interface utun2, id 0



Null/Loopback



Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192



Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, 
Ack: 50, Len: 67



TPKT, Version: 3, Length: 67



ISO 8073/X.224 COTP Connection-Oriented Transport Protocol



S7 Communication



Header: (Job)



Parameter: (Read Var)



Function: Read Var (0x04)



Item count: 4



Item [1]: (DB 1.DBX 274.0 INT 1)



Item [2]: (DB 1.DBX 276.0 INT 1)



Item [3]: (DB 1.DBX 278.0 INT 1)



Item [4]: (DB 1.DBX 280.0 INT 1)



the answer:



Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
interface utun2, id 0



Null/Loopback



Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4



Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, 
Ack: 115, Len: 45



TPKT, Version: 3, Length: 45



ISO 8073/X.224 COTP Connection-Oriented Transport Protocol



S7 Communication



Header: (Ack_Data)



Parameter: (Read Var)



Function: Read Var (0x04)



Item count: 4



Data



Item [1]: (Success)



Item [2]: (Success)



Item [3]: (Success)



Item [4]: (Success)

Re: Reading Array of Int

2020-08-02 Thread Julian Feinauer
Hi,

I'm looking into it : )

J

Am 01.08.20, 16:17 schrieb "Christofer Dutz" :

Hi Stefano,

I think such a Jira would be a good idea.

I’m currently working on the Beckhoff ADS and would try to have a look as 
soon as possible.

Chris



Von: Stefano Bossi 
Antworten an: 
Datum: Samstag, 1. August 2020 um 11:25
An: , Julian Feinauer 
Betreff: Re: Reading Array of Int

Hi julian,

if you need or think could simplify the development I could open a jira 
ticket and upload a couple of pcap capture for you.

As I wrote I am using the 0.7.0 version from Maven and I am talking with a 
real Siemens 1200 with firmware 1.2 (pretty old but I didn't find a way to 
upgrade it ).

Let me know.

Thanks for help.

Regards,
Stefano

On 30/07/2020 07:49, Julian Feinauer wrote:

Hey Stefano, I will try to have a look later today. Are you using plc4x 
version 0.6 or 0.7?



Thank you!



Julian



Holen Sie sich Outlook für 
Android<https://aka.ms/ghei36><https://aka.ms/ghei36>





Von: Stefano Bossi <mailto:stefano.bo...@gmail.com>

Gesendet: Mittwoch, 29. Juli 2020, 12:32

An: dev@plc4x.apache.org<mailto:dev@plc4x.apache.org>; Christofer Dutz

    Betreff: Re: Reading Array of Int



Thanks Chris,



yes definitely this is a workaround, I am experimenting and learning.



I really appreciate your time on the investigation of the issue.



Thanks,

Stefano Bossi







On 29/07/2020 12:08, Christofer Dutz wrote:



Well that’s a workaround, but not a fix …



We should focus on fixing this.



I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS 
stuff …



Perhaps Julian could find some time to investigate?



Chris







Von: Stefano Bossi 
<mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com>

Antworten an: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>

Datum: Mittwoch, 29. Juli 2020 um 11:41

An: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>

Betreff: Re: Reading Array of Int





I have adopted a workaround reading all the INT variable separated.



--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
'%DB1:280.0:INT'



In this way on the wire you have:

the query:



Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on 
interface utun2, id 0



Null/Loopback



Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192



Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, 
Ack: 50, Len: 67



TPKT, Version: 3, Length: 67



ISO 8073/X.224 COTP Connection-Oriented Transport Protocol



S7 Communication



Header: (Job)



Parameter: (Read Var)



Function: Read Var (0x04)



Item count: 4



Item [1]: (DB 1.DBX 274.0 INT 1)



Item [2]: (DB 1.DBX 276.0 INT 1)



Item [3]: (DB 1.DBX 278.0 INT 1)



Item [4]: (DB 1.DBX 280.0 INT 1)



the answer:



Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
interface utun2, id 0



Null/Loopback



Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4



Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, 
Ack: 115, Len: 45



TPKT, Version: 3, Length: 45



ISO 8073/X.224 COTP Connection-Oriented Transport Protocol



S7 Communication



Header: (Ack_Data)



Parameter: (Read Var)



Function: Read Var (0x04)



Item count: 4



Data



Item [1]: (Success)



Item [2]: (Success)



Item [3]: (Success)



Item [4]: (Success)



[INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-0]: 10



[INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-1]: 11



[INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-2]: 12



[INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-3]: 13



Unfortunately my java knowledge are not so advanced to fix the bug in 
reading the array in a single command, anyway there’s a workaround.



Hope this mail help some newbies like me to find the right way to read data 
from the PLC.



Regards,

Stefano



On 28/07/2020 11:38, Stefano Bossi wrote:



Dear plc4x forum,



I have found a possible problem in reading an array of INT.

I am using the HelloPlc4x app for testing and I am trying to read the field 
addres

Re: Reading Array of Int

2020-08-01 Thread Christofer Dutz
Hi Stefano,

I think such a Jira would be a good idea.

I’m currently working on the Beckhoff ADS and would try to have a look as soon 
as possible.

Chris



Von: Stefano Bossi 
Antworten an: 
Datum: Samstag, 1. August 2020 um 11:25
An: , Julian Feinauer 
Betreff: Re: Reading Array of Int

Hi julian,

if you need or think could simplify the development I could open a jira ticket 
and upload a couple of pcap capture for you.

As I wrote I am using the 0.7.0 version from Maven and I am talking with a real 
Siemens 1200 with firmware 1.2 (pretty old but I didn't find a way to upgrade 
it ).

Let me know.

Thanks for help.

Regards,
Stefano

On 30/07/2020 07:49, Julian Feinauer wrote:

Hey Stefano, I will try to have a look later today. Are you using plc4x version 
0.6 or 0.7?



Thank you!



Julian



Holen Sie sich Outlook für Android<https://aka.ms/ghei36><https://aka.ms/ghei36>





Von: Stefano Bossi <mailto:stefano.bo...@gmail.com>

Gesendet: Mittwoch, 29. Juli 2020, 12:32

An: dev@plc4x.apache.org<mailto:dev@plc4x.apache.org>; Christofer Dutz

Betreff: Re: Reading Array of Int



Thanks Chris,



yes definitely this is a workaround, I am experimenting and learning.



I really appreciate your time on the investigation of the issue.



Thanks,

Stefano Bossi







On 29/07/2020 12:08, Christofer Dutz wrote:



Well that’s a workaround, but not a fix …



We should focus on fixing this.



I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS stuff …



Perhaps Julian could find some time to investigate?



Chris







Von: Stefano Bossi 
<mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com><mailto:stefano.bo...@gmail.com>

Antworten an: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>

Datum: Mittwoch, 29. Juli 2020 um 11:41

An: 
<mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org><mailto:dev@plc4x.apache.org>

Betreff: Re: Reading Array of Int





I have adopted a workaround reading all the INT variable separated.



--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
'%DB1:280.0:INT'



In this way on the wire you have:

the query:



Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on 
interface utun2, id 0



Null/Loopback



Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192



Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, Ack: 
50, Len: 67



TPKT, Version: 3, Length: 67



ISO 8073/X.224 COTP Connection-Oriented Transport Protocol



S7 Communication



Header: (Job)



Parameter: (Read Var)



Function: Read Var (0x04)



Item count: 4



Item [1]: (DB 1.DBX 274.0 INT 1)



Item [2]: (DB 1.DBX 276.0 INT 1)



Item [3]: (DB 1.DBX 278.0 INT 1)



Item [4]: (DB 1.DBX 280.0 INT 1)



the answer:



Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
interface utun2, id 0



Null/Loopback



Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4



Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, Ack: 
115, Len: 45



TPKT, Version: 3, Length: 45



ISO 8073/X.224 COTP Connection-Oriented Transport Protocol



S7 Communication



Header: (Ack_Data)



Parameter: (Read Var)



Function: Read Var (0x04)



Item count: 4



Data



Item [1]: (Success)



Item [2]: (Success)



Item [3]: (Success)



Item [4]: (Success)



[INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-0]: 10



[INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-1]: 11



[INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-2]: 12



[INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-3]: 13



Unfortunately my java knowledge are not so advanced to fix the bug in reading 
the array in a single command, anyway there’s a workaround.



Hope this mail help some newbies like me to find the right way to read data 
from the PLC.



Regards,

Stefano



On 28/07/2020 11:38, Stefano Bossi wrote:



Dear plc4x forum,



I have found a possible problem in reading an array of INT.

I am using the HelloPlc4x app for testing and I am trying to read the field 
address: '%DB1:274.0:INT[3]'



In the request, captured via wireShark I can see the query:



Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on interface 
utun2, id 0



Null/Loopback



Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192



Transmission Control Protocol, Src Port: 54543, Dst Port: 102, Seq: 1, Ack: 1, 
Len: 31



TPKT, Version: 3, Length: 31



ISO 8073/X.224 COTP Connection-Oriented Transport Protocol



S7 Commu

Re: Reading Array of Int

2020-08-01 Thread Stefano Bossi
Hi julian,

if you need or think could simplify the development I could open a jira
ticket and upload a couple of pcap capture for you.

As I wrote I am using the 0.7.0 version from Maven and I am talking with
a real Siemens 1200 with firmware 1.2 (pretty old but I didn't find a
way to upgrade it ).

Let me know.

Thanks for help.

Regards,
Stefano


On 30/07/2020 07:49, Julian Feinauer wrote:
> Hey Stefano, I will try to have a look later today. Are you using plc4x 
> version 0.6 or 0.7?
>
> Thank you!
>
> Julian
>
> Holen Sie sich Outlook für Android<https://aka.ms/ghei36>
>
> 
> Von: Stefano Bossi 
> Gesendet: Mittwoch, 29. Juli 2020, 12:32
> An: dev@plc4x.apache.org; Christofer Dutz
> Betreff: Re: Reading Array of Int
>
> Thanks Chris,
>
> yes definitely this is a workaround, I am experimenting and learning.
>
> I really appreciate your time on the investigation of the issue.
>
> Thanks,
> Stefano Bossi
>
>
>
> On 29/07/2020 12:08, Christofer Dutz wrote:
>
> Well that’s a workaround, but not a fix …
>
> We should focus on fixing this.
>
> I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS 
> stuff …
>
> Perhaps Julian could find some time to investigate?
>
> Chris
>
>
>
> Von: Stefano Bossi <mailto:stefano.bo...@gmail.com>
> Antworten an: <mailto:dev@plc4x.apache.org>
> Datum: Mittwoch, 29. Juli 2020 um 11:41
> An: <mailto:dev@plc4x.apache.org>
> Betreff: Re: Reading Array of Int
>
>
> I have adopted a workaround reading all the INT variable separated.
>
> --connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
> --field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
> '%DB1:280.0:INT'
>
> In this way on the wire you have:
> the query:
>
> Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on 
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
> Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, Ack: 
> 50, Len: 67
>
> TPKT, Version: 3, Length: 67
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Job)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Item [1]: (DB 1.DBX 274.0 INT 1)
>
> Item [2]: (DB 1.DBX 276.0 INT 1)
>
> Item [3]: (DB 1.DBX 278.0 INT 1)
>
> Item [4]: (DB 1.DBX 280.0 INT 1)
>
> the answer:
>
> Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4
>
> Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, Ack: 
> 115, Len: 45
>
> TPKT, Version: 3, Length: 45
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Ack_Data)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Data
>
> Item [1]: (Success)
>
> Item [2]: (Success)
>
> Item [3]: (Success)
>
> Item [4]: (Success)
>
> [INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-0]: 10
>
> [INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-1]: 11
>
> [INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-2]: 12
>
> [INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-3]: 13
>
> Unfortunately my java knowledge are not so advanced to fix the bug in reading 
> the array in a single command, anyway there’s a workaround.
>
> Hope this mail help some newbies like me to find the right way to read data 
> from the PLC.
>
> Regards,
> Stefano
>
> On 28/07/2020 11:38, Stefano Bossi wrote:
>
> Dear plc4x forum,
>
> I have found a possible problem in reading an array of INT.
> I am using the HelloPlc4x app for testing and I am trying to read the field 
> address: '%DB1:274.0:INT[3]'
>
> In the request, captured via wireShark I can see the query:
>
> Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on 
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
> Transmission Control Protocol, Src Port: 54543, Dst Port: 102, Seq: 1, Ack: 
> 1, Len: 31
>
> TPKT, Version: 3, Length: 31
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>

Re: Reading Array of Int

2020-08-01 Thread Christofer Dutz
Looking forward to it :-)

Von: Cesar Garcia 
Gesendet: Freitag, 31. Juli 2020 23:27
An: Apache PLC4X 
Betreff: Re: Reading Array of Int

Hi Chris.

With the 0.6.1 (Aka Frankenstein code :-)) I solved every problem that I
was finding to get to the handling of the subscription (Type handling,
optimization, asynchronous responses from the PLC, etc.).

J ... is helping me to incorporate the code to the development branch. I am
not a Git expert, and the last thing I want is to damage something jeje.

Also, all these points are documented in Jira (including the pcap files).

For my part, I am waiting next week to be able to install a VPN and give
access to the S7-300 / 400 equipment (physical) and the tests can be
finished.

Best regards,

El vie., 31 jul. 2020 a las 3:42, Christofer Dutz (<
christofer.d...@c-ware.de>) escribió:

> Hi Cesar,
>
> if you fixed any issues in that branch, that are not related to
> publish-subscribe and alarms, it would be great if you could port that to
> develop.
>
> Chris
>
>
>
> Am 30.07.20, 17:34 schrieb "Cesar Garcia" :
>
> Hi Stefano,
>
> I have made several modifications to the branch for a 0.6.1 revision.
>
> If you have the time to try it you can download it from here
>
> https://github.com/glcj/plc4x/tree/s7alarm
>
> and a number of examples here,
>
> https://github.com/glcj/PLC4XS7Examples
>
> What version of PLC do you have?
>
> Like the rest of the team, I will order to help you if you find any
> problem.
>
> Best regards,
>
> El mié., 29 jul. 2020 a las 6:32, Stefano Bossi (<
> stefano.bo...@gmail.com>)
> escribió:
>
> > Thanks Chris,
> >
> > yes definitely this is a workaround, I am experimenting and learning.
> >
> > I really appreciate your time on the investigation of the issue.
> >
> > Thanks,
> > Stefano Bossi
> >
> >
> >
> > On 29/07/2020 12:08, Christofer Dutz wrote:
> >
> > Well that’s a workaround, but not a fix …
> >
> > We should focus on fixing this.
> >
> > I’ll investigate the issue as soon as I’m done with the Beckhoff
> ADS/AMS stuff …
> >
> > Perhaps Julian could find some time to investigate?
> >
> > Chris
> >
> >
> >
> > Von: Stefano Bossi  <
> stefano.bo...@gmail.com>
> > Antworten an:  
> > Datum: Mittwoch, 29. Juli 2020 um 11:41
> > An:  
> > Betreff: Re: Reading Array of Int
> >
> >
> > I have adopted a workaround reading all the INT variable separated.
> >
> > --connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200'
> --field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT'
> '%DB1:280.0:INT'
> >
> > In this way on the wire you have:
> > the query:
> >
> > Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888
> bits) on interface utun2, id 0
> >
> > Null/Loopback
> >
> > Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
> >
> > Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq:
> 48, Ack: 50, Len: 67
> >
> > TPKT, Version: 3, Length: 67
> >
> > ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
> >
> > S7 Communication
> >
> > Header: (Job)
> >
> > Parameter: (Read Var)
> >
> > Function: Read Var (0x04)
> >
> > Item count: 4
> >
> > Item [1]: (DB 1.DBX 274.0 INT 1)
> >
> > Item [2]: (DB 1.DBX 276.0 INT 1)
> >
> > Item [3]: (DB 1.DBX 278.0 INT 1)
> >
> > Item [4]: (DB 1.DBX 280.0 INT 1)
> >
> > the answer:
> >
> > Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits)
> on interface utun2, id 0
> >
> > Null/Loopback
> >
> > Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4
> >
> > Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq:
> 50, Ack: 115, Len: 45
> >
> > TPKT, Version: 3, Length: 45
> >
> > ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
> >
> > S7 Communication
> >
> > Header: (Ack_Data)
> >
> > Parameter: (Read Var)
> >
> 

Re: Reading Array of Int

2020-07-31 Thread Cesar Garcia
Hi Chris.

With the 0.6.1 (Aka Frankenstein code :-)) I solved every problem that I
was finding to get to the handling of the subscription (Type handling,
optimization, asynchronous responses from the PLC, etc.).

J ... is helping me to incorporate the code to the development branch. I am
not a Git expert, and the last thing I want is to damage something jeje.

Also, all these points are documented in Jira (including the pcap files).

For my part, I am waiting next week to be able to install a VPN and give
access to the S7-300 / 400 equipment (physical) and the tests can be
finished.

Best regards,

El vie., 31 jul. 2020 a las 3:42, Christofer Dutz (<
christofer.d...@c-ware.de>) escribió:

> Hi Cesar,
>
> if you fixed any issues in that branch, that are not related to
> publish-subscribe and alarms, it would be great if you could port that to
> develop.
>
> Chris
>
>
>
> Am 30.07.20, 17:34 schrieb "Cesar Garcia" :
>
> Hi Stefano,
>
> I have made several modifications to the branch for a 0.6.1 revision.
>
> If you have the time to try it you can download it from here
>
> https://github.com/glcj/plc4x/tree/s7alarm
>
> and a number of examples here,
>
> https://github.com/glcj/PLC4XS7Examples
>
> What version of PLC do you have?
>
> Like the rest of the team, I will order to help you if you find any
> problem.
>
> Best regards,
>
> El mié., 29 jul. 2020 a las 6:32, Stefano Bossi (<
> stefano.bo...@gmail.com>)
> escribió:
>
> > Thanks Chris,
> >
> > yes definitely this is a workaround, I am experimenting and learning.
> >
> > I really appreciate your time on the investigation of the issue.
> >
> > Thanks,
> > Stefano Bossi
> >
> >
> >
> > On 29/07/2020 12:08, Christofer Dutz wrote:
> >
> > Well that’s a workaround, but not a fix …
> >
> > We should focus on fixing this.
> >
> > I’ll investigate the issue as soon as I’m done with the Beckhoff
> ADS/AMS stuff …
> >
> > Perhaps Julian could find some time to investigate?
> >
> > Chris
> >
> >
> >
> > Von: Stefano Bossi  <
> stefano.bo...@gmail.com>
> > Antworten an:  
> > Datum: Mittwoch, 29. Juli 2020 um 11:41
> > An:  
> > Betreff: Re: Reading Array of Int
> >
> >
> > I have adopted a workaround reading all the INT variable separated.
> >
> > --connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200'
> --field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT'
> '%DB1:280.0:INT'
> >
> > In this way on the wire you have:
> > the query:
> >
> > Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888
> bits) on interface utun2, id 0
> >
> > Null/Loopback
> >
> > Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
> >
> > Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq:
> 48, Ack: 50, Len: 67
> >
> > TPKT, Version: 3, Length: 67
> >
> > ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
> >
> > S7 Communication
> >
> > Header: (Job)
> >
> > Parameter: (Read Var)
> >
> > Function: Read Var (0x04)
> >
> > Item count: 4
> >
> > Item [1]: (DB 1.DBX 274.0 INT 1)
> >
> > Item [2]: (DB 1.DBX 276.0 INT 1)
> >
> > Item [3]: (DB 1.DBX 278.0 INT 1)
> >
> > Item [4]: (DB 1.DBX 280.0 INT 1)
> >
> > the answer:
> >
> > Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits)
> on interface utun2, id 0
> >
> > Null/Loopback
> >
> > Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4
> >
> > Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq:
> 50, Ack: 115, Len: 45
> >
> > TPKT, Version: 3, Length: 45
> >
> > ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
> >
> > S7 Communication
> >
> > Header: (Ack_Data)
> >
> > Parameter: (Read Var)
> >
> > Function: Read Var (0x04)
> >
> > Item count: 4
> >
> > Data
> >
> >  

Re: Reading Array of Int

2020-07-31 Thread Stefano Bossi
Hi Julian,

sorry for the late reply. I am using the 0.7 version.

Thanks for your help,
Stefano

Il gio 30 lug 2020, 07:49 Julian Feinauer  ha
scritto:

> Hey Stefano, I will try to have a look later today. Are you using plc4x
> version 0.6 or 0.7?
>
> Thank you!
>
> Julian
>
> Holen Sie sich Outlook für Android<https://aka.ms/ghei36>
>
> 
> Von: Stefano Bossi 
> Gesendet: Mittwoch, 29. Juli 2020, 12:32
> An: dev@plc4x.apache.org; Christofer Dutz
> Betreff: Re: Reading Array of Int
>
> Thanks Chris,
>
> yes definitely this is a workaround, I am experimenting and learning.
>
> I really appreciate your time on the investigation of the issue.
>
> Thanks,
> Stefano Bossi
>
>
>
> On 29/07/2020 12:08, Christofer Dutz wrote:
>
> Well that’s a workaround, but not a fix …
>
> We should focus on fixing this.
>
> I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS
> stuff …
>
> Perhaps Julian could find some time to investigate?
>
> Chris
>
>
>
> Von: Stefano Bossi  stefano.bo...@gmail.com>
> Antworten an: <mailto:dev@plc4x.apache.org>
> Datum: Mittwoch, 29. Juli 2020 um 11:41
> An: <mailto:dev@plc4x.apache.org>
> Betreff: Re: Reading Array of Int
>
>
> I have adopted a workaround reading all the INT variable separated.
>
> --connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200'
> --field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT'
> '%DB1:280.0:INT'
>
> In this way on the wire you have:
> the query:
>
> Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
> Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48,
> Ack: 50, Len: 67
>
> TPKT, Version: 3, Length: 67
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Job)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Item [1]: (DB 1.DBX 274.0 INT 1)
>
> Item [2]: (DB 1.DBX 276.0 INT 1)
>
> Item [3]: (DB 1.DBX 278.0 INT 1)
>
> Item [4]: (DB 1.DBX 280.0 INT 1)
>
> the answer:
>
> Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4
>
> Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50,
> Ack: 115, Len: 45
>
> TPKT, Version: 3, Length: 45
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Ack_Data)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Data
>
> Item [1]: (Success)
>
> Item [2]: (Success)
>
> Item [3]: (Success)
>
> Item [4]: (Success)
>
> [INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() -
> Value[value-0]: 10
>
> [INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() -
> Value[value-1]: 11
>
> [INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() -
> Value[value-2]: 12
>
> [INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() -
> Value[value-3]: 13
>
> Unfortunately my java knowledge are not so advanced to fix the bug in
> reading the array in a single command, anyway there’s a workaround.
>
> Hope this mail help some newbies like me to find the right way to read
> data from the PLC.
>
> Regards,
> Stefano
>
> On 28/07/2020 11:38, Stefano Bossi wrote:
>
> Dear plc4x forum,
>
> I have found a possible problem in reading an array of INT.
> I am using the HelloPlc4x app for testing and I am trying to read the
> field address: '%DB1:274.0:INT[3]'
>
> In the request, captured via wireShark I can see the query:
>
> Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
> Transmission Control Protocol, Src Port: 54543, Dst Port: 102, Seq: 1,
> Ack: 1, Len: 31
>
> TPKT, Version: 3, Length: 31
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Job)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 1
>
> Item [1]: (DB 1.DBX 274.0 INT 3)
>
> Variable specification: 0x12
>
&

Re: Reading Array of Int

2020-07-31 Thread Christofer Dutz
Hi Cesar,

if you fixed any issues in that branch, that are not related to 
publish-subscribe and alarms, it would be great if you could port that to 
develop.

Chris



Am 30.07.20, 17:34 schrieb "Cesar Garcia" :

Hi Stefano,

I have made several modifications to the branch for a 0.6.1 revision.

If you have the time to try it you can download it from here

https://github.com/glcj/plc4x/tree/s7alarm

and a number of examples here,

https://github.com/glcj/PLC4XS7Examples

What version of PLC do you have?

Like the rest of the team, I will order to help you if you find any problem.

Best regards,

El mié., 29 jul. 2020 a las 6:32, Stefano Bossi ()
escribió:

> Thanks Chris,
>
> yes definitely this is a workaround, I am experimenting and learning.
>
> I really appreciate your time on the investigation of the issue.
>
> Thanks,
> Stefano Bossi
>
>
>
> On 29/07/2020 12:08, Christofer Dutz wrote:
>
> Well that’s a workaround, but not a fix …
>
> We should focus on fixing this.
>
> I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS 
stuff …
>
> Perhaps Julian could find some time to investigate?
>
> Chris
>
>
>
> Von: Stefano Bossi  
> Antworten an:  
    > Datum: Mittwoch, 29. Juli 2020 um 11:41
> An:  
> Betreff: Re: Reading Array of Int
>
>
> I have adopted a workaround reading all the INT variable separated.
>
> --connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
'%DB1:280.0:INT'
>
> In this way on the wire you have:
> the query:
>
> Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on 
interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
> Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, 
Ack: 50, Len: 67
>
> TPKT, Version: 3, Length: 67
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Job)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Item [1]: (DB 1.DBX 274.0 INT 1)
>
> Item [2]: (DB 1.DBX 276.0 INT 1)
>
> Item [3]: (DB 1.DBX 278.0 INT 1)
>
> Item [4]: (DB 1.DBX 280.0 INT 1)
>
> the answer:
>
> Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4
>
> Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, 
Ack: 115, Len: 45
>
> TPKT, Version: 3, Length: 45
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Ack_Data)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Data
>
> Item [1]: (Success)
>
> Item [2]: (Success)
>
> Item [3]: (Success)
>
> Item [4]: (Success)
>
> [INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-0]: 10
>
> [INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-1]: 11
>
> [INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-2]: 12
>
> [INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-3]: 13
>
> Unfortunately my java knowledge are not so advanced to fix the bug in 
reading the array in a single command, anyway there’s a workaround.
>
> Hope this mail help some newbies like me to find the right way to read 
data from the PLC.
>
> Regards,
> Stefano
>
> On 28/07/2020 11:38, Stefano Bossi wrote:
>
> Dear plc4x forum,
>
> I have found a possible problem in reading an array of INT.
> I am using the HelloPlc4x app for testing and I am trying to read the 
field address: '%DB1:274.0:INT[3]'
>
> In the request, captured via wireShark I can see the query:
>
> Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on 
interface utun2, id 0
>
> Null/Loopback
>
> Internet Protoc

Re: Reading Array of Int

2020-07-30 Thread Cesar Garcia
Hi Stefano,

I have made several modifications to the branch for a 0.6.1 revision.

If you have the time to try it you can download it from here

https://github.com/glcj/plc4x/tree/s7alarm

and a number of examples here,

https://github.com/glcj/PLC4XS7Examples

What version of PLC do you have?

Like the rest of the team, I will order to help you if you find any problem.

Best regards,

El mié., 29 jul. 2020 a las 6:32, Stefano Bossi ()
escribió:

> Thanks Chris,
>
> yes definitely this is a workaround, I am experimenting and learning.
>
> I really appreciate your time on the investigation of the issue.
>
> Thanks,
> Stefano Bossi
>
>
>
> On 29/07/2020 12:08, Christofer Dutz wrote:
>
> Well that’s a workaround, but not a fix …
>
> We should focus on fixing this.
>
> I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS 
> stuff …
>
> Perhaps Julian could find some time to investigate?
>
> Chris
>
>
>
> Von: Stefano Bossi  
> Antworten an:  
> Datum: Mittwoch, 29. Juli 2020 um 11:41
> An:  
> Betreff: Re: Reading Array of Int
>
>
> I have adopted a workaround reading all the INT variable separated.
>
> --connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
> --field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
> '%DB1:280.0:INT'
>
> In this way on the wire you have:
> the query:
>
> Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on 
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
> Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, Ack: 
> 50, Len: 67
>
> TPKT, Version: 3, Length: 67
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Job)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Item [1]: (DB 1.DBX 274.0 INT 1)
>
> Item [2]: (DB 1.DBX 276.0 INT 1)
>
> Item [3]: (DB 1.DBX 278.0 INT 1)
>
> Item [4]: (DB 1.DBX 280.0 INT 1)
>
> the answer:
>
> Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4
>
> Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, Ack: 
> 115, Len: 45
>
> TPKT, Version: 3, Length: 45
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Ack_Data)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 4
>
> Data
>
> Item [1]: (Success)
>
> Item [2]: (Success)
>
> Item [3]: (Success)
>
> Item [4]: (Success)
>
> [INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-0]: 10
>
> [INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-1]: 11
>
> [INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-2]: 12
>
> [INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() - 
> Value[value-3]: 13
>
> Unfortunately my java knowledge are not so advanced to fix the bug in reading 
> the array in a single command, anyway there’s a workaround.
>
> Hope this mail help some newbies like me to find the right way to read data 
> from the PLC.
>
> Regards,
> Stefano
>
> On 28/07/2020 11:38, Stefano Bossi wrote:
>
> Dear plc4x forum,
>
> I have found a possible problem in reading an array of INT.
> I am using the HelloPlc4x app for testing and I am trying to read the field 
> address: '%DB1:274.0:INT[3]'
>
> In the request, captured via wireShark I can see the query:
>
> Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on 
> interface utun2, id 0
>
> Null/Loopback
>
> Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192
>
> Transmission Control Protocol, Src Port: 54543, Dst Port: 102, Seq: 1, Ack: 
> 1, Len: 31
>
> TPKT, Version: 3, Length: 31
>
> ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
>
> S7 Communication
>
> Header: (Job)
>
> Parameter: (Read Var)
>
> Function: Read Var (0x04)
>
> Item count: 1
>
> Item [1]: (DB 1.DBX 274.0 INT 3)
>
> Variable specification: 0x12
>
> Length of following address specification: 10
>
> Syntax Id: S7ANY (0x10)
>
> Transport size: INT (5)
>
> Length: 3
>

Re: Reading Array of Int

2020-07-29 Thread Julian Feinauer
Hey Stefano, I will try to have a look later today. Are you using plc4x version 
0.6 or 0.7?

Thank you!

Julian

Holen Sie sich Outlook für Android<https://aka.ms/ghei36>


Von: Stefano Bossi 
Gesendet: Mittwoch, 29. Juli 2020, 12:32
An: dev@plc4x.apache.org; Christofer Dutz
Betreff: Re: Reading Array of Int

Thanks Chris,

yes definitely this is a workaround, I am experimenting and learning.

I really appreciate your time on the investigation of the issue.

Thanks,
Stefano Bossi



On 29/07/2020 12:08, Christofer Dutz wrote:

Well that’s a workaround, but not a fix …

We should focus on fixing this.

I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS stuff …

Perhaps Julian could find some time to investigate?

Chris



Von: Stefano Bossi <mailto:stefano.bo...@gmail.com>
Antworten an: <mailto:dev@plc4x.apache.org>
Datum: Mittwoch, 29. Juli 2020 um 11:41
An: <mailto:dev@plc4x.apache.org>
Betreff: Re: Reading Array of Int


I have adopted a workaround reading all the INT variable separated.

--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
'%DB1:280.0:INT'

In this way on the wire you have:
the query:

Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on 
interface utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192

Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, Ack: 
50, Len: 67

TPKT, Version: 3, Length: 67

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Job)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 4

Item [1]: (DB 1.DBX 274.0 INT 1)

Item [2]: (DB 1.DBX 276.0 INT 1)

Item [3]: (DB 1.DBX 278.0 INT 1)

Item [4]: (DB 1.DBX 280.0 INT 1)

the answer:

Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
interface utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4

Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, Ack: 
115, Len: 45

TPKT, Version: 3, Length: 45

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Ack_Data)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 4

Data

Item [1]: (Success)

Item [2]: (Success)

Item [3]: (Success)

Item [4]: (Success)

[INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-0]: 10

[INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-1]: 11

[INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-2]: 12

[INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-3]: 13

Unfortunately my java knowledge are not so advanced to fix the bug in reading 
the array in a single command, anyway there’s a workaround.

Hope this mail help some newbies like me to find the right way to read data 
from the PLC.

Regards,
Stefano

On 28/07/2020 11:38, Stefano Bossi wrote:

Dear plc4x forum,

I have found a possible problem in reading an array of INT.
I am using the HelloPlc4x app for testing and I am trying to read the field 
address: '%DB1:274.0:INT[3]'

In the request, captured via wireShark I can see the query:

Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on interface 
utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192

Transmission Control Protocol, Src Port: 54543, Dst Port: 102, Seq: 1, Ack: 1, 
Len: 31

TPKT, Version: 3, Length: 31

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Job)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 1

Item [1]: (DB 1.DBX 274.0 INT 3)

Variable specification: 0x12

Length of following address specification: 10

Syntax Id: S7ANY (0x10)

Transport size: INT (5)

Length: 3

DB number: 1

Area: Data blocks (DB) (0x84)

Address: 0x000890

and the response:

Frame 4: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on interface 
utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4

Transmission Control Protocol, Src Port: 102, Dst Port: 54543, Seq: 1, Ack: 32, 
Len: 31

TPKT, Version: 3, Length: 31

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Ack_Data)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 1

Data

Item [1]: (Success)

Return code: Success (0xff)

Transport size: INTEGER (0x05)

Length: 6

Data: 000a000b000c

The 3 INT I would like to re

Re: Reading Array of Int

2020-07-29 Thread Christofer Dutz
Well that’s a workaround, but not a fix …

We should focus on fixing this.

I’ll investigate the issue as soon as I’m done with the Beckhoff ADS/AMS stuff …

Perhaps Julian could find some time to investigate?

Chris



Von: Stefano Bossi 
Antworten an: 
Datum: Mittwoch, 29. Juli 2020 um 11:41
An: 
Betreff: Re: Reading Array of Int


I have adopted a workaround reading all the INT variable separated.

--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200' 
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT' 
'%DB1:280.0:INT'

In this way on the wire you have:
the query:

Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits) on 
interface utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192

Transmission Control Protocol, Src Port: 57188, Dst Port: 102, Seq: 48, Ack: 
50, Len: 67

TPKT, Version: 3, Length: 67

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Job)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 4

Item [1]: (DB 1.DBX 274.0 INT 1)

Item [2]: (DB 1.DBX 276.0 INT 1)

Item [3]: (DB 1.DBX 278.0 INT 1)

Item [4]: (DB 1.DBX 280.0 INT 1)

the answer:

Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on 
interface utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4

Transmission Control Protocol, Src Port: 102, Dst Port: 57188, Seq: 50, Ack: 
115, Len: 45

TPKT, Version: 3, Length: 45

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Ack_Data)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 4

Data

Item [1]: (Success)

Item [2]: (Success)

Item [3]: (Success)

Item [4]: (Success)

[INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-0]: 10

[INFO ] 10:15:44.733 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-1]: 11

[INFO ] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-2]: 12

[INFO ] 10:15:44.741 it.fox.datapicker.HelloPlc4x.printResponse() - 
Value[value-3]: 13

Unfortunately my java knowledge are not so advanced to fix the bug in reading 
the array in a single command, anyway there’s a workaround.

Hope this mail help some newbies like me to find the right way to read data 
from the PLC.

Regards,
Stefano

On 28/07/2020 11:38, Stefano Bossi wrote:

Dear plc4x forum,

I have found a possible problem in reading an array of INT.
I am using the HelloPlc4x app for testing and I am trying to read the field 
address: '%DB1:274.0:INT[3]'

In the request, captured via wireShark I can see the query:

Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on interface 
utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.100.4, Dst: 192.168.1.192

Transmission Control Protocol, Src Port: 54543, Dst Port: 102, Seq: 1, Ack: 1, 
Len: 31

TPKT, Version: 3, Length: 31

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Job)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 1

Item [1]: (DB 1.DBX 274.0 INT 3)

Variable specification: 0x12

Length of following address specification: 10

Syntax Id: S7ANY (0x10)

Transport size: INT (5)

Length: 3

DB number: 1

Area: Data blocks (DB) (0x84)

Address: 0x000890

and the response:

Frame 4: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on interface 
utun2, id 0

Null/Loopback

Internet Protocol Version 4, Src: 192.168.1.192, Dst: 192.168.100.4

Transmission Control Protocol, Src Port: 102, Dst Port: 54543, Seq: 1, Ack: 32, 
Len: 31

TPKT, Version: 3, Length: 31

ISO 8073/X.224 COTP Connection-Oriented Transport Protocol

S7 Communication

Header: (Ack_Data)

Parameter: (Read Var)

Function: Read Var (0x04)

Item count: 1

Data

Item [1]: (Success)

Return code: Success (0xff)

Transport size: INTEGER (0x05)

Length: 6

Data: 000a000b000c

The 3 INT I would like to read are there: 000a, 000b, 000c but in the response 
of:

PlcReadResponse syncResponse = readRequest.execute().get();

only the first one is present.

I read in jira that there was a similar bug here 
PLC4X-57<https://issues.apache.org/jira/browse/PLC4X-57>, is this the same 
problem?

Thanks for your help.

Regards,
Steafano Bossi
​
​


Re: Reading Array of Int

2020-07-29 Thread Stefano Bossi
I have adopted a workaround reading all the INT variable separated.

|--connection-string 's7:tcp://192.168.1.192?controller-type=S7_1200'
--field-addresses '%DB1:274.0:INT' '%DB1:276.0:INT' '%DB1:278.0:INT'
'%DB1:280.0:INT' |

In this way on the wire you have:
the query:

|Frame 296: 111 bytes on wire (888 bits), 111 bytes captured (888 bits)
on interface utun2, id 0 Null/Loopback Internet Protocol Version 4, Src:
192.168.100.4, Dst: 192.168.1.192 Transmission Control Protocol, Src
Port: 57188, Dst Port: 102, Seq: 48, Ack: 50, Len: 67 TPKT, Version: 3,
Length: 67 ISO 8073/X.224 COTP Connection-Oriented Transport Protocol S7
Communication Header: (Job) Parameter: (Read Var) Function: Read Var
(0x04) Item count: 4 Item [1]: (DB 1.DBX 274.0 INT 1) Item [2]: (DB
1.DBX 276.0 INT 1) Item [3]: (DB 1.DBX 278.0 INT 1) Item [4]: (DB 1.DBX
280.0 INT 1) |

the answer:

|Frame 297: 89 bytes on wire (712 bits), 89 bytes captured (712 bits) on
interface utun2, id 0 Null/Loopback Internet Protocol Version 4, Src:
192.168.1.192, Dst: 192.168.100.4 Transmission Control Protocol, Src
Port: 102, Dst Port: 57188, Seq: 50, Ack: 115, Len: 45 TPKT, Version: 3,
Length: 45 ISO 8073/X.224 COTP Connection-Oriented Transport Protocol S7
Communication Header: (Ack_Data) Parameter: (Read Var) Function: Read
Var (0x04) Item count: 4 Data Item [1]: (Success) Item [2]: (Success)
Item [3]: (Success) Item [4]: (Success) |

|[INFO ] 10:15:44.727 it.fox.datapicker.HelloPlc4x.printResponse() -
Value[value-0]: 10 [INFO ] 10:15:44.733
it.fox.datapicker.HelloPlc4x.printResponse() - Value[value-1]: 11 [INFO
] 10:15:44.737 it.fox.datapicker.HelloPlc4x.printResponse() -
Value[value-2]: 12 [INFO ] 10:15:44.741
it.fox.datapicker.HelloPlc4x.printResponse() - Value[value-3]: 13 |

Unfortunately my java knowledge are not so advanced to fix the bug in
reading the array in a single command, anyway there’s a workaround.

Hope this mail help some newbies like me to find the right way to read
data from the PLC.

Regards,
Stefano

On 28/07/2020 11:38, Stefano Bossi wrote:

> Dear plc4x forum,
>
> I have found a possible problem in reading an array of INT.
> I am using the HelloPlc4x app for testing and I am trying to read the
> field address: |'%DB1:274.0:INT[3]'|
>
> In the request, captured via wireShark I can see the query:
>
> |Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on
> interface utun2, id 0 Null/Loopback Internet Protocol Version 4, Src:
> 192.168.100.4, Dst: 192.168.1.192 Transmission Control Protocol, Src
> Port: 54543, Dst Port: 102, Seq: 1, Ack: 1, Len: 31 TPKT, Version: 3,
> Length: 31 ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
> S7 Communication Header: (Job) Parameter: (Read Var) Function: Read
> Var (0x04) Item count: 1 Item [1]: (DB 1.DBX 274.0 INT 3) Variable
> specification: 0x12 Length of following address specification: 10
> Syntax Id: S7ANY (0x10) Transport size: INT (5) Length: 3 DB number: 1
> Area: Data blocks (DB) (0x84) Address: 0x000890 |
>
> and the response:
>
> |Frame 4: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on
> interface utun2, id 0 Null/Loopback Internet Protocol Version 4, Src:
> 192.168.1.192, Dst: 192.168.100.4 Transmission Control Protocol, Src
> Port: 102, Dst Port: 54543, Seq: 1, Ack: 32, Len: 31 TPKT, Version: 3,
> Length: 31 ISO 8073/X.224 COTP Connection-Oriented Transport Protocol
> S7 Communication Header: (Ack_Data) Parameter: (Read Var) Function:
> Read Var (0x04) Item count: 1 Data Item [1]: (Success) Return code:
> Success (0xff) Transport size: INTEGER (0x05) Length: 6 Data:
> 000a000b000c |
>
> The 3 INT I would like to read are there: |000a|, |000b|, |000c| but
> in the response of:
>
> |PlcReadResponse syncResponse = readRequest.execute().get(); |
>
> only the first one is present.
>
> I read in jira that there was a similar bug here PLC4X-57
> <https://issues.apache.org/jira/browse/PLC4X-57>, is this the same
> problem?
>
> Thanks for your help.
>
> Regards,
> Steafano Bossi
>
> ​

​


signature.asc
Description: OpenPGP digital signature


Reading Array of Int

2020-07-28 Thread Stefano Bossi
Dear plc4x forum,

I have found a possible problem in reading an array of INT.
I am using the HelloPlc4x app for testing and I am trying to read the
field address: |'%DB1:274.0:INT[3]'|

In the request, captured via wireShark I can see the query:

|Frame 3: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on
interface utun2, id 0 Null/Loopback Internet Protocol Version 4, Src:
192.168.100.4, Dst: 192.168.1.192 Transmission Control Protocol, Src
Port: 54543, Dst Port: 102, Seq: 1, Ack: 1, Len: 31 TPKT, Version: 3,
Length: 31 ISO 8073/X.224 COTP Connection-Oriented Transport Protocol S7
Communication Header: (Job) Parameter: (Read Var) Function: Read Var
(0x04) Item count: 1 Item [1]: (DB 1.DBX 274.0 INT 3) Variable
specification: 0x12 Length of following address specification: 10 Syntax
Id: S7ANY (0x10) Transport size: INT (5) Length: 3 DB number: 1 Area:
Data blocks (DB) (0x84) Address: 0x000890 |

and the response:

|Frame 4: 75 bytes on wire (600 bits), 75 bytes captured (600 bits) on
interface utun2, id 0 Null/Loopback Internet Protocol Version 4, Src:
192.168.1.192, Dst: 192.168.100.4 Transmission Control Protocol, Src
Port: 102, Dst Port: 54543, Seq: 1, Ack: 32, Len: 31 TPKT, Version: 3,
Length: 31 ISO 8073/X.224 COTP Connection-Oriented Transport Protocol S7
Communication Header: (Ack_Data) Parameter: (Read Var) Function: Read
Var (0x04) Item count: 1 Data Item [1]: (Success) Return code: Success
(0xff) Transport size: INTEGER (0x05) Length: 6 Data: 000a000b000c |

The 3 INT I would like to read are there: |000a|, |000b|, |000c| but in
the response of:

|PlcReadResponse syncResponse = readRequest.execute().get(); |

only the first one is present.

I read in jira that there was a similar bug here PLC4X-57
<https://issues.apache.org/jira/browse/PLC4X-57>, is this the same problem?

Thanks for your help.

Regards,
Steafano Bossi

​


signature.asc
Description: OpenPGP digital signature