Hi Augusto,
Just a note about e3:
You are correct,
e3 indeed originates from PSI, but we forked off several years ago. There were a few practical issues; there were architectures included in the PSI system that we could not support or test (notably VxWorks), and this
was affecting our ability to develop and maintain the system. In addition, we wanted to do several architectural changes. Just to name a couple, we wanted to make it easier to work with the community so that standard (as far as such ones exist) modules do
not need modifications for e3, instead a wrapper module is used for interfacing and keeping local patches. Also, the build process has been extensively reworked; it uses “build specifications” to be able to reproduce a certain configuration at any point of
time (EPICS Base version, module configuration, etc.). There are a lot of other changes, but I do not want to go into more details here, it would need a separate presentation by the people who have implemented all these features.
Today, e3 is very different from the PSI setup under the hood, although on the IOC side the differences are quite small. More information can be found in the
user documentation, for people who might be interested.
Best regards,
Timo
From:
Augusto Horita <Augusto.Horita at LIGHTSOURCE.CA>
Date: Wednesday, 28 May 2025 at 16:31
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>
Subject: Re: External: Re: Communicating with Bechoff I/O through EPICS
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:
-
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

 
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 > > 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
>
|