EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025 
<== Date ==> <== Thread ==>

Subject: Re: Communication between EPICS and PLCs at your facility?
From: Timo Korhonen via Tech-talk <tech-talk at aps.anl.gov>
To: Torsten Bögershausen <Torsten.Bogershausen at ess.eu>, "Samadli, Ayaz" <ayaz.samadli at xfel.eu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 7 Jul 2022 07:50:54 +0000
Hi,

To complement a bit what Torsten wrote, and what we use at ESS.

The majority of our PLCs are from Siemens, with some Beckhoff (motion control, etc., as Torsten also wrote). 
 We started with the s7plc driver (https://github.com/paulscherrerinstitute/s7plc)  that does block-based communication between the PLC and the EPICS IOC. While the driver works fine, the issue is that one has to do careful bookkeeping of the data block layout; any change in PLC tags (add/delete/move)  has to be reflected on the IOC side. The tool that Torsten mentions takes care of the bookkeeping (and a number of other things as well.)
Another issue with the s7plc driver is that it always sends and receives the whole datablock. This is not optimal if one needs to change single process values; there is the performance issue but even more tricky is if one needs to do things in some particular sequence. 
To alleviate that issue, we use the Modbus/TCP driver like Torsten mentioned for the downstream communication (from EPICS IOC to the PLC). The above tool supports this combined driver model.

This configuration has been used since early stages of the project. It works well and we have a lot of systems developed on that basis. These are quite EPICS-oriented however, so there would be quite some effort to adapt to other control system toolkits.

More recently we have implemented a number of systems using the OPC-UA driver. This is a very powerful and flexible way of communicating with a PLC - and not only PLCs, the protocol supports many other types of devices in addition. There were many nice papers about using OPC-UA in last year's ICALEPCS conference, including for example this one: https://accelconf.web.cern.ch/icalepcs2021/papers/mopv026.pdf

There is a lot of documentation about OPC-UA available and I do not want to start replicating that here; however, I can say that if you are starting from scratch, and even if not, I would recommend to take a good look at OPC-UA. The data model is great, data items from the PLC are discoverable, and so on. The paper linked above is a good introduction; the title contains EPICS but the contents are quite universally applicable.

Best regards,

Timo 
 

On 2022-07-06, 14:18, "Tech-talk on behalf of Torsten Bögershausen via Tech-talk" <tech-talk-bounces at aps.anl.gov on behalf of tech-talk at aps.anl.gov> wrote:

    Hej Ayaz,
    that is a good question. What we use and we recommend?

    What is in use ?

    For PLC-ish applications Modbus/TCP (I think it's called) is usesd.
    There is a tool generating both PLC code and EPICS "databases" are generated based on a .def file.

    For Motion Control with some additional IO and timestamping inside the PLC
    we use a protocol based on ADS.
    This solution is based on the model 3 motor driver, and there are too many details to be described here.

    For more data-aqcuisition-heavy applications we have the epics-twincat-ads module,
    which allows transfer of arrays and all other types of EPICS Records supported by asyn.

    For Sample Environment Equipment, which is moved between beamlines and 
    even research institutes there is the Secop initiative:
    https://github.com/SampleEnvironment/SECoP

    Where the "EPICS Records" are provided by "octopy", but I am not an expert here.

    And of course UPC-UA can be used - not my area of competence either.

    So all in all, it depends how complex your PLC code is, requirements on data rates,
    timestamping, slow control, medium slow control and faster controls.

    This is all my personal view, which may be incomplete.

     HTH
    /Torsten



    On 2022-07-06, 13:05, "Tech-talk on behalf of Samadli, Ayaz via Tech-talk" <tech-talk-bounces at aps.anl.gov on behalf of tech-talk at aps.anl.gov> wrote:

        Dear All,

        At the European XFEL, we have an R&D project to replace the current custom communication protocol between our in-house SCADA system, Karabo, and PLCs (Beckhoff). I would be interested in your recommendations and current implementations for communications between EPICS (or other SCADA systems) and PLCs at your facility. Can you please share your experiences and suggestions with us? 

        If you want to get more details, please feel free to reach out to me. 

        Best Regards,
        Ayaz


        Ayaz Samadli

        Controls - Control Software Engineer


        European XFEL GmbH

        ayaz.samadli at xfel.eu

        www.xfel.eu


        Headquarters: Holzkoppel 4, 22869 Schenefeld, Germany


        Managing Directors: Prof. Dr. Robert Feidenhans’l, Dr. Nicole Elleuche

        Registered as European X-Ray Free-Electron Laser Facility GmbH at

        Amtsgericht Hamburg, HRB 111165




References:
Communication between EPICS and PLCs at your facility? Samadli, Ayaz via Tech-talk
Re: Communication between EPICS and PLCs at your facility? Torsten Bögershausen via Tech-talk

Navigate by Date:
Prev: EPICS compilation errors Adrian Martinez via Tech-talk
Next: EPICS-Support for Owis motor stages Sintschuk, Michael via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025 
Navigate by Thread:
Prev: Re: Communication between EPICS and PLCs at your facility? Torsten Bögershausen via Tech-talk
Next: Re: Communication between EPICS and PLCs at your facility? Kasemir, Kay via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·