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: Mark Rivers via Tech-talk <[email protected]>
To: "Thomas, Patrick" <[email protected]>, EPICS Tech Talk <[email protected]>, Ralph Lange <[email protected]>
Date: Wed, 20 Aug 2025 17:34:40 +0000

It is done whenever the driver calls setIntegerParam, setDoubleParam, or setStringParam for the parameter used by that output record, and then calls callParamCallbacks.

 

From: Tech-talk <[email protected]> On Behalf Of Thomas, Patrick via Tech-talk
Sent: Wednesday, August 20, 2025 11:59 AM
To: EPICS Tech Talk <[email protected]>; Ralph Lange <[email protected]>
Subject: Re: synchronizing the value of a read/write record

 

Hi Ralph,

 

Does the ASYN readback mechanism periodically update the value of the output records that use it, or only once after a write is made?

 

Thank you,

Patrick


From: Tech-talk <[email protected]> on behalf of Ralph Lange via Tech-talk <[email protected]>
Sent: Wednesday, August 13, 2025 4:45 AM
To: EPICS Tech Talk <[email protected]>
Subject: Re: synchronizing the value of a read/write record

 

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
Re: synchronizing the value of a read/write record Ralph Lange via Tech-talk
Re: synchronizing the value of a read/write record Thomas, Patrick via Tech-talk

Navigate by Date:
Prev: Re: synchronizing the value of a read/write record Thomas, Patrick 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 
Navigate by Thread:
Prev: Re: synchronizing the value of a read/write record Thomas, Patrick 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 ·