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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Triggered autosave on exit
From: "Hu, Yong" <[email protected]>
To: "'Mark Rivers'" <[email protected]>, Tim Mooney <[email protected]>, Di Maio Franck <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 5 Oct 2012 16:42:42 +0000
Franck's use case of the autosave is very interesting, but I guess it may take efforts to find the solution. I have tried different ways on Linux softioc:

1. I tried to add manual_save() to the xxxMain.cpp. Something like these:

    iocsh(NULL);
    manual_save("xxx.req");
    epicsThreadSleep(2);
    epicsExit(0);

However, this will not work since manual_save() is only available in the autosave module and it is not included in the EPICS base. 

2. I tried to use create_triggered_set() in the startup script file (st.cmd) just as Tim's suggestion. Also I used the devIocStats module which provides a PV named "yhuHost:SYSRESET" to reboot the IOC. Here are the configurations for st.cmd and db file: 

st.cmd:

    create_monitor_set("auto_settings.req",30,"P=xxx:")
    create_triggered_set("auto_settings.req","yhuHost:resetIOC","P=xxx:")

db file:

    record(bo,"yhuHost:resetIOC")
    {
        field(ZNAM,"NoRest")
        field(ONAM,"Reset")
        field(FLNK,"yhuHost:seqExample")
    }

    record(seq,"yhuHost:seqExample")
    {
	  #delay 2 seconds to reboot the IOC
        field(DLY1,"2")
        field(LNK1,"yhuHost:SYSRESET.PROC ")
    }

When I do "caput yhuHost:resetIOC 1", the autosave is really executed (the save file "auto_settings.save" is written) and then about 2 seconds later, there is a message output "IOC reboot started" from the softioc. However, the IOC is not really rebooted, it is hung up (I still see the Shell "epics>"). 

Any suggestion about my second approach? Any other better way?

Thanks,

Yong 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mark Rivers
Sent: Friday, October 05, 2012 10:42 AM
To: Tim Mooney; Di Maio Franck
Cc: [email protected]
Subject: RE: Triggered autosave on exit

Can I have a PV that does that when I type "exit" on my softIoc?

I agree that what Frank suggests would be very nice.

Mark


________________________________________
From: [email protected] [[email protected]] on behalf of Tim Mooney [[email protected]]
Sent: Friday, October 05, 2012 9:08 AM
To: Di Maio Franck
Cc: [email protected]
Subject: Re: Triggered autosave on exit

Franck,

You can use a trigger PV to cause the save set to be written whenever the trigger PV posts a value.
You can do this with a monitor save set that is also monitored:

   create_monitor_set("auto_settings.req",30,"P=xxx:")
   create_triggered_set("auto_settings.req","xxx:myTrigger","P=xxx:")

Because the save-set name is the same in both calls, the second doesn't add a new save set, but instead adds a new method to the existing save set.

Tim

----- Original Message -----
From: "Di Maio Franck" <[email protected]>
To: [email protected]
Sent: Friday, October 5, 2012 4:55:12 AM
Subject: Triggered autosave on exit

Dear Experts, Gurus and Educated Friends

A question that probably already popped-up in the past...

If we want that when the IOC process exits (in an healthy state) because it has been requested so (i.e. not crashed), the autosave is executed before the exit ... how can that be done?

The objective is to prevent that the changes made few seconds before a "restart" are lost (a use case during tests).
And we don't want to reduce the autosave period only for this case.

Thanks!

Franck


Franck Di Maio
CODAC System Designer
CODAC Section

ITER Organization, Building 519/027, CHD, Control System Division Route de Vinon sur Verdon - 13115 St Paul Lez Durance - France
Phone: +33 4 42 17 64 05



--
Tim Mooney ([email protected]) (630)252-5417 Software Services Group (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab


Replies:
Re: Triggered autosave on exit Eric Norum
Re: Triggered autosave on exit Tim Mooney
References:
Triggered autosave on exit Di Maio Franck
Re: Triggered autosave on exit Tim Mooney
RE: Triggered autosave on exit Mark Rivers

Navigate by Date:
Prev: Re: EPICS 3.15.0 incompatible make rules Ralph Lange
Next: Re: Triggered autosave on exit Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Triggered autosave on exit Mark Rivers
Next: Re: Triggered autosave on exit Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·