You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Christofer Dutz <ch...@c-ware.de> on 2019/02/06 10:31:35 UTC

[DISCUSS] Adding a "ping" method to the API?

Hi all,

Having had the same problem several times now, I think we might consider solving this …

I’ve had the problem that potential customers say things like “We communicate via S7” … well the thing is they have an S7, but that doesn’t mean the communication is done in the native S7 protocol. It could be:

  *   Profinet
  *   S7Pluss (New TIA Version of the protocol)
  *   Modbus
  *   OPC-UA

So what I would like to do, is to add a “ping” method to the connection, that would allow to try connecting to a given PLC. With this we could write code that for example tries all supported protocols for a given IP address and reports which ones are enabled.
We could also write a PLC scanner that pings an IP range and tries pinging the different protocols for each responsive IP address … this would be a huge help for people using PLC4X applications in the field …

What do you think?

We sort of would need to define “ping” operations for each connection type (Like the “SELECT 1” SQL query in JDBC and JPA).

Chris

Re: [DISCUSS] Adding a "ping" method to the API?

Posted by Tim Mitsch <t....@pragmaticindustries.de>.
+1 from my side.
Ping is low cost and avoids unneeded connection traffic


Am 06.02.19, 11:31 schrieb "Christofer Dutz" <ch...@c-ware.de>:

    Hi all,
    
    Having had the same problem several times now, I think we might consider solving this …
    
    I’ve had the problem that potential customers say things like “We communicate via S7” … well the thing is they have an S7, but that doesn’t mean the communication is done in the native S7 protocol. It could be:
    
      *   Profinet
      *   S7Pluss (New TIA Version of the protocol)
      *   Modbus
      *   OPC-UA
    
    So what I would like to do, is to add a “ping” method to the connection, that would allow to try connecting to a given PLC. With this we could write code that for example tries all supported protocols for a given IP address and reports which ones are enabled.
    We could also write a PLC scanner that pings an IP range and tries pinging the different protocols for each responsive IP address … this would be a huge help for people using PLC4X applications in the field …
    
    What do you think?
    
    We sort of would need to define “ping” operations for each connection type (Like the “SELECT 1” SQL query in JDBC and JPA).
    
    Chris
    


Re: [DISCUSS] Adding a "ping" method to the API?

Posted by Julian Feinauer <j....@pragmaticminds.de>.
Big fat +1 !
Would make our connection pool way better, as we could check if a connections still alive...

Am 06.02.19, 11:31 schrieb "Christofer Dutz" <ch...@c-ware.de>:

    Hi all,
    
    Having had the same problem several times now, I think we might consider solving this …
    
    I’ve had the problem that potential customers say things like “We communicate via S7” … well the thing is they have an S7, but that doesn’t mean the communication is done in the native S7 protocol. It could be:
    
      *   Profinet
      *   S7Pluss (New TIA Version of the protocol)
      *   Modbus
      *   OPC-UA
    
    So what I would like to do, is to add a “ping” method to the connection, that would allow to try connecting to a given PLC. With this we could write code that for example tries all supported protocols for a given IP address and reports which ones are enabled.
    We could also write a PLC scanner that pings an IP range and tries pinging the different protocols for each responsive IP address … this would be a huge help for people using PLC4X applications in the field …
    
    What do you think?
    
    We sort of would need to define “ping” operations for each connection type (Like the “SELECT 1” SQL query in JDBC and JPA).
    
    Chris
    


Re: [DISCUSS] Adding a "ping" method to the API?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi all,

well the case I was thinking about was to be able to build tooling that is able to:
a) verify a PLC exists at a given IP Address
b) detect PLCs in the network and detect which protocols are enabled

I would like to make it easier to setup things.

Chris



Am 07.02.19, 14:14 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:

    Hi Jens,
    
    first, a warm welcome and cool to have you here on the list!
    
    I guess your idea works very well in case of "continuous" communication (like e.g. the scraper).
    But, where I'd like to have the "ping" is for the ProxyPlcDriver.
    In our application we use such a Proxy which manages all requests through a Pool of "real" connections (mostly one) to a PLC.
    In this scenario there can be situations where there is no communication for minutes and we'd like to ensure that the connection is still alive either frequently by a fixed interval (every minute) or if some client requests a new connection or returns it back (as most JDBC Pools do it).
    
    And a ping that really does nothing for each driver is preferable from my side against driver specific implementation (in the s7 case we could also use something like reading something from the LSZ which is always there) or so.
    
    @Chris: What is your exact use case for the ping?
    
    Julian
    
    Am 07.02.19, 14:03 schrieb "Jens Maier" <je...@hotmail.com>:
    
        Hi all,
        
        maybe there is no need for a ping. At the development of our driver we also got sometimes disconnects without any real issue. At the same issue our driver makes a complete disconnect at time out and by a configurable retry counter.
        After about 5 secs of no communication resume or overrun the counter, the driver signals Connection Error and answer each reading request with 0 to get no empty values.
        
        We also slow down the communication by Delay, when there was a error and slowly speed up to max.
        
        With this, we can unplug the cable for undetermined time and at the plug in, the driver continues with the communication.
        
        If this is interesting, i can post some VB6 code.
        
        Jens
        
        
        Von Outlook<http://aka.ms/weboutlook> gesendet.
        
        ________________________________
        Von: Markus Sommer <so...@isb-fn.de>
        Gesendet: Donnerstag, 7. Februar 2019 11:50
        An: dev@plc4x.apache.org
        Betreff: AW: [DISCUSS] Adding a "ping" method to the API?
        
        +1 from myside.
        
        It's good idea to search for PLCs or to realize an automatic configuration of the communication....
        
        Mit freundlichen Grüßen
        
        Markus Sommer
        Geschäftsführer
        
        isb innovative software businesses GmbH
        Otto-Lilienthal-Straße 2
        D 88046 Friedrichshafen
        
        Tel          +49 (0) 7541 3834-14
        Fax         +49 (0) 7541 3834-20
        Mobil    +49 (0) 171 537 8437
        
        Mail to  sommer@isb-fn.de
        http://www.isb-fn.de
        
        Geschäftsführer: Markus Sommer, Thomas Zeler
        Registergericht: Amtsgericht Ulm HRB-Nr. 631624
        Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person.
        Thank you.
        
        
        
        -----Ursprüngliche Nachricht-----
        Von: Christofer Dutz <ch...@c-ware.de>
        Gesendet: Mittwoch, 6. Februar 2019 11:32
        An: dev@plc4x.apache.org
        Betreff: [DISCUSS] Adding a "ping" method to the API?
        
        Hi all,
        
        Having had the same problem several times now, I think we might consider solving this …
        
        I’ve had the problem that potential customers say things like “We communicate via S7” … well the thing is they have an S7, but that doesn’t mean the communication is done in the native S7 protocol. It could be:
        
          *   Profinet
          *   S7Pluss (New TIA Version of the protocol)
          *   Modbus
          *   OPC-UA
        
        So what I would like to do, is to add a “ping” method to the connection, that would allow to try connecting to a given PLC. With this we could write code that for example tries all supported protocols for a given IP address and reports which ones are enabled.
        We could also write a PLC scanner that pings an IP range and tries pinging the different protocols for each responsive IP address … this would be a huge help for people using PLC4X applications in the field …
        
        What do you think?
        
        We sort of would need to define “ping” operations for each connection type (Like the “SELECT 1” SQL query in JDBC and JPA).
        
        Chris
        
    
    


Re: [DISCUSS] Adding a "ping" method to the API?

Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hi Jens,

first, a warm welcome and cool to have you here on the list!

I guess your idea works very well in case of "continuous" communication (like e.g. the scraper).
But, where I'd like to have the "ping" is for the ProxyPlcDriver.
In our application we use such a Proxy which manages all requests through a Pool of "real" connections (mostly one) to a PLC.
In this scenario there can be situations where there is no communication for minutes and we'd like to ensure that the connection is still alive either frequently by a fixed interval (every minute) or if some client requests a new connection or returns it back (as most JDBC Pools do it).

And a ping that really does nothing for each driver is preferable from my side against driver specific implementation (in the s7 case we could also use something like reading something from the LSZ which is always there) or so.

@Chris: What is your exact use case for the ping?

Julian

Am 07.02.19, 14:03 schrieb "Jens Maier" <je...@hotmail.com>:

    Hi all,
    
    maybe there is no need for a ping. At the development of our driver we also got sometimes disconnects without any real issue. At the same issue our driver makes a complete disconnect at time out and by a configurable retry counter.
    After about 5 secs of no communication resume or overrun the counter, the driver signals Connection Error and answer each reading request with 0 to get no empty values.
    
    We also slow down the communication by Delay, when there was a error and slowly speed up to max.
    
    With this, we can unplug the cable for undetermined time and at the plug in, the driver continues with the communication.
    
    If this is interesting, i can post some VB6 code.
    
    Jens
    
    
    Von Outlook<http://aka.ms/weboutlook> gesendet.
    
    ________________________________
    Von: Markus Sommer <so...@isb-fn.de>
    Gesendet: Donnerstag, 7. Februar 2019 11:50
    An: dev@plc4x.apache.org
    Betreff: AW: [DISCUSS] Adding a "ping" method to the API?
    
    +1 from myside.
    
    It's good idea to search for PLCs or to realize an automatic configuration of the communication....
    
    Mit freundlichen Grüßen
    
    Markus Sommer
    Geschäftsführer
    
    isb innovative software businesses GmbH
    Otto-Lilienthal-Straße 2
    D 88046 Friedrichshafen
    
    Tel          +49 (0) 7541 3834-14
    Fax         +49 (0) 7541 3834-20
    Mobil    +49 (0) 171 537 8437
    
    Mail to  sommer@isb-fn.de
    http://www.isb-fn.de
    
    Geschäftsführer: Markus Sommer, Thomas Zeler
    Registergericht: Amtsgericht Ulm HRB-Nr. 631624
    Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person.
    Thank you.
    
    
    
    -----Ursprüngliche Nachricht-----
    Von: Christofer Dutz <ch...@c-ware.de>
    Gesendet: Mittwoch, 6. Februar 2019 11:32
    An: dev@plc4x.apache.org
    Betreff: [DISCUSS] Adding a "ping" method to the API?
    
    Hi all,
    
    Having had the same problem several times now, I think we might consider solving this …
    
    I’ve had the problem that potential customers say things like “We communicate via S7” … well the thing is they have an S7, but that doesn’t mean the communication is done in the native S7 protocol. It could be:
    
      *   Profinet
      *   S7Pluss (New TIA Version of the protocol)
      *   Modbus
      *   OPC-UA
    
    So what I would like to do, is to add a “ping” method to the connection, that would allow to try connecting to a given PLC. With this we could write code that for example tries all supported protocols for a given IP address and reports which ones are enabled.
    We could also write a PLC scanner that pings an IP range and tries pinging the different protocols for each responsive IP address … this would be a huge help for people using PLC4X applications in the field …
    
    What do you think?
    
    We sort of would need to define “ping” operations for each connection type (Like the “SELECT 1” SQL query in JDBC and JPA).
    
    Chris
    


AW: [DISCUSS] Adding a "ping" method to the API?

Posted by Jens Maier <je...@hotmail.com>.
Hi all,

maybe there is no need for a ping. At the development of our driver we also got sometimes disconnects without any real issue. At the same issue our driver makes a complete disconnect at time out and by a configurable retry counter.
After about 5 secs of no communication resume or overrun the counter, the driver signals Connection Error and answer each reading request with 0 to get no empty values.

We also slow down the communication by Delay, when there was a error and slowly speed up to max.

With this, we can unplug the cable for undetermined time and at the plug in, the driver continues with the communication.

If this is interesting, i can post some VB6 code.

Jens


Von Outlook<http://aka.ms/weboutlook> gesendet.

________________________________
Von: Markus Sommer <so...@isb-fn.de>
Gesendet: Donnerstag, 7. Februar 2019 11:50
An: dev@plc4x.apache.org
Betreff: AW: [DISCUSS] Adding a "ping" method to the API?

+1 from myside.

It's good idea to search for PLCs or to realize an automatic configuration of the communication....

Mit freundlichen Grüßen

Markus Sommer
Geschäftsführer

isb innovative software businesses GmbH
Otto-Lilienthal-Straße 2
D 88046 Friedrichshafen

Tel          +49 (0) 7541 3834-14
Fax         +49 (0) 7541 3834-20
Mobil    +49 (0) 171 537 8437

Mail to  sommer@isb-fn.de
http://www.isb-fn.de

Geschäftsführer: Markus Sommer, Thomas Zeler
Registergericht: Amtsgericht Ulm HRB-Nr. 631624
Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person.
Thank you.



-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de>
Gesendet: Mittwoch, 6. Februar 2019 11:32
An: dev@plc4x.apache.org
Betreff: [DISCUSS] Adding a "ping" method to the API?

Hi all,

Having had the same problem several times now, I think we might consider solving this …

I’ve had the problem that potential customers say things like “We communicate via S7” … well the thing is they have an S7, but that doesn’t mean the communication is done in the native S7 protocol. It could be:

  *   Profinet
  *   S7Pluss (New TIA Version of the protocol)
  *   Modbus
  *   OPC-UA

So what I would like to do, is to add a “ping” method to the connection, that would allow to try connecting to a given PLC. With this we could write code that for example tries all supported protocols for a given IP address and reports which ones are enabled.
We could also write a PLC scanner that pings an IP range and tries pinging the different protocols for each responsive IP address … this would be a huge help for people using PLC4X applications in the field …

What do you think?

We sort of would need to define “ping” operations for each connection type (Like the “SELECT 1” SQL query in JDBC and JPA).

Chris

AW: [DISCUSS] Adding a "ping" method to the API?

Posted by Markus Sommer <so...@isb-fn.de>.
+1 from myside.

It's good idea to search for PLCs or to realize an automatic configuration of the communication....

Mit freundlichen Grüßen

Markus Sommer
Geschäftsführer

isb innovative software businesses GmbH
Otto-Lilienthal-Straße 2
D 88046 Friedrichshafen

Tel          +49 (0) 7541 3834-14
Fax         +49 (0) 7541 3834-20
Mobil    +49 (0) 171 537 8437

Mail to  sommer@isb-fn.de
http://www.isb-fn.de

Geschäftsführer: Markus Sommer, Thomas Zeler
Registergericht: Amtsgericht Ulm HRB-Nr. 631624
Important Note: This e-mail and any attachments are confidential, may contain trade secrets and may well also be legally privileged or otherwise protected from disclosure. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this e-mail and any attachment from your system. If you are not the intended recipient please understand that you must not copy this e-mail or any attachments or disclose the contents to any other person. 
Thank you.



-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de> 
Gesendet: Mittwoch, 6. Februar 2019 11:32
An: dev@plc4x.apache.org
Betreff: [DISCUSS] Adding a "ping" method to the API?

Hi all,

Having had the same problem several times now, I think we might consider solving this …

I’ve had the problem that potential customers say things like “We communicate via S7” … well the thing is they have an S7, but that doesn’t mean the communication is done in the native S7 protocol. It could be:

  *   Profinet
  *   S7Pluss (New TIA Version of the protocol)
  *   Modbus
  *   OPC-UA

So what I would like to do, is to add a “ping” method to the connection, that would allow to try connecting to a given PLC. With this we could write code that for example tries all supported protocols for a given IP address and reports which ones are enabled.
We could also write a PLC scanner that pings an IP range and tries pinging the different protocols for each responsive IP address … this would be a huge help for people using PLC4X applications in the field …

What do you think?

We sort of would need to define “ping” operations for each connection type (Like the “SELECT 1” SQL query in JDBC and JPA).

Chris