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  <20202021  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  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS Records at Runtime
From: James Larsson via Tech-talk <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Mostafa, Jalal (IPE)" <jalal.mostafa at kit.edu>
Date: Wed, 17 Jun 2020 17:57:25 +0000
Good Day, 

Yes there is a way, and to get around the single use of iocInit() I believe... but I confess I didn't try it out myself yet very much (no use cases specifically came up for me yet), so you may find a couple of sticky issues.  Here is what I think would work:

First you need a redundant setup.  So you have your current IOC that I'll call A and it has a signal or PV you want to display called Signal1_A.   You make nearly identical IOCs B and C that do the same thing, same inputs and outputs and calculations, but using Signal1_B, and Signal1_C.  The only differences being the name to avoid name conflicts on the channel access.  Which one do you display on edm?   You make yet another called hmiIOC or masterIOC that will take all three signals (Signal1_A, Signal1_B, Signal1_C) and determine the most common one.  if A=B=C pick A,.... if A=B !=C pick A, if B=C != A pick B.... .  That is the signal that gets routed to the display record.  You'll need to do something similar for output control too.

You now have a redundant systems, if IOC A goes down, then B and C still run. Giving you time to reboot or check out IOC A.

Now you have the redundant system, you probably see you can also update all the records in IOC A to do different things, change ranges, add calculations, remove subroutines, scripts, recompile with an upgraded synapps tool.  While B and C still run.  Once A is happy, do B, then C with the same.  The interface records between IOC A, B, and C and the masterIOC or hmiIOC needs to be the same of course.

But now you are essentially updating your records and IOC on the fly, and seamlessly.

Keep anything you want to change that needs an iocInit() on the IOC A, B, and C side or course.  If comparing floating points in the master you want to avoid the floating point compare problem (to decide which signal, A, B, C is correct you want to use, so use an epsilon.  That is not: if A - B = 0 but more: if ABS(A-B) <= EPSILON (= 0.00...001).  Also you may have to handle the link errors somehow.

Note that there is still a single point of failure on this hmiIOC, but that would only be deciding which signal to pipe to the display record, and would be otherwise only using well known / well tested records - so it should be stable.

So I think this would work, and hopes it helps you get around your iocInit problem.

Cheers
James Larsson


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mostafa, Jalal (IPE) via Tech-talk <tech-talk at aps.anl.gov>
Sent: June 17, 2020 9:25 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: EPICS Records at Runtime
 

Hi all!


We have quite "dynamic" configuration files for EPICS i.e. records can change very often (new records, change in the unit of measurement, ...).

Is there a way to load a new database record file after `iocInit` without restarting the IOC? or even adding records at runtime?


Best,

Jalal


References:
EPICS Records at Runtime Mostafa, Jalal (IPE) via Tech-talk

Navigate by Date:
Prev: Re: EPICS Records at Runtime Johnson, Andrew N. via Tech-talk
Next: Re: PVI Prototype - a framework for specifying the interface to an EPICS driver in a single YAML file Mark Rivers 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS Records at Runtime Johnson, Andrew N. via Tech-talk
Next: EPICS across subnets Randall Cayford 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  <20202021  2022  2023  2024 
ANJ, 17 Jun 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·