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  2022  2023  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  2022  2023  2024  <2025
<== Date ==> <== Thread ==>

Subject: Re: External: Re: Communicating with Bechoff I/O through EPICS
From: Augusto Horita via Tech-talk <tech-talk at aps.anl.gov>
To: Jörn Dreyer <j.dreyer at hzdr.de>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, Timo Korhonen <Timo.Korhonen at ess.eu>
Cc: Sandström Anders Eric <anders.sandstroem at psi.ch>, Sibylle Ducroizé <sducroize at lpsc.in2p3.fr>
Date: Wed, 28 May 2025 14:30:40 +0000
Hi Sibylle,

Here at CLS (Canadian Light Source), we are also starting to convert some motion control systems to Beckhoff. Also, we use require framework from PSI (e3 also has the same root, but it is an ESS spin-off, ESS/PSI guys might correct me if I am wrong).

I am going to give some background before your answers. Hope this helps:

  1. One thing to keep in mind is that there are basically 2 ways to use Beckhoff motion control systems:
  • Use the Beckhoff PLC, in which case you can run the software application in it, and program with Beckhoff software (TwinCat). And, if I understand correctly  - Cosylab ADS goes from here.
  • Use an Ethercat coupler to the modules bus and run the application in an IOC-Host. (If I understood correctly, you are implementing this one - same here at CLS) - ECMC goes from here
      2- ecmc module does not need either require or e3 to be built and used.
  • If you got to this ecmc module, you can have the ecmc non-wrapped version.
  • This is well maintained. And at least ESS, PSI and us are using.
      3- Over ecmc layer, there is the option to use also ecmccfg to make configurations easier/faster. (this is mentioned under ecmc ReadMe)
      4- require is a framework not only for compiling. It also handles loading IOCs and so, if you use it to compile, it gets tricky not to use it while loading/running the IOC. If you need help with that, please let me know. 
      5- As mentioned before, Ethercat is the realtime protocol from Beckhoff - and because of that you need the kernel driver which you mentioned you installed. Then you would need its kernel libraries and headers to use its functions in ecmc.

Answering your questions: 

1. Are there maintained EPICS drivers for communicating with Beckhoff I/O ?
As I mentioned, the ecmc is maintained. Check ecmc module history. One thing: Releases are not often generated, rather - check for tags.
2. Should I basically write my own drivers ?
I would NOT recommend that. There are options already available from community and this module is way too complicated to start with.

 


Hope this helps.

ind regards, 

Augusto Horita, MSc.  

Controls Sytems Developer | [lightsource.ca]Canadian Light Source

44 Innovation Boulevard, Saskatoon, SK S7N 2V3

P: 306-657-3535 | augusto.horita@lightsource.ca

 

cid:image003.jpg@01D7A638.A8C919D0

 

cid:image005.png@01D7A638.A8C919D0cid:image007.png@01D7A638.A8C919D0 cid:image009.png@01D7A638.A8C919D0 cid:image011.png@01D7A638.A8C919D0 cid:image013.png@01D7A638.A8C919D0 cid:image015.png@01D7A638.A8C919D0

 

We acknowledge we are on Treaty Six territory and the traditional homeland of the Métis. We pay our respects to the First Nations and Métis ancestors of this place and reaffirm our relationship with one another.

 

This message and any attachments are solely for the use of intended recipients. They may contain privileged and/or confidential information. If you are not the intended recipient, you are hereby notified that you received this email in error, and that any review, dissemination, distribution or copying of this email and any attachments is strictly prohibited. If you receive this email in error, please contact the sender and delete the message and any attachments associated therewith your computer. Your cooperation in this matter is appreciated.

 

 

 


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Timo Korhonen via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, May 28, 2025 7:53 AM
To: Jörn Dreyer <j.dreyer at hzdr.de>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Cc: Sandström Anders Eric <anders.sandstroem at psi.ch>; Sibylle Ducroizé <sducroize at lpsc.in2p3.fr>
Subject: External: Re: Communicating with Bechoff I/O through EPICS
 
Hello Sibylle and all,

Like Jörn replied, there should be no issues to build e3 on Ubuntu. If you have the prerequisites installed, it should build pretty much out of the box.

For ecmc, I think it would be good to contact Anders Sandström at PSI (in cc, as I am not sure if Anders follows tech-talk). I know they are using it to operate a lot of motors, also with EPICS.
I have not built or used it myself recently, but I can really recommend it, it is an excellent package. There has been a lot of substantial improvements in the last years, and depending on your application I think it could have some substantial advantages over other solutions, event TwinCAT.

Best regards,

Timo (ESS)

On 2025-05-28, 15:10, "Tech-talk on behalf of Jörn Dreyer via Tech-talk" <tech-talk-bounces at aps.anl.gov <mailto:tech-talk-bounces at aps.anl.gov> on behalf of tech-talk at aps.anl.gov <mailto:tech-talk at aps.anl.gov>> wrote:


Hello Sibylle,


I have successfully used e3 on an Ubuntu 24.04 host. I guess that your failure comes from missing prerequisites.
I have installed the following packages before using e3:


- patch
- m4
- gcc
- g++
- tclx
- python3-dev
- libtirpc-dev
- re2c
- patchelf
- libusb-dev
- libsnmp-dev
- libxml2-dev
- libreadline-dev
- libopencv-dev
- libudev-dev
- libboost-all-dev
- libgsl-dev
- git
- libglib2.0-dev
- libx11-dev
- libxext-dev
- libzip-dev
- libfreetype-dev
- liblcms2-dev
- make


I tested it on a VM with a fresh installed Ubuntu desktop and also OpenSuSE Tumbleweed without problems.


Regarding your questions:


1) It depends on the type of devices you want to talk to. For motors, I would recommend to give the ess ethercatMC a try If you have a Beckhoff PLC in your system
There is also a BechhoffADS driver that talks directly via the etherlab driver to the devices, but it is limited to certain devices.


2) If your device is not supported you might need to implement it for the BeckhoffADS driver.


I don't know ecmc by hart, but if I remember correctly it is quite fancy but hard to set up as it takes a project file from TwinCAT and gives you access to each and every register of you devices.
This could be dangerouse for a novice as you can possibly destroy your device by misconfiguration.


Hope this helps you a bit,


Jörn


Am Mittwoch, 28. Mai 2025, 13:23:34 Mitteleuropäische Sommerzeit schrieb Sibylle Ducroizé via Tech-talk:
> Hello,
>
> I have just started working on an update of the control system software
> for an accelerator.
> I am still trying out different configurations and learning how to use
> EPICS. I followed the tutorial of the EPICS documentation so I know
> basic information about IOCs and have common support modules installed
> (asyn, calc, streamDevice,...)
>
> I would like to communicate with Beckhoff I/O terminals, both as a way
> to learn EPICS and to try out configurations for the final project. I
> have tried following this advice
> <https://epics.anl.gov/tech-talk/2018/msg00279.php  > <https://epics.anl.gov/tech-talk/2018/msg00279.php&nbsp;&nbsp;&gt; > from a previous
> tech-talk question from 2018.
> So far I have installed etherlab's ethercat master
> <https://urldefense.us/v3/__https://gitlab.com/etherlab.org/ethercat__;!!G_uCfscf7eWS!e7dazAbiiIaQgW2B8trCKUmDQiA1qqxV5LI23pHrrWfr0BtoCOobFERw9NiJhtJAc2dQlUH666hIKgU87BJ95yX-AITXpQ$ <https://urldefense.us/v3/__https://gitlab.com/etherlab.org/ethercat__;!!G_uCfscf7eWS!e7dazAbiiIaQgW2B8trCKUmDQiA1qqxV5LI23pHrrWfr0BtoCOobFERw9NiJhtJAc2dQlUH666hIKgU87BJ95yX-AITXpQ$> > and I've tried installing
> PSI's ecmc <https://urldefense.us/v3/__https://github.com/epics-modules/ecmc__;!!G_uCfscf7eWS!e7dazAbiiIaQgW2B8trCKUmDQiA1qqxV5LI23pHrrWfr0BtoCOobFERw9NiJhtJAc2dQlUH666hIKgU87BJ95yXNbSPhcQ$ <https://urldefense.us/v3/__https://github.com/epics-modules/ecmc__;!!G_uCfscf7eWS!e7dazAbiiIaQgW2B8trCKUmDQiA1qqxV5LI23pHrrWfr0BtoCOobFERw9NiJhtJAc2dQlUH666hIKgU87BJ95yXNbSPhcQ$> >which needs e3
> <https://urldefense.us/v3/__https://gitlab.esss.lu.se/e3/e3__;!!G_uCfscf7eWS!e7dazAbiiIaQgW2B8trCKUmDQiA1qqxV5LI23pHrrWfr0BtoCOobFERw9NiJhtJAc2dQlUH666hIKgU87BJ95yWHPmVh9Q$ <https://urldefense.us/v3/__https://gitlab.esss.lu.se/e3/e3__;!!G_uCfscf7eWS!e7dazAbiiIaQgW2B8trCKUmDQiA1qqxV5LI23pHrrWfr0BtoCOobFERw9NiJhtJAc2dQlUH666hIKgU87BJ95yWHPmVh9Q$> > to build. Unfortunately, e3-build
> fails to install epics base so I didn't get very far...I am on ubuntu
> which might be the problem.
>
> My questions :
>
> 1. Are there maintained EPICS drivers for communicating with Beckhoff I/O ?
>
> 1.a. If so, is ecmc a good option ? (As it depends on e3, meant to
> run on centOS which is obsolete)
>
> 1.b. Are there other similar alternatives ?
>
> 2. Should I basically write my own drivers ?
>
> 1.a. An advice / general approach for me to follow as I am new to
> EPICS ?
>
> Thanks,
>
> Sibylle
>










Replies:
Re: External: Re: Communicating with Bechoff I/O through EPICS Timo Korhonen via Tech-talk
References:
Communicating with Bechoff I/O through EPICS Sibylle Ducroizé via Tech-talk
Re: Communicating with Bechoff I/O through EPICS Jörn Dreyer via Tech-talk
Re: Communicating with Bechoff I/O through EPICS Timo Korhonen via Tech-talk

Navigate by Date:
Prev: Re: Communicating with Bechoff I/O through EPICS Timo Korhonen via Tech-talk
Next: Re: Diagnosing and overcoming GigE camera freezes Henrique F. Simoes 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  2022  2023  2024  <2025
Navigate by Thread:
Prev: Re: Communicating with Bechoff I/O through EPICS Timo Korhonen via Tech-talk
Next: Re: External: Re: Communicating with Bechoff I/O through EPICS Timo Korhonen 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  2022  2023  2024  <2025
ANJ, 02 Jun 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·