EPICS Home

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

Subject: records auto invalidation on timeout
From: Matthieu Bec via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Thu, 16 Jan 2025 08:38:07 -0700
Hello tech-talk,

LBT is using an EPICS db for alarming purpose. The db is a collection of soft records with the usual low/lsv, high/hsv, etc updated externally by programs doing CA puts.
I am trying to implement a scheme where no updates (for example the external program stopped running) auto invalidates those records.
Here's what my template looks like. It seems to work, but has a lot of plumbing.

Is there a simpler way to achieve this? either db or some deviceSupport I do not know?

Thank you,
Matthieu



# an input instance

record(ao, usr:input)
{
  field(DESC, "externally set via caput")
  field(HIHI, "10")
  field(HHSV, "MAJOR")
  field(LOW, "-1")
  field(LSV, "MINOR")
  field(PINI, "YES")
  field(VAL, "nan")
  field(FLNK, "usr:time")
}

record(ai, usr:time)
{
  field(DESC, "emulate .TIME that is private")
  field(DTYP, "Soft Timestamp")
  field(INP, "@%s")
  field(FLNK, "usr:value")
}

record(calc, "usr:value")
{
  field(DESC, "expires to nan,UDF,INVALID after 10s")
  field(INPA, "usr:input .MSS") # use .MSS (.MS gives LINK)
  field(INPB, "usr:time")
  field(INPC, "ioc:time")
  field(CALC, "(abs(B-C)<10)?A:nan")
  field(SCAN, "1 second")
}

# common stuff

record(ai, ioc:time)
{
  field(DESC, "ioc time")
  field(DTYP, "Soft Timestamp")
  field(INP, "@%s")
  field(SCAN, "1 second")
}




Replies:
Re: records auto invalidation on timeout Ralph Lange via Tech-talk

Navigate by Date:
Prev: RE: Moving source files to their own directory Iain Marcuson via Tech-talk
Next: Re: records auto invalidation on timeout Ralph Lange 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
Navigate by Thread:
Prev: Inquiry about OAuth2 Support in Phoebus and Olog Integration Giovanni Lorenzo Napoleoni via Tech-talk
Next: Re: records auto invalidation on timeout Ralph Lange 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