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" 
>>  :
>>
>>  
>>
>>     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 

[BUILD-STABLE]: Job 'PLC4X/PLC4X/develop [develop] [32]'

2020-08-11 Thread Apache Jenkins Server
BUILD-STABLE: Job 'PLC4X/PLC4X/develop [develop] [32]':

Is back to normal.

[BUILD-UNSTABLE]: Job 'PLC4X/PLC4X/develop [develop] [31]'

2020-08-11 Thread Apache Jenkins Server
BUILD-UNSTABLE: Job 'PLC4X/PLC4X/develop [develop] [31]':

Check console output at "https://ci-builds.apache.org/job/PLC4X/job/PLC4X/job/develop/31/;>PLC4X/PLC4X/develop
 [develop] [31]"

[BUILD-STABLE]: Job 'PLC4X/PLC4X/develop [develop] [30]'

2020-08-11 Thread Apache Jenkins Server
BUILD-STABLE: Job 'PLC4X/PLC4X/develop [develop] [30]':

Is back to normal.

RE: plc4j-protocol-ads not registering

2020-08-11 Thread Patrick Boisclair
Hi Chris,


Thank you very much for your help, really really appreciated.


In fact, we are evaluating PLC4X for one of our next big project.

I'm currently, just trying to make a "proof of concept".


Unfortunatly, I'm not a Java expert [☹] . Sorry, for my lack of knowledge...

We usually use C# (.net Core) as our main language, some Go (MicroServices),  
Flutter for our Mobile apps and TypeScript (Angular) for Web)




The project consist of this (1 java file):


package PLC4XTest;

import org.apache.plc4x.java.PlcDriverManager;
import org.apache.plc4x.java.api.PlcConnection;
import org.apache.plc4x.java.api.exceptions.PlcConnectionException;

public class App {
public static void main(String[] args) throws PlcConnectionException {
PlcDriverManager driver = new PlcDriverManager();

try {
PlcConnection connection = driver.getConnection("ads:tcp://...");  
//address hidden on purpose
} catch (Exception e) {
e.printStackTrace();
}

}
}

And the entire pom.xml file: (

NOTE: I changed the version as suggested)




http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
  4.0.0

  org.noovelia.plc4xtest
  plc4xtest
  1

  plc4xtest
  
  http://www.example.com

  
UTF-8
1.7
1.7
  

  

  junit
  junit
  4.11
  test


  org.apache.plc4x
  plc4j-api
  0.6.0


  org.apache.plc4x
  plc4j-protocol-ads
  0.6.0


  org.apache.plc4x
  plc4j-driver-s7
  0.6.0


  org.apache.plc4x
  plc4j-driver-opcua
  0.6.0


  org.slf4j
  slf4j-simple
  1.7.30

  

  

  
  


  maven-clean-plugin
  3.1.0



  maven-resources-plugin
  3.0.2


  maven-compiler-plugin
  3.8.0


  maven-surefire-plugin
  2.22.1


  maven-jar-plugin
  3.0.2


  maven-install-plugin
  2.5.2


  maven-deploy-plugin
  2.8.2



  maven-site-plugin
  3.7.1


  maven-project-info-reports-plugin
  3.0.0

  

  




Hope it gives you more info, and leas take my sincere thank you for you help.



Patrick Boisclair
Analyste - Programmeur senior / Senior Analyst Programmer

[cid:imageb437c6.PNG@ba18e707.4cabefa1]


462, rue des Forges, Trois-Rivières (Québec) G9A 2H5 CANADA
noovelia.com

"Veuillez noter ma nouvelle adresse courriel. / Please note my new email 
address."

De : Christofer Dutz 
Envoyé : 11 août 2020 02:59
À : dev@plc4x.apache.org
Objet : Re: plc4j-protocol-ads not registering

Hi Patrick,

first of all welcome here on our list. We will do our best to assist you.

I did notice a few things:

  *   You are using the API in version 0.6.0 but the drivers in 0.5.0 … I would 
strongly suggest not to mix versions
  *   The drivers you are using are in version 0.5.0 … I would suggest to 
update to version 0.6.0 as the 0.7.0 or 0.8.0-SNAPSHOT version don’t have ADS 
support yet

Are you using any form of “Fat-Jar” or shaded archive approach? Cause we have 
seen this behavior in these cases. The problem is that every driver has a 
property file in “META-INF/services” … each lists only the driver the module 
provides. So in case of the default settings the plugins for creating the fat 
jars just take one of these property files and skips the rest. You can however 
configure it to merge the content. For an example on this please see the 
examples pom.xml



  org.apache.maven.plugins
  maven-shade-plugin
  

  generate-uber-jar
  package
  
shade
  
  

  
${app.main.class}
  

  

  


Hope that helps, if not … just come back and we’ll try to help you.


Chris









Von: Patrick Boisclair 
Antworten an: "dev@plc4x.apache.org" 
Datum: Montag, 10. August 2020 um 20:15
An: "dev@plc4x.apache.org" 
Betreff: plc4j-protocol-ads not registering


Hi,



I do have a question about "Ads (Beckhoff) protocol".



Im using S7 and OPCUA, and both are registering in the available drivers.

However, the ads one is not.



Here is my dependecies:



  junit
  junit
  4.11
  test


  org.apache.plc4x
  plc4j-api
  0.6.0


  org.apache.plc4x
  plc4j-protocol-ads
  0.5.0


  org.apache.plc4x
  plc4j-driver-s7
  0.5.0


  org.apache.plc4x
  plc4j-driver-opcua
  0.5.0



Here is the error:


main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating 

[BUILD-UNSTABLE]: Job 'PLC4X/PLC4X/develop [develop] [29]'

2020-08-11 Thread Apache Jenkins Server
BUILD-UNSTABLE: Job 'PLC4X/PLC4X/develop [develop] [29]':

Check console output at "https://ci-builds.apache.org/job/PLC4X/job/PLC4X/job/develop/29/;>PLC4X/PLC4X/develop
 [develop] [29]"

[BUILD-UNSTABLE]: Job 'PLC4X/PLC4X/develop [develop] [28]'

2020-08-11 Thread Apache Jenkins Server
BUILD-UNSTABLE: Job 'PLC4X/PLC4X/develop [develop] [28]':

Check console output at "https://ci-builds.apache.org/job/PLC4X/job/PLC4X/job/develop/28/;>PLC4X/PLC4X/develop
 [develop] [28]"

Re: Beer, Python and PLC4X

2020-08-11 Thread Lukas Ott
Hi Python-developers,

If you want to participate in our Kick-Off session tomorrow 8 PM (UTC+2).

Please send us an e-mail so we can provide you with more details (Meeting
Link)

Thank you! :-) see you there!

Kind regards
Lukas

Am So., 9. Aug. 2020 um 18:16 Uhr schrieb Lukas Ott :

> Hi Python-developers,
>
> We decided to have an initial session on wednesday  12 august 2020, 8 PM
> (UTC+2) .
> Goal: High-Level Plan -> Features and Milestones That then can be
> easier broke down into feasible task during the workshops.
>
> Everyone is welcome to join who likes Python :-) and PLCs
>
> Kind regards
> Lukas
>
> Am So., 9. Aug. 2020 um 11:04 Uhr schrieb Lukas Ott <
> ott.lukas...@gmail.com>:
>
>> Hi Python-developers,
>>
>> I decided to propose a workshop for kick-off the python development
>>
>> Currently aimed for these 4 options here:
>> https://doodle.com/poll/ph6dpg45ay8tepze
>>
>> The idea is to create a backlog - with t-shirt sized tasks / user
>> stories. So the development can be more shared and gets more transparent
>> what needs to be done.
>>
>> Feedback is very welcome.
>>
>> Workshop idea is to meet at a certain time discuss for 1-2 hours max -
>> Agenda and High-level Backlog and then just start as you see fit to you
>> personal plans and time.
>>
>> The idea is to start the development as a community again and share the
>> work -  Everyone is welcome to support and participate and have fun! :-)
>>
>> #python #plc
>>
>> Kind regards
>> Lukas
>>
>> Am Mo., 6. Juli 2020 um 17:17 Uhr schrieb Volker Emmert <
>> v.emm...@pragmaticminds.de>:
>>
>>> My fridge is ready.
>>>
>>>
>>> Am 06.07.20 um 16:47 schrieb Julian Feinauer:
>>>
>>> Hi friends,
>>>
>>> as discussed in Slack we are ready (with regards to build tools) fort he 
>>> initiative to work together on plc4py!
>>> So, no excuses for nobodfy (if python is to hard for you better stop right 
>>> here, you are no coder!).
>>>
>>> So who is interested and when should we start an evening session with, as 
>>> the title says, beer, python and plc4x?
>>> Probably we could also make a series out of it and do it step by step.
>>>
>>> WDYT?
>>> Julian
>>>
>>> --
>>>
>>> Mit freundlichen Grüßen
>>>
>>> Volker Emmert
>>>
>>>
>>>
>>>
>>> Entwicklungsingenieur
>>>
>>> T  +49 179 1290 416
>>>
>>> E  v.emm...@pragmaticminds.de
>>>
>>> W www.pragmaticminds.de
>>>
>>>
>>>
>>> 
>>> 
>>> 
>>>
>>>
>>>
>>> Jesingerstraße 57
>>>
>>> 73230 Kirchheim unter Teck
>>>
>>>
>>>
>>> pragmatic minds GmbH, Sitz: Kirchheim unter Teck, Amtsgericht Stuttgart
>>> - HRB 757136, Geschäftsführer: Dr. Julian Feinauer
>>>
>>


[BUILD-UNSTABLE]: Job 'PLC4X/PLC4X/develop [develop] [27]'

2020-08-11 Thread Apache Jenkins Server
BUILD-UNSTABLE: Job 'PLC4X/PLC4X/develop [develop] [27]':

Check console output at "https://ci-builds.apache.org/job/PLC4X/job/PLC4X/job/develop/27/;>PLC4X/PLC4X/develop
 [develop] [27]"

[BUILD-UNSTABLE]: Job 'PLC4X/PLC4X/develop [develop] [26]'

2020-08-11 Thread Apache Jenkins Server
BUILD-UNSTABLE: Job 'PLC4X/PLC4X/develop [develop] [26]':

Check console output at "https://ci-builds.apache.org/job/PLC4X/job/PLC4X/job/develop/26/;>PLC4X/PLC4X/develop
 [develop] [26]"

Re: plc4j-protocol-ads not registering

2020-08-11 Thread Christofer Dutz
Hi Patrick,

first of all welcome here on our list. We will do our best to assist you.

I did notice a few things:

  *   You are using the API in version 0.6.0 but the drivers in 0.5.0 … I would 
strongly suggest not to mix versions
  *   The drivers you are using are in version 0.5.0 … I would suggest to 
update to version 0.6.0 as the 0.7.0 or 0.8.0-SNAPSHOT version don’t have ADS 
support yet

Are you using any form of “Fat-Jar” or shaded archive approach? Cause we have 
seen this behavior in these cases. The problem is that every driver has a 
property file in “META-INF/services” … each lists only the driver the module 
provides. So in case of the default settings the plugins for creating the fat 
jars just take one of these property files and skips the rest. You can however 
configure it to merge the content. For an example on this please see the 
examples pom.xml



  org.apache.maven.plugins
  maven-shade-plugin
  

  generate-uber-jar
  package
  
shade
  
  

  
${app.main.class}
  

  

  


Hope that helps, if not … just come back and we’ll try to help you.


Chris









Von: Patrick Boisclair 
Antworten an: "dev@plc4x.apache.org" 
Datum: Montag, 10. August 2020 um 20:15
An: "dev@plc4x.apache.org" 
Betreff: plc4j-protocol-ads not registering


Hi,



I do have a question about "Ads (Beckhoff) protocol".



Im using S7 and OPCUA, and both are registering in the available drivers.

However, the ads one is not.



Here is my dependecies:



  junit
  junit
  4.11
  test


  org.apache.plc4x
  plc4j-api
  0.6.0


  org.apache.plc4x
  plc4j-protocol-ads
  0.5.0


  org.apache.plc4x
  plc4j-driver-s7
  0.5.0


  org.apache.plc4x
  plc4j-driver-opcua
  0.5.0



Here is the error:


main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC 
Driver Manager with class loader 
jdk.internal.loader.ClassLoaders$AppClassLoader@30946e09
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering available 
drivers...
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for 
Protocol s7 (Siemens S7 (Basic))
[main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for 
Protocol opcua (OPC UA (TCP))
org.apache.plc4x.java.api.exceptions.PlcConnectionException: Unable to find 
driver for protocol 'ads'
at 
org.apache.plc4x.java.PlcDriverManager.getDriver(PlcDriverManager.java:98)
at 
org.apache.plc4x.java.PlcDriverManager.getConnection(PlcDriverManager.java:71)
at PLC4XTest.App.main(App.java:12)


I don't know what I'm doing wrong for the ADS protocols, the other register 
just fine.



Can anyone help me pls ?



Thank you very much and best regards

Patrick Boisclair
Analyste - Programmeur senior / Senior Analyst Programmer

[cid:imagedccd7c.PNG@445fc9be.47b6fee8]


462, rue des Forges, Trois-Rivières (Québec) G9A 2H5 CANADA
noovelia.com

"Veuillez noter ma nouvelle adresse courriel. / Please note my new email 
address."