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: "Johnson, Andrew N. via Tech-talk" <[email protected]>
To: "Thomas, Patrick" <[email protected]>, "[email protected] Talk" <[email protected]>
Date: Wed, 13 Aug 2025 18:05:22 +0000
The FLNK field doesn’t take an NPP flag, that’s not what the example shows. Actually I think for your case the last example in the document might be better. You can’t do what you want in just 2 records though.

Regarding your second email, make sure you watch the IOC load your .db files, the ai record type doesn’t have an OUT field so there will be an error there.

- Andrew


-- 

Complexity comes for free, Simplicity you have to work for.


On 8/13/25, 12:53 PM, "Thomas, Patrick" <[email protected]> wrote:

This Message Is From an External Sender
This message came from outside your organization.
 
Hi Andrew,

Would it be something like

grecord(ai, "AI_REAL")
{
  field(DTYP, "ADS")
  field(INP, "@MAIN.VAR_REAL")
  field(SCAN, ".1 second")
  field(FLNK, "AO_REAL NPP")
}

grecord(ao, "AO_REAL")
{
  field(DTYP, "ADS")
  field(OUT, "@MAIN.VAR_REAL")
}

When I do this and write to the MAIN.VAR_REAL variable through the TwinCAT PLC interface (not channel access), the value does not take (it changes briefly and then goes back to what it was before).

Thank you,
Patrick

From: Johnson, Andrew N. <[email protected]>
Sent: Wednesday, August 13, 2025 9:57 AM
To: Thomas, Patrick <[email protected]>; [email protected] Talk <[email protected]>
Subject: Re: synchronizing the value of a read/write record
 
Hi Patrick,

One thing nobody else has mentioned yet is that we do have a couple of example databases in our Common Database Patterns documentwhich might be a solution for you’re looking for.

- Andrew


-- 

Complexity comes for free, Simplicity you have to work for.


On 8/12/25, 7:41 PM, "Tech-talk" <[email protected]> wrote:

Hello,

I'm attempting to write device support to handle the scenario where changes to the value of a hardware device can be made from both EPICS and another source. I would like the value of the hardware to be changed if I write a value to the record through channel access, and also to continuously monitor the hardware device for changes made from the other source and update the value of the record to match. One approach I have considered is to use separate output and input records, where the output records write values set from channel access to the hardware and the input records periodically scan the hardware and update their values accordingly. I am wondering however if there is a way to do this with the val field of just an output record. 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?

Thank you,
Patrick


References:
synchronizing the value of a read/write record Thomas, Patrick via Tech-talk
Re: synchronizing the value of a read/write record Johnson, Andrew N. 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: Announcing linStat 1.0.0 Michael Davidsaver 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: Mapping customised pva structures to epics v4 Normative Types and v3 PVs (channel access). Heinz Junkes 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 ·