Experimental Physics and Industrial Control System
|
In the example, replace snova.dft with all_my_default_values.dft and snova_streamEthernet.dbl with database_load.dbl I think you get the idea. -- Emmanuel
From: [email protected]To: [email protected]; [email protected]CC: [email protected]Subject: RE: Substitutions defaults and tricks Date: Tue, 19 Nov 2013 10:42:58 -0800
> Hi Tony, > In your example, there wouldn't be an option of whether you define TS1ST in st.cmd. You lose the default value so you must define it. The problem that I'm trying to solve is that there are literally hundreds of values with facility-specific defaults, not just TS1ST, and of those values most systems only need to define non-default values for a few of them if any.
Use include files with epicsEnvSet!
Example:
1/ FILE WITH DEFAULT VALUES cat > all_my_default_valules.dft <<EOT epicsEnvSet(SNOVA_DEVN, "SNOVA" ) epicsEnvSet(SNOVA_FSEP, "_" ) #And a lot more... EOT
2/ FILE WITH DBLOAD cat > database_load.dbl <<EOT dbLoadRecords("${DB_DIR}/snova_asynStream.db","deviceName=${SNOVA_DEVN},_=${SNOVA_FSEP},asynPort=${SNOVAA_PORT},streamProtocol =${SNOVAA_PROT}"); # And a lot more... EOT
3/ IOC STARTUP FILE cat > RunMe <<EOT #!/usr/bin/env snova-3_14_11
< ${EPICS_IOCHOST}/envPaths # Path variables dbLoadDatabase("${DBD_DIR}/snova.dbd") snova_registerRecordDeviceDriver(pdbbase)
< ${DFT_DIR}/snova.dft epicsEnvSet(SNOVA_DEVN, "SNOVA_1") # First instance with non default name SNOVA_1 < ${DBL_DIR}/snova_streamEthernet.dbl
< ${DFT_DIR}/snova.dft epicsEnvSet(SNOVA_DEVN, "SNOVA_2") # Second instance with non default name SNOVA_2 < ${DBL_DIR}/snova_streamEthernet.dbl
iocInit() EOT
Enjoy! -- Emmanuel
|
- References:
- Substitutions defaults and tricks Brown, Garth
- Re: Substitutions defaults and tricks Pietryla, Anthony F.
- RE: Substitutions defaults and tricks Brown, Garth
- RE: Substitutions defaults and tricks Emmanuel Mayssat
- Navigate by Date:
- Prev:
RE: Substitutions defaults and tricks Emmanuel Mayssat
- Next:
Re: Convertion for asynFloat64 Andrew Johnson
- 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
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: Substitutions defaults and tricks Emmanuel Mayssat
- Next:
RE: Substitutions defaults and tricks Emmanuel Mayssat
- 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
2021
2022
2023
2024
|
ANJ, 20 Apr 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|