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: | Re: Altering timestamp of softIOC PV |
From: | "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "Reimer, Paul E." <reimer at anl.gov> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 26 Jan 2021 03:02:27 +0000 |
On Jan 25, 2021, at 6:59 PM, Reimer, Paul E. <reimer at anl.gov> wrote:
Inside the IOC it is a trivial task since C code is not limited by the permissions that apply to the CA server. We provide mechanisms by which the device support for a record can set its timestamp along with the value, or a record can read its timestamp
through the TSEL link pointing to the .TIME field of some other record.
Thus the simplest way to do what you want is probably to add an array subroutine (asub) record with a routine that copies the timestamp value (an array of 2 unsigned 32-bit integers holding nanoseconds and seconds since the EPICS epoch) from an input field
into the asub record’s TIME field. The main complication is that you have to provide the compiled subroutine code to do that, but you could still use the softIoc binary and dlload that from a shared library if you don’t want to build it into your own IOC executable.
As you described above, your acquisition system would first write the timestamp to that asub, then write to the data PVs which would be configured with their TSEL links pointing to the asub.TIME field so they would automatically set their timestamps with
the correct value when they processed the new data.
If you want to go this route make sure to check back with tech-talk first because there are a couple of other things to be aware of to get it working, but they don’t significantly affect the solution.
There are many other possible solutions as well, the lua record from synApps might be able to write to its TIME field, and there are python device support layers too so you might not have to write C code but you would have to add other modules instead.
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|