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  <20082009  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  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Record Initialization
From: Dirk Zimoch <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: [email protected]
Date: Wed, 01 Oct 2008 13:57:19 +0200
Andrew Johnson wrote:
Hi Zen,

On Tuesday 30 September 2008 17:09:25 Szalata, Zenon M. wrote:
Is it possible to control the order in which epics records are initialized
when the IOC starts up? I am working on an IOC for a device and I would
like to reset this device. I have an output record which writes a number
to the device at init time (PINI=YES), which resets it. In order that my
scheme works, this record needs to be initialized before any other record. I am using streamdevice with asyn. I am tracing all IO and I see that the
initialization order is arbitrary. Any help would be appreciated,

As you have discovered, the IOC's record initialization order is not specified. In practice I believe it's currently ordered first by record type in the order of entry in the DBD file, and within each record type in alphabetical order by record name, but I wouldn't suggest that you rely on that order in case it changes in future releases.


I don't know whether streamdevice allows you to specify an initialization message that can be sent to the device at startup; if it does use that to perform the reset rather than relying on your reset record. If not, try and do the reset from an iocsh/vxWorks command that you can put in the st.cmd file before iocInit. If you can't work out how to do that, maybe you could link all your device I/O records SDIS links to an "initialized" record which only lets them process after the reset has happened (this makes setting PINI on any of them a bit of a lottery though).

HTH,

- Andrew

StreamDevice can send messages earlier than PINI in the @init handler. This actually happens during init_record and is meant to initialize output records from the hardware. But still then the order of @init handlers of different records is undefined.


--
Dr. Dirk Zimoch
Paul Scherrer Institut, WBGB/006
5232 Villigen PSI, Switzerland
Phone +41 56 310 5182

References:
Record Initialization Szalata, Zenon M.
Re: Record Initialization Andrew Johnson

Navigate by Date:
Prev: Re: Record Initialization Ralph Lange
Next: Re: epicsThreadSleep() and epicsThreadSleepQuantum() David Dudley
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Record Initialization Dayle Kotturi
Next: RE: Record Initialization Redman, Russell
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·