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  <20212022  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  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Using autosave to restore device settings after a reset without rebooting IOC
From: "Mooney, Tim M. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Rivers, Mark L." <rivers at cars.uchicago.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sat, 19 Jun 2021 17:12:19 +0000
Hi Mark,

I agree that autosave is pretty well matched to this problem.  If the EPICS PVs are in a good state before the camera is reset or power cycled, and the reset process doesn't result in changes to the EPICS PVs you would want to write, then your "Save then Load" sounds like a good solution.  I think you will want a sseq record to write a file name to, say, $(P)$(Q)name1, write to $(P)$(Q)saveConfig1.PROC, wait for the save to finish, and then write to $(P)$(Q)loadConfig1.PROC.  (It doesn't matter if there is already a file name in name1.)

An advantage of this approach is that users could also use configMenu for other purposes.

I also like dfbrestoreX(), but if it was the EPICS PV values that put the camera into a state from which only a reset or power cycle would rescue it, then automatically restoring those values wouldn't be good.  I don't know if this possibility is plausible or remote.

>> First, as I understand it configMenu only supports manual saving of configurations, not monitor sets?  >> Second, it appears to only read .cfg files and not the .sav files written by monitor sets?

Yes to both.

Tim Mooney (mooney at anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Saturday, June 19, 2021 9:16 AM
To: Mooney, Tim M. <mooney at anl.gov>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Using autosave to restore device settings after a reset without rebooting IOC
 

Hi Tim,

 

One problem that occurs with many EPICS devices that are on a fieldbus like Ethernet, USB, serial, etc. is how to handle the case when the device is power-cycled or otherwise reset and one does not want to reboot the IOC.  In many cases what the user wants is to be able to push the most recent settings down to the device so that it is “in-sync” with the EPICS output PVs.  This has come up most often in the context of GigE cameras that get power-cycled, but it is much more general.

 

It seems like this is something that we can use autosave to do, without needing to write any new code.  I am trying to figure out if the best way to implement this is to use configMenu

https://htmlpreview.github.io/?https://github.com/epics-modules/autosave/blob/master/documentation/autoSaveRestore.html#configMenu

or to add some code to the base class driver that calls:

 

int fdbrestoreX(char *filename, char *macrostring, callbackFunc callbackFunction, void *puser)

 

I would like to do the following for areaDetector IOCs.

 

-          Currently there is a single auto_settings.req file that generates auto_settings.save for all PVs in the IOC, i.e. those that are specific to the camera and all the rest which are for the plugins, scan record, etc.

-          I would like to break this up into 2 monitor request files:

o   camera_settings.req  The settings that are specific to the camera

o   auto_settings.req All of the other settings

-          I want to present the user with a PV that allows them to read camera_settings.sav and push those values to the camera, for example after it has been reset.

-          I don’t want the user to be required to manually save the save_set, I want it to happen automatically with a monitor set.

 

configMenu looks easier and more powerful, but I have never used it and I am not sure it can do what I want.  First, as I understand it configMenu only supports manual saving of configurations, not monitor sets?  Second, it appears to only read .cfg files and not the .sav files written by monitor sets?

 

I guess I could do what I want with configMenu if the user first pressed Save, which will write the current values of the output PVs to the .cfg file.  Then they can press Load which will push them to the camera.  The only problem is that if they forget to press Save first they will load a stale configuration, and then they are in trouble.  But I could wrap the Save then Load in a sequence record to prevent that.

 

I’d appreciate your advice on this.

 

Thanks,

Mark

 

 

 

 


References:
Using autosave to restore device settings after a reset without rebooting IOC Mark Rivers via Tech-talk

Navigate by Date:
Prev: Using autosave to restore device settings after a reset without rebooting IOC Mark Rivers via Tech-talk
Next: Re: Using autosave to restore device settings after a reset without rebooting IOC 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Using autosave to restore device settings after a reset without rebooting IOC Mark Rivers via Tech-talk
Next: Re: Using autosave to restore device settings after a reset without rebooting IOC 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  <20212022  2023  2024 
ANJ, 21 Jun 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·