EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0
From: Andrew Johnson via Core-talk <[email protected]>
To: mdavidsaver <[email protected]>
Date: Tue, 26 Nov 2019 17:56:49 -0000
Every site wants to configure their IOCs and startup slightly differently, and I don't have a problem with allowing that. I don't see why you guys don't like having to include commands in your startup scripts to implement the behavior you want though; that caPutLogInit command above doesn't have to appear in the st.cmd file itself, and it shows that you can still use environment variables for configuration parameters along with a startup line.

At APS we collect all our common commands into scripts in a site-specific support module that the st.cmd files executes at the appropriate time. I am working on makeBaseApp templates for the APS Upgrade to make it easy for engineers to generate IOCs that follow our standards. The st.cmd file generated for a soft IOC looks like this:


#!../../bin/linux-x86_64/first

< "envPaths"
< "${IOCSTD}/bin/${ARCH}/envParams.iocsh"

## Connect to log server
iocLogInit

cd "${TOP}"

## Register support components
dbLoadDatabase "dbd/first.dbd"
first_registerRecordDeviceDriver pdbbase

## Load record instances here
#dbLoadRecords "db/first.db", "IOC=${IOC_NAME=${IOC}}"

## Do iocStd pre-initialization
< "${IOCSTD}/bin/${ARCH}/preInit.iocsh"

## Start the IOC running
iocInit

## Start sequence programs here
#seq firstSeq, "IOC=${IOC_NAME=${IOC}}"

## Do iocStd post-initialization
< "${IOCSTD}/bin/${ARCH}/postInit.iocsh"

## Script st.cmd done.


Those three ${IOCSTD}/bin/${ARCH}/*.iocsh scripts implement all the common initialization tasks, and if I need to add or modify something for all our IOCs that's where I make the necessary changes. I suspect ITER uses Ralph's snippets feature to do something similar. You could also have the st.cmd file execute scripts whose path comes from the environment, giving you even more control if that's what you really want.

In my case above I'm putting the iocLogInit command in the st.cmd file instead of a script to allow the engineers to turn logging off if/when they want to because that's something they're used to, but I could put it in the envParams.ioch script instead.

-- 
https://code.launchpad.net/~epics-core/epics-base/+git/Com/+merge/373098
Your team EPICS Core Developers is subscribed to branch epics-base:7.0.

References:
[Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 mdavidsaver via Core-talk

Navigate by Date:
Prev: Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 Martin Konrad via Core-talk
Next: Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 Shankar, Murali via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 Martin Konrad via Core-talk
Next: Re: [Merge] ~epics-core/epics-base/+git/Com:errlog2syslog into epics-base:7.0 Shankar, Murali via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 26 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·