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: | Fw: Count record that resets by date |
From: | "Mooney, Tim M. via Tech-talk" <[email protected]> |
To: | "Tech Talk ([email protected])" <[email protected]> |
Date: | Wed, 13 Mar 2019 21:56:09 +0000 |
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab From: Mooney, Tim M.
Sent: Wednesday, March 13, 2019 4:49 PM To: Daniel Cuneo Subject: Re: Count record that resets by date There's certainly a way to do this with base, but on an APS beamline, I would do it like this:
devIocStats maintains a time-of-day string PV, here called xxx:TOD, which updates every second. When the _expression_ xxx:TOD=="00:00:00" changes value, the string calc writes that value to the calcout record's B field,
and causes it to process. This sets the calcout record's VAL field to -1 when TOD=="00:00:00", and then to 0 when TOD=="00:00:01". Otherwise, the calcout record's VAL field increments whenever it's processed.
Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab From: [email protected] <[email protected]> on behalf of Daniel Cuneo via Tech-talk <[email protected]>
Sent: Wednesday, March 13, 2019 4:07:09 PM To: [email protected] Subject: Count record that resets by date Hi all,
I'd like to create a database record that counts based on a forward link. This record would need to reset back to zero
at 12AM every day.
Use case, is where a beam line user hits a reset button repeatably (tied to a bo record) as a work around for something that is broken.
I'd like to track these resets.
Is there a way to do this with base?
I'm considering writing a C subroutine for this is it doesn't already exist.
Cheers!
dpc
|
Attachment:
count_reset.jpg
Description: count_reset.jpg