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  <20182019  2020  2021  2022  2023  2024  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: record that processes at a given time of day?
From: Michael Davidsaver <[email protected]>
To: James Larsson <[email protected]>, Maren Purves <[email protected]>, Michael Westfall <[email protected]>
Cc: "[email protected] Talk" <[email protected]>
Date: Mon, 5 Nov 2018 13:45:15 -0800
Depending on your target, you might use clock_nanosleep() with TIMER_ABSTIME
to sleep until a certain wall clock time.

https://linux.die.net/man/2/clock_nanosleep


On 11/5/18 11:35 AM, James Larsson wrote:
> Good Day,
> 
> 
> I tend to avoid cron job on the control system since I don't know that it is *guaranteed* to run, and at specified time - though it usually does.  Even though crontab is a great tool, it isn't a control system tool, so my preference is to avoid it (except for say, booting a control system).
> 
> 
> I implemented a calc record that uses inputs from the devIocStats (synapps) to get the second, minute, and hour, and compare them with your desired values and make the Val=1 if equal, which is essentially what you want.  If you connect that to the SDIS of a fanout and process the fanout every 1/2 second then you will get a single process signal output, at the time of day you specify (because usually it's disabled).
> 
> 
> You can do the same thing but only use seconds, and minutes for something that happens every hour, and likewise for month and day.  Sometimes I want to process a record, but only once every 10 minutes.
> 
> 
> Cheers
> 
> James Larsson
> 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From:* [email protected] <[email protected]> on behalf of Maren Purves <[email protected]>
> *Sent:* November 5, 2018 10:14:07 AM
> *To:* Michael Westfall
> *Cc:* [email protected] Talk
> *Subject:* Re: record that processes at a given time of day?
>  
> Hi Michael,
> 
> I have a cron job that runs once a day that resets the value of several records by
> running cau (with an input file). If you don't find a record that can be made to do
> that I'm sure you can adapt the cron job idea.
> 
> Maren Purves, EAO/JCMT
> 
> On Mon, Nov 5, 2018 at 7:37 AM, Michael Westfall via Tech-talk <[email protected] <mailto:[email protected]>> wrote:
> 
>     Hi,
> 
>     I'm wondering if someone has an EPICS record implemented that processes at a given time of day, like an alarm clock.
> 
>     I don't see anything like that in EPICS base.
> 
>     -- 
>     Mike Westfall
>     Control Systems Software Engineer
> 
> 
> 


References:
record that processes at a given time of day? Michael Westfall via Tech-talk
Re: record that processes at a given time of day? Maren Purves
Re: record that processes at a given time of day? James Larsson

Navigate by Date:
Prev: Re: record that processes at a given time of day? James Larsson
Next: Re: Re: Controlling Eiger 1M with EPICS Jason A . Pattie
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: record that processes at a given time of day? James Larsson
Next: Re: record that processes at a given time of day? Lang, Keenan C. 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  <20182019  2020  2021  2022  2023  2024 
ANJ, 05 Nov 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·