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  2018  2019  2020  2021  2022  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: "duty cycle" records
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Wed, 22 Nov 2023 10:07:01 +0100
On Wed, 22 Nov 2023 at 09:43, Gerrit Kühn via Tech-talk <tech-talk at aps.anl.gov> wrote:
Instead, I'd like to send an "enable" command, have the device running for
a configurable time (like 5min), then send a "disable" command and wait
for a longer time (like 55min) until the next cycle is started.

As so often, the best solution depends on your requirements.

- Simple: seq record that fires links with delay. A single record could do the job, but once it runs, you have zero control and zero visibility.
- Flexible: sequencer state machine. Define the interface you need (control and monitoring) then implement the business logic in SNL. Yet another tool and workflow. Any change needs recompilation.
- Transparent: use a few calcout records that basically count down, initiating actions on "change to zero". More records for the interface as needed.

I would probably go for the database solution, because of the full transparency and online modifiable functionality (good when developing). Also, counters are good for displaying progress bars on the GUI.
But that's clearly personal preference. I know colleagues that would without hesitation use a sequencer state machine or a client-side Python script.

In case you eventually have a generic database solution, please consider posting it to https://github.com/epics-docs/database-examples, which is a good place to share such patterns.

Cheers,
~Ralph


Replies:
Re: "duty cycle" records Gerrit Kühn via Tech-talk
Re: "duty cycle" records Kevin Peterson via Tech-talk
References:
"duty cycle" records Gerrit Kühn via Tech-talk

Navigate by Date:
Prev: "duty cycle" records Gerrit Kühn via Tech-talk
Next: Re: "duty cycle" records Gerrit Kühn 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  <20232024 
Navigate by Thread:
Prev: "duty cycle" records Gerrit Kühn via Tech-talk
Next: Re: "duty cycle" records Gerrit Kühn 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  <20232024 
ANJ, 28 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·