plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Feinauer <>
Subject Re: [DISCUSS] Adding a "ping" method to the API?
Date Thu, 07 Feb 2019 13:14:28 GMT
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?


Am 07.02.19, 14:03 schrieb "Jens Maier" <>:

    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.
    Von Outlook<> gesendet.
    Von: Markus Sommer <>
    Gesendet: Donnerstag, 7. Februar 2019 11:50
    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
    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
    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 <>
    Gesendet: Mittwoch, 6. Februar 2019 11:32
    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).

View raw message