EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: initializing a waveform record
From: Tim Mooney <[email protected]>
To: Ned Arnold <[email protected]>
Cc: "Mark M. Ito" <[email protected]>, "'[email protected]'" <[email protected]>
Date: Tue, 06 Jul 2004 13:54:18 -0500
Ned Arnold wrote:

The latest version of save/restore (the ioc-based utility that initializes field values from a file prior to iocInit) supports waveforms. One could use any CA utility (matlab?) to initialize a waveform record ONCE and then the value would be restored after each reboot.

This was added last spring. Contact Tim Mooney ([email protected]) for details.

Ned

A 3.13-compatible version (R3-5) of this software is available for download at www.aps.anl.gov/aod/bcda/synApps/autosave/autosave.html The 3.14 version will be out tomorrow, probably.

You can initialize waveform PV's with save/restore even if you don't
intend to save changes to those PV's.  The following text file will
initialize the first ten elements of the array 'xxx:myArray.VAL',
and six elements of the array 'xxx:myOtherArray.VAL'.
(You can initialize thousands of elements in this way, but you probably
don't want to see it in an email message.)  The parser isn't very smart,
so make sure you include all the spaces and quotes, and don't stick a
line feed in the middle of an element unless you *like* fireworks.

---snip---
# save/restore V3.5	Automatically generated - DO NOT MODIFY - 040412-153501
xxx:myArray.VAL @array@ { "0" "1" "2" "3" "4" "5"
"6" "7.3" "8.5"
"154.345" }
xxx:myOtherArray.VAL @array@ { "abc " "de\"f" "ghi\"" "jkl" "m" "n" }
<END>
---snip---

The first and last lines must be exactly as shown (<END> is followed by a
single control character, normally '\n'), except that the date at the end
of the first line doesn't matter.

To get save/restore to use the text file (named, say, 'myArrays.sav'), add
the following line to st.cmd, before the call to iocInit():

set_pass1_restoreFile("myArrays.sav")

Note that you have to restore arrays in pass 1 (the second of two passes
save/restore makes during iocInit), because database access isn't callable
when the pass-0 restore occurs.  This means that the restored values will
not be available during record or device initialization, nor will they be
available to records processed by PINI="Yes".

You can also restore at run time, as described in the README file
(search for "fdbrestore").

--
Tim Mooney ([email protected]; 630-252-5417)
Advanced Photon Source
APS Operations Division
Beamline Controls & Data Acquisition Group


Replies:
Array save/restore Tim Mooney
References:
RE: initializing a waveform record Singleton, SJ (Steve)
Re: initializing a waveform record Gasper Pajor
Re: initializing a waveform record Ned Arnold

Navigate by Date:
Prev: RE: initializing a waveform record Liyu, Andrei
Next: Array save/restore Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: initializing a waveform record Ned Arnold
Next: Array save/restore Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·