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

Subject: Re: synchronizing the value of a read/write record
From: Ralph Lange via Tech-talk <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Wed, 13 Aug 2025 13:45:36 +0200
On Wed, 13 Aug 2025 at 02:41, Thomas, Patrick via Tech-talk <[email protected]> wrote:
... I am wondering however if there is a way to do this with the val field of just an output record.

In general, yes.
Look at ASYN's READBACK mechanism or what the OPC UA Device Support does.

Is there any way to synchronize things so that write requests coming from channel access are always written to the hardware and not overridden by periodic updates from reading the hardware?

That is indeed the crucial flaw.
Obviously, with two masters, you will always have a race.
The right way to handle this in the IOC: keep the write requests separate and execute them, while keeping the record's VAL at the value that the device updates you with. That will push the race to the device, where it belongs.
But: EPICS output records first get their VAL field set, then they process() and write the value to the device.
There might be ways to sneak around this... so I do have the intention to try implementing that for the OPC UA Device Support. I'm not 100% sure that it will work, though.
(Look at issue 173 of the OPC UA Device Support for some more discussion on a different aspect of that topic.)

Cheers,
~Ralph


Replies:
Re: synchronizing the value of a read/write record Thomas, Patrick via Tech-talk
References:
synchronizing the value of a read/write record Thomas, Patrick via Tech-talk

Navigate by Date:
Prev: Re: Mapping customised pva structures to epics v4 Normative Types and v3 PVs (channel access). Ralph Lange via Tech-talk
Next: Re: synchronizing the value of a read/write record Mark Rivers 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  <20252026 
Navigate by Thread:
Prev: Re: synchronizing the value of a read/write record Torsten Bögershausen via Tech-talk
Next: Re: synchronizing the value of a read/write record Thomas, Patrick 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  <20252026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·