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: Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>, EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Tue, 28 Nov 2023 09:50:11 -0600
I wrote some general support (database + sequence program) to allow things to happen after a delay:

  https://github.com/epics-modules/std/blob/master/docs/delayDo.md

It wasn't designed for this duty-cycle application, but two instances of delayDo (one for enabling and one for disabling) are likely to provide the needed functionality.

Kevin


On 11/22/23 03:07, Ralph Lange via Tech-talk wrote:
On Wed, 22 Nov 2023 at 09:43, Gerrit Kühn via Tech-talk <tech-talk at aps.anl.gov <mailto: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 <https://github.com/epics-docs/database-examples>, which is a good place to share such patterns.

Cheers,
~Ralph


References:
"duty cycle" records Gerrit Kühn via Tech-talk
Re: "duty cycle" records Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: Simulated limit switches on motorSim motor Torsten Bögershausen via Tech-talk
Next: Re: Simulated limit switches on motorSim motor Kevin Peterson 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: Re: "duty cycle" records Ralph Lange via Tech-talk
Next: Beckhoff ADS to EPICS Lesley 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 ·