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  2023  2024  2025  <2026>  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  <2026> 
<== Date ==> <== Thread ==>

Subject: Re: spread database processing over a time interval
From: Majer Karel via Tech-talk <tech-talk at aps.anl.gov>
To: Simon Rose <Simon.Rose at ess.eu>, "Sukhanov, Andrei" <sukhanov at bnl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Johnson, Andrew N." <anj at anl.gov>
Date: Wed, 26 Aug 2026 08:38:56 +0000
Hi,

Thanks all for the answers.
I think Ralph's solution is an elegant one, but I have no idea if it can work in our virtualized environment (basically running IOCs in Docker images on virtual Linux deployment server).
In the end we are going to use... sequence records. I originally disliked the idea, but it actually allows to keep the driver simple and the database flexible.

Cheers,
Karel

Od: Simon Rose <Simon.Rose at ess.eu>
Odesláno: úterý 25. srpna 2026 9:03
Komu: Sukhanov, Andrei <sukhanov at bnl.gov>; Majer Karel <karel.majer at eli-laser.eu>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>; Johnson, Andrew N. <anj at anl.gov>
Předmět: Re: spread database processing over a time interval
 
Hi all -

This might work, but I would be a bit cautious about this approach. You can solve things using python of course, but you lose a lot that you would otherwise have by having an actual IOC  handling the records and processing. Here there be dragons!

(This is your regularly scheduled “A python IOC is not an IOC” message :D )

Cheers,

Simon

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Sukhanov, Andrei via Tech-talk <tech-talk at aps.anl.gov>
Date: Tuesday, 25 August 2026 at 02:11
To: Majer Karel <karel.majer at eli-laser.eu>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>; Johnson, Andrew N. <anj at anl.gov>
Subject: Re: spread database processing over a time interval

Hi Karel,
In p4p (python) implementation of EPICS PVAccess protocol you have full control of the processing loop. It should be no problem to implement your processing flow. An AI agent usually can do most of the routine coding very well.
/Andrey

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Johnson, Andrew N. via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, August 24, 2026 6:25 PM
To: Majer Karel <karel.majer at eli-laser.eu>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: spread database processing over a time interval
 
This Message Is From an External Sender
This message came from outside your organization.
 
Hi Karel,

One approach you might look at uses the Event​ scan type and the record EVNT​ fields which hold event names.

You can write your own C/C++ code that periodically calls postEvent(evnt);​ where the EVENTPVT evnt​ was returned by a call to eventNameToHandle(char *name)​ and that name​ string matches the EVNT​ fields of one or more records. Posting an event like that causes all of the records whose EVNT​ values match to be processed by one of the IOC’s callback tasks. You can create as many of these as you like (within memory limits) so you can spread them around in time as you need.

The IOC shell command scanpel​ is useful to see what event names your IOC knows, or list which records will be scanned by a particular event name that you provide (recent versions of Base even accept a pattern for matching name).

HTH,

- Andrew

-- 
Complexity comes for free, Simplicity you have to work for.


On 8/24/26, 3:37 PM, "Tech-talk" <tech-talk-bounces at aps.anl.gov> wrote:

Hi,

I have a slightly weird question and Claude suggested it's not possible, but I'll still ask.

I'm writing device support for Ekspla laser units. They have several hundred registers which are published as individual HTML pages, reading all of them usually takes several seconds. The device support is a subclass of AsynPortDriver.

I want to read some of the registers once per second, while many others may be read only once per minute. But it occured to me, that when the scan thread schedules processing of the bulk of the records, my once-per-second registers will be delayed probably by more than a seconds, which is undesirable. I was looking for a mechanism to spread processing of the slow records over the minute interval or to somehow process the fast records with higher priority, but didn't find anything suitable.

Does EPICS base or asyn driver provide a mechanism for this? I mean something nicer than using a sequence record.

Thanks,
Karel

Karel Majer | Controls Software Development Group Leader
Phone: +420 607 205 469
E-mail: karel.majer
@eli-laser.eu


ELI Beamlines Facility|The Extreme Light Infrastructure ERIC
Za Radnicí 835, 252 41 Dolní Břežany, The Czech Republic
www.eli-laser.eu 


Replies:
Re: spread database processing over a time interval Ralph Lange via Tech-talk
References:
spread database processing over a time interval Majer Karel via Tech-talk
Re: spread database processing over a time interval Johnson, Andrew N. via Tech-talk
Re: spread database processing over a time interval Sukhanov, Andrei via Tech-talk
Re: spread database processing over a time interval Simon Rose via Tech-talk

Navigate by Date:
Prev: Re: Phoebus on ARM64 Heinz Junkes via Tech-talk
Next: Re: spread database processing over a time interval Ralph Lange 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  2023  2024  2025  <2026> 
Navigate by Thread:
Prev: Re: spread database processing over a time interval Simon Rose via Tech-talk
Next: Re: spread database processing over a time interval Ralph Lange 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  2023  2024  2025  <2026> 
ANJ, 26 Aug 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·