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  <2026 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  <2026
<== Date ==> <== Thread ==>

Subject: Re: Record TIME field taken from another record's VAL
From: Torsten Bögershausen via Tech-talk <tech-talk at aps.anl.gov>
To: Majer Karel <Karel.Majer at eli-beams.eu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 16 Feb 2026 11:02:42 +0100
Hej Karel,

Having examples was so far the most helpful thing that we have.
What do you think/suggest is missing ?
BR
/Torsten


On 2026-02-16 09:29, Majer Karel wrote:
Hello Torsten,

Thanks for your answer.
I think we can handle the the PTP synchronization.
I'm interested in twincat-ads driver which I wasn't aware of. Is there any documentation on it besides the included examples?

Thanks,

Karel
------------------------------------------------------------------------
*From:* Torsten Bögershausen <tboegi at edom.se>
*Sent:* Friday, February 6, 2026 5:26 PM
*To:* Majer Karel <Karel.Majer at eli-beams.eu>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>; tboegi at telia.com <tboegi at telia.com>
*Subject:* Re: Record TIME field taken from another record's VAL
I think that there are 2 questions:
a) can I synchronize TwinCAT with PTP ?
b) can I trasnport timestamps over ADS ?
Yes.
<https://urldefense.us/v3/__https://infosys.beckhoff.com/english.php?content=..*content*1033*__;Ly8v!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXEg-Uktk$ tc3_ads_intro/115883019.html&id= <https://urldefense.us/v3/__https://infosys.beckhoff.com/__;!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXdFGetRU$ english.php?content=../content/1033/tc3_ads_intro/115883019.html&id=>>

c) Is there an EPICS driver that support it ?
Yes:
https://urldefense.us/v3/__https://github.com/epics-modules/twincat-ads/__;!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXg8Sfda0$ <https://urldefense.us/v3/__https://github.com/epics-__;!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXqxw7EU8$ modules/twincat-ads/>

But back to a)
TwinCAT has different clocks.
You can synchronize the TwinCAT time (TcTime ??) with NTP.

If you need PTP, then you can synchronize the distributed clock
("DC") with PTP.

All details are tooooo long to describe here.
If you want more details, I am happy to set up
a video meeting.

BR
/Torsten


On 2026-02-06 15:50, Majer Karel via Tech-talk wrote:
Hello,

We have a number of Beckhoff PLCs installed and we are using ADS device support (https://urldefense.us/v3/__https://epics.cosylab.com/documentation/adsDriver/index.html__;!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXwTVRLS0$ <https://urldefense.us/v3/__https://epics.cosylab.com/documentation/ adsDriver/index.html__;!!G_uCfscf7eWS!euLXnna7-qCt-D3EjV5-bjzosTfKt- sd4lVcov9BLro2tBUjLRx-ed8iuDCVso9vUKL04d9SoJjsUQ8dHHIoBcTCJ3EHAw$>) to talk to them. We have considered synchronizing them with PTP and timestamping PVs with PTP timestamps from the PLC, but it's not clear how to do that of if it's even possible. The ADS protocol does not carry data timestamp (https:// infosys.beckhoff.com/english.php?content=../content/1033/ tcinfosys3/11291871243.html&id= <https://urldefense.us/v3/__https:// infosys.beckhoff.com/english.php? content=..*content*1033*tcinfosys3*11291871243.html&id=__;Ly8vLw!! G_uCfscf7eWS!euLXnna7-qCt-D3EjV5-bjzosTfKt-sd4lVcov9BLro2tBUjLRx- ed8iuDCVso9vUKL04d9SoJjsUQ8dHHIoBcR89fZiHg$>) and the device support documentation doesn't mention possibility of using TSE field to obtain hardware timestamp. My idea was to convert PTP timestamp to double matching EPICS time format, publish it into ai record and use its VAL to set TIME fields of other records published by the ADS IOC. I found some tech talk on Soft Timestamp device support, but I understand it reads from other record's TIME field. Is there a way to use ai VAL field to set TIME of other records?

Thanks,

Karel Majer

*Karel Majer | Senior software developer*
Phone: +420 266 051 514
E-mail: karel.majer at eli-beams.eu


*ELI Beamlines Facility|The Extreme Light Infrastructure ERIC*
Za Radnicí 835, 252 41 Dolní Břežany, The Czech Republic
https://urldefense.us/v3/__http://www.eli-beams.eu__;!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXfmbqWw0$ <https://urldefense.us/v3/__http://www.eli-beams.eu__;!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXfmbqWw0$ > <https://urldefense.us/v3/
__https://urldefense.us/v3/__http://www.eli-beams.eu/__;!!G_uCfscf7eWS!eDeVmuN0Z6xfhFMcdc8D6FFkLA0mFmZP65kdVMx0uQjOAdTZbHiVX-3gnmcZ5FAq8pc2z8nEX8kXedErmuQ$
__;!!G_uCfscf7eWS!euLXnna7-qCt-D3EjV5-bjzosTfKt-sd4lVcov9BLro2tBUjLRx- ed8iuDCVso9vUKL04d9SoJjsUQ8dHHIoBcTijQcDzg$>





Replies:
Re: Record TIME field taken from another record's VAL Majer Karel via Tech-talk
References:
Record TIME field taken from another record's VAL Majer Karel via Tech-talk
Re: Record TIME field taken from another record's VAL Torsten Bögershausen via Tech-talk
Re: Record TIME field taken from another record's VAL Majer Karel via Tech-talk

Navigate by Date:
Prev: ecat2 module Konrad Gajewski via Tech-talk
Next: Does every DB record need to produce a PV? David Bracey 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  <2026
Navigate by Thread:
Prev: Re: Record TIME field taken from another record's VAL Majer Karel via Tech-talk
Next: Re: Record TIME field taken from another record's VAL Majer Karel 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  <2026
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·