Thanks All ....I finally got a chance to test ...created test program but I
am getting this error  , I have connected DF1 serial cable to RPI
waveshare serial hat which has two serial error ....PLC 5 is running at
baud rate of 2400 and its connected rpi on /dev/ttySC1 ....am I getting
below error of some hardware issue ...how do specify baud rate and serial
channel when I am creating connection ?

error Error creating channel.


On Tue, Feb 23, 2021 at 1:30 PM Julian Feinauer <
[email protected]> wrote:

> Hey,
>
> as far as I see your code looks good Gaurav, lets try it and then report :
> )
>
> Best
> Julian
>
> Von: Gaurav P <[email protected]>
> Datum: Samstag, 20. Februar 2021 um 19:14
> An: [email protected] <[email protected]>
> Betreff: Re: DF1 protocol ...cant find documentation
> Thanks Chris ... its working ...i added both entries in maven on Monday
> when I have access to the hardware (AB PLC/5 30) I will test and report
> back
>
> But for the test case, I am was thinking
>
>    1. Write a value to register like N71
>    2. Read from register  and confirm value  N71
>
> Kindly review the code below  for testing
>   try (PlcConnection plcConnection = new
> PlcDriverManager().getConnection("df1:serial:///ttySC1")) {
>
>          *   //I want write to register N71 , is below code ok ?*
>             PlcReadRequest request = plcConnection.readRequestBuilder()
>                     .addItem("N71", "5:INTEGER")
>                     .build();
>
>             PlcReadResponse response = request.execute().get(100,
> TimeUnit.SECONDS);
>
> // Check if this connection support reading of data.
>             if (!plcConnection.getMetadata().canRead()) {
>                 System.out.println("This connection doesn't support
> reading.");
>                 return "This connection doesn't support reading.";
>             }else {
> // TODO: get the actual read bytes from the response
>                 System.out.println(response);
>                 System.out.println("Response code was " +
> response.getResponseCode("erster"));
>
>                 System.out.println("Response I got was" +
> response.getAllIntegers("N71"));
>           *      //I want Read to register N71 , is below code ok ?*
>                 return response.getAllIntegers("N71").iterator().next()+"";
>             }
>
>
>
>
> On Sat, Feb 20, 2021 at 10:52 PM Gaurav P <[email protected]> wrote:
>
> > Hi Chirs ,
> > Thanks I had suspected the same thing
> >
> > I was able to make it work via adding an apache repository  (after I
> > changed the maven snippet you  had given  from  pluginRepositories to
> > repositories ) and DF1 guide
> > <
> https://docs.google.com/document/d/1FWmwJfXVD03MLtHVsJ0UizoA6D5KzU9JG4VRD-lInGI/edit#
> <
> https://docs.google.com/document/d/1FWmwJfXVD03MLtHVsJ0UizoA6D5KzU9JG4VRD-lInGI/edit
> >>
> > (wip)
> >
> > <repositories>
> >   <repository>
> >     <id>apache-snapshots</id>
> >     <url>https://repository.apache.org/content/repositories/snapshots
> </url>
> >     <releases>
> >       <enabled>false</enabled>
> >     </releases>
> >     <snapshots>
> >       <enabled>true</enabled>
> >     </snapshots>
> >   </repository>
> > </repositories>
> >
> >
> > On Sat, Feb 20, 2021 at 10:07 PM Christofer Dutz <
> > [email protected]> wrote:
> >
> >> Hi,
> >>
> >> the solution was quite simple:
> >>
> >> First off all, we don't release stuff in the Sandbox. So there's no
> 0.8.0
> >> version.
> >> Secondly our SNAPSHOTS aren't available from Maven-Central. You need to
> >> add the Apache SNAPSHOT repo to your project.
> >>
> >> In order to do this, please add this to your pom.
> >>
> >>   <!-- Make Snapshots of Apache projects available -->
> >>   <repositories>
> >>     <repository>
> >>       <id>apache-snapshots</id>
> >>       <url>https://repository.apache.org/content/repositories/snapshots
> >> </url>
> >>       <releases>
> >>         <enabled>false</enabled>
> >>       </releases>
> >>       <snapshots>
> >>         <enabled>true</enabled>
> >>       </snapshots>
> >>     </repository>
> >>   </repositories>
> >>
> >>   <!-- Make Snapshots of Apache plugins available -->
> >>   <pluginRepositories>
> >>     <pluginRepository>
> >>       <id>apache-snapshots</id>
> >>       <url>https://repository.apache.org/content/repositories/snapshots
> >> </url>
> >>       <releases>
> >>         <enabled>false</enabled>
> >>       </releases>
> >>       <snapshots>
> >>         <enabled>true</enabled>
> >>       </snapshots>
> >>     </pluginRepository>
> >>   </pluginRepositories>
> >>
> >> That should help.
> >>
> >> Chris
> >>
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: Christofer Dutz <[email protected]>
> >> Gesendet: Samstag, 20. Februar 2021 10:13
> >> An: [email protected]
> >> Betreff: Re: DF1 protocol ...cant find documentation
> >>
> >> I'll have a look why this is not available.
> >>
> >> Holen Sie sich Outlook für Android<https://aka.ms/ghei36>
> >>
> >> ________________________________
> >> From: Gaurav P <[email protected]>
> >> Sent: Saturday, February 20, 2021 6:19:38 AM
> >> To: [email protected] <[email protected]>
> >> Subject: Re: DF1 protocol ...cant find documentation
> >>
> >> Hi Chris ,
> >>
> >> I also  tried with 0.8 , but no luck<dependency>
> >>
> >>   <groupId>org.apache.plc4x.sandbox</groupId>
> >>   <artifactId>test-java-df1-driver</artifactId>
> >>   <version>0.8.0</version>
> >> </dependency>
> >>
> >>
> >> On Sat, Feb 20, 2021 at 7:15 AM Gaurav P <[email protected]> wrote:
> >>
> >> > Hi Chris ,
> >> >
> >> > I am not able to maven dependency for df1 driver Cannot resolve
> >> > org.apache.plc4x.sandbox:test-java-df1-driver:0.9.0-SNAPSHOT
> >> >
> >> > is it not hosted in maven central?
> >> >
> >> > On Fri, Feb 19, 2021 at 6:58 PM Christofer Dutz
> >> > <[email protected]>
> >> > wrote:
> >> >
> >> >> Hi Gaurav,
> >> >>
> >> >> you haven't added a dependency to the driver, but to the protocol
> >> >> specificaton instead.
> >> >> This is something we use internally to generate the driver code in
> >> >> various languages. You need to add a dependency to
> >> >>
> >> >> <dependency>
> >> >>     <groupId>org.apache.plc4x.sandbox</groupId>
> >> >>     <artifactId>test-java-df1-driver</artifactId>
> >> >>     <version>0.9.0-SNAPSHOT</version> </dependency>
> >> >>
> >> >> Chris
> >> >>
> >> >> -----Ursprüngliche Nachricht-----
> >> >> Von: Gaurav P <[email protected]>
> >> >> Gesendet: Freitag, 19. Februar 2021 14:20
> >> >> An: [email protected]
> >> >> Betreff: Re: DF1 protocol ...cant find documentation
> >> >>
> >> >> Thanks Chris , Steven
> >> >>
> >> >> I tried the code below but I am getting following error *error Unable
> >> >> to find driver for protocol 'df1'*
> >> >>
> >> >> I checked in maven DF1 is added ...what can be the issue ?
> >> >>
> >> >>
> >> >>
> >> >> try (PlcConnection plcConnection = new
> >> >> PlcDriverManager().getConnection("df1:serial:///ttySC1")) {
> >> >>     PlcReadRequest request = plcConnection.readRequestBuilder()
> >> >>             .addItem("ind4", "5:INTEGER")
> >> >>             .build();
> >> >>
> >> >>
> >> >> <dependency>
> >> >>   <groupId>org.apache.plc4x</groupId>
> >> >>   <artifactId>plc4x-protocols-df1</artifactId>
> >> >>   <version>0.8.0</version>
> >> >> </dependency>
> >> >>
> >> >>
> >> >> On Fri, Feb 19, 2021 at 6:20 PM Christofer Dutz <
> >> >> [email protected]>
> >> >> wrote:
> >> >>
> >> >> > Hi Gaurav,
> >> >> >
> >> >> > that's generally just something used during development ... It
> >> >> > wasn't intended to be used as a standalone application.
> >> >> > If you want to use it to experiment, you have to replace the
> >> >> > connection string (currently "df1:serial:///COM4" with something
> >> >> > for your case and then add/adjust the items added to the Read
> >> Request.
> >> >> >
> >> >> > Chris
> >> >> >
> >> >> >
> >> >> > -----Ursprüngliche Nachricht-----
> >> >> > Von: Gaurav P <[email protected]>
> >> >> > Gesendet: Freitag, 19. Februar 2021 13:16
> >> >> > An: [email protected]
> >> >> > Betreff: Re: DF1 protocol ...cant find documentation
> >> >> >
> >> >> > Hi Team /Lucas ...
> >> >> > Thanks  for comments ...
> >> >> >
> >> >> > Should I use this program to test to PLC 500
> >> >> >
> >> >> >
> >> >> >
> https://github.com/apache/plc4x/blob/develop/sandbox/test-java-df1-
> >> >> > dri
> >> >> > ver/src/test/java/org/apache/plc4x/protocol/df1/EndToEndTest.java
> >> >> >
> >> >> >
> >> >> > Also how do I specify address ?
> >> >> >
> >> >> >  PlcReadRequest request = plcConnection.readRequestBuilder()
> >> >> >
> >> >> >                 .addItem("hurz", "5:INTEGER") ->>>>*is this address
> >> >> > of register ???*
> >> >> >
> >> >> >                 .build();
> >> >> >
> >> >> >
> >> >> > On Fri, Feb 19, 2021 at 5:12 PM Gaurav P <[email protected]> wrote:
> >> >> >
> >> >> > > Hi Team,
> >> >> > >
> >> >> > > I followed the link which was shared by Lukas and Chris and
> >> >> > > managed to dish out the guide with sample code , which I would be
> >> >> > > testing AB PLC 500
> >> >> > >
> >> >> > > *
> https://docs.google.com/document/d/1FWmwJfXVD03MLtHVsJ0UizoA6D5K
> >> >> > > zU9
> >> >> > > JG
> >> >> > > 4VRD-lInGI/edit?usp=sharing
> >> >> > > <
> https://docs.google.com/document/d/1FWmwJfXVD03MLtHVsJ0UizoA6D5K
> >> >> > > zU9 JG 4VRD-lInGI/edit?usp=sharing>  * I have some questions in
> >> >> > > the above document (marked read), it would be great if can get
> >> >> > > comments, a post that will compile and run in RPI connect to PLC
> >> >> > >
> >> >> > > Thanks
> >> >> > >
> >> >> > > On Fri, Feb 19, 2021 at 3:25 PM Stephen Snow <[email protected]>
> >> >> wrote:
> >> >> > >
> >> >> > >> I can get this tested on both serial and ethernet/ip. I also
> >> >> > >> have ther
> >> >> > >> DF1 protocol manual.
> >> >> > >>
> >> >> > >> Stephen
> >> >> > >> On Fri, 2021-02-19 at 15:22 +0530, Gaurav P wrote:
> >> >> > >> > Thanks Chris ... I have access to an ancient AB PLC 5/260  and
> >> >> > >> > will start testing and report back to you .....transport link
> >> >> > >> > would be serial ...hope it wont be any issue  After I go
> >> >> > >> > through the docs , hope its not too complex , I maybe able to
> >> >> > >> > maintain and test driver
> >> >> > >> >
> >> >> > >> > On Fri, Feb 19, 2021 at 1:07 PM Christofer Dutz
> >> >> > >> > <[email protected]>
> >> >> > >> > wrote:
> >> >> > >> >
> >> >> > >> > > Hi Gaurav,
> >> >> > >> > >
> >> >> > >> > > also from my side, welcome :-)
> >> >> > >> > >
> >> >> > >> > > I think the DF1 was one of the first tob e created with the
> >> >> > >> > > new code-generation framework.
> >> >> > >> > > However due to lack of hardware to test on, it's still
> >> >> > >> > > located in the "Sandbox" and got a "test" prefix on it.
> >> >> > >> > >
> >> >> > >> > >     <dependency>
> >> >> > >> > >         <groupId>org.apache.plc4x.sandbox</groupId>
> >> >> > >> > >         <artifactId>test-java-df1-driver</artifactId>
> >> >> > >> > >         <version>0.9.0-SNAPSHOT</version>
> >> >> > >> > >     </dependency>
> >> >> > >> > >
> >> >> > >> > > Also I think it supports all features that were needed by
> >> >> > >> > > the folks that implemented it, but probably not much more
> >> than that.
> >> >> > >> > >
> >> >> > >> > > So please test it. If you need it to do more and you've got
> >> >> > >> > > a device you can test it with, we'd be happy to help you
> with
> >> that.
> >> >> > >> > >
> >> >> > >> > > Chris
> >> >> > >> > >
> >> >> > >> > >
> >> >> > >> > > -----Ursprüngliche Nachricht-----
> >> >> > >> > > Von: Lukas Ott <[email protected]>
> >> >> > >> > > Gesendet: Freitag, 19. Februar 2021 07:33
> >> >> > >> > > An: [email protected]
> >> >> > >> > > Betreff: Re: DF1 protocol ...cant find documentation
> >> >> > >> > >
> >> >> > >> > > Hi Gaurav,
> >> >> > >> > >
> >> >> > >> > > Welcome to the list :-),
> >> >> > >> > >
> >> >> > >> > > Yes it really is supported. Here you ll find some more
> >> details:
> >> >> > >> > >
> https://plc4x.apache.org/developers/code-gen/protocol/df1.ht
> >> >> > >> > > ml
> >> >> > >> > >
> >> >> > >> > > The best way to get started you can find here:
> >> >> > >> > > https://plc4x.apache.org/users/getting-started/plc4j.html
> >> >> > >> > > to understand more read here:
> >> >> > >> > >
> https://plc4x.apache.org/users/getting-started/general-conce
> >> >> > >> > > pts
> >> >> > >> > > .h
> >> >> > >> > > tml
> >> >> > >> > >
> >> >> > >> > > For release 0.6 you ll find the java code here:
> >> >> > >> > >
> >> >> > >> > >
> >> >> > >>
> https://github.com/apache/plc4x/blob/rel/0.6/protocols/df1/src/m
> >> >> > >> ain /j ava/org/apache/plc4x/protocol/df1/Df1Protocol.java
> >> >> > >> > >
> >> >> > >> > >
> >> >> > >> > > Example code you ll find here:
> >> >> > >> > > https://github.com/apache/plc4x/tree/develop/plc4j/examples
> >> >> > >> > >
> >> >> > >> > > Currently not sure if we ported DF1 to release 0.8
> >> >> > >> > >
> >> >> > >> > > Cheers,
> >> >> > >> > > otluk
> >> >> > >> > >
> >> >> > >> > > Am Fr., 19. Feb. 2021 um 03:41 Uhr schrieb Gaurav P <
> >> >> [email protected]>:
> >> >> > >> > >
> >> >> > >> > > > Hi Team ,
> >> >> > >> > > > I am new to PLC4x , trying to integrate with DF1 but cant
> >> >> > >> > > > find any documentation ....
> >> >> > >> > > > https://plc4x.apache.org/users/protocols/df1.html
> >> >> > >> > > >
> >> >> > >> > > > is it really supported? if yes where can I get
> >> >> > >> > > > documentation and an example code
> >> >> > >> > > > --
> >> >> > >> > > > B*e * the *Ch*ange
> >> >> > >> > > >
> >> >> > >> > >
> >> >> > >> >
> >> >> > >> >
> >> >> > >>
> >> >> > >>
> >> >> > >>
> >> >> > >
> >> >> > > --
> >> >> > > B*e * the *Ch*ange
> >> >> > >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > B*e * the *Ch*ange
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> B*e * the *Ch*ange
> >> >>
> >> >
> >> >
> >> > --
> >> > B*e * the *Ch*ange
> >> >
> >>
> >>
> >> --
> >> B*e * the *Ch*ange
> >>
> >
> >
> > --
> > B*e * the *Ch*ange
> >
>
>
> --
> B*e * the *Ch*ange
>


-- 
B*e * the *Ch*ange

Reply via email to