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

Subject: Fw: Count record that resets by date
From: "Mooney, Tim M. via Tech-talk" <tech-talk@aps.anl.gov>
To: "Tech Talk (tech-talk@aps.anl.gov)" <Tech-talk@aps.anl.gov>
Date: Wed, 13 Mar 2019 21:56:09 +0000



Tim Mooney (mooney@anl.gov) (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 (mooney@anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on behalf of Daniel Cuneo via Tech-talk <tech-talk@aps.anl.gov>
Sent: Wednesday, March 13, 2019 4:07:09 PM
To: tech-talk@aps.anl.gov
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


References:
Count record that resets by date Daniel Cuneo via Tech-talk

Navigate by Date:
Prev: Re: Count record that resets by date Daniel Cuneo via Tech-talk
Next: Re: Count record that resets by date Eric Norum 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  <20192020 
Navigate by Thread:
Prev: Re: Count record that resets by date Diego Omitto via Tech-talk
Next: Re: Count record that resets by date Eric Norum 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  <20192020 
ANJ, 13 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·