Experimental Physics and Industrial Control System
You did not show us the autoSave .req file you are using. .req files can take macros. For example:
corvette:areaDetector/ADApp/Db>more ADBase_settings.req
$(P)$(R)DataType
$(P)$(R)ColorMode
$(P)$(R)BinX
$(P)$(R)BinY
$(P)$(R)MinX
That generic .req file is invoked by the IOC-specific .req file:
corvette:areaDetector/iocBoot/iocSimDetector>more auto_settings.req
file "simDetector_settings.req", P=$(P), R=cam1:
file "simDetector_settings.req", P=$(P), R=cam2:
file "ADBase_settings.req", P=$(P), R=cam1:
which is in turn invoked from the startup script:
# save things every thirty seconds
create_monitor_set("auto_settings.req", 30, "P=$(PREFIX)")
Mark
________________________________
From: [email protected] [[email protected]] on behalf of Amien TLABS [[email protected]]
Sent: Thursday, June 20, 2013 8:23 AM
To: [email protected]
Subject: AutoSAVE file cannot use substitution macros
Hi
I'm using a 'waveform' record in my IOC, which I use to map my cable wiring to my channels at the start of the IOC.
To populate the array, I then use a 'sav' (AutoSave) file that has the array values in it ( dev1:channelmap.VAL @array@ {"2" "12" "7"}) ) etc. This array is normally 48 elements.
Now the users of the IOC can change this array to suit their mappings.
My problem is that I would like to have a substitution macro in the 'dev1' part. However, one cannot use a substitution macro in a 'sav' file.
I have a waveform record in my template file. Here's my st.cmd and template files:
################## START IOC SCRIPT #####################################
dbLoadDatabase("iocBeagle48.dbd")
iocBeagle48_registerRecordDeviceDriver(pdbbase)
int32DriverInit("int32",-32768,32767)
##### We load the HARPS template ##########################################
dbLoadTemplate("iocPV.substitutions")
##### Load Save files #####################################################
set_savefile_path("save")
set_pass0_restoreFile("channelmap_MB.sav")
set_pass1_restoreFile("channelmap_MB.sav")
#### INIT IOC here #######################################################
iocInit()
#######################################################################
<<< Here's my iocPV.db >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
record(waveform, "$(dev):channelmap") {
field(DTYP, "asynInt32ArrayOut")
field(INP, "@asyn(int32 0 100)")
field(NELM, "48")
field(FTVL, "LONG")
field(PINI, "YES")
}
<<< here's my substitution file >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
file iocPV.db
{
pattern { dev mux }
{"harp100" "1" }
}
<<<<<<< and my SAV file >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# save/restore V5.5 Automatically generated - DO NOT MODIFY - 130215-051243
harp100:channelmap.VAL @array@ { "32" "0" "1" "2" "3" "4" "5" "6" "7" "24" "25" "26" "27" "28" "29" "30" "31" "47" "17" "18" "19" "20" "21" "22" "23" "8" "16" "10" "11" "12" "13" "14" "15" "9" "33" "34" "35" "36" "37" "38" "39" "40" "41" "42" "43" "44" "45" "46" }
<END>
As you can see, i want to have a substitution macro for my sav file (harp100 should be substituted by pattern dev)
Or maybe there is a better way to populate my waveform.
Thanks
Amien
TLABS
Cape Town.
- Replies:
- Re: AutoSAVE file cannot use substitution macros Amien TLABS
- References:
- AutoSAVE file cannot use substitution macros Amien TLABS
- Navigate by Date:
- Prev:
AutoSAVE file cannot use substitution macros Amien TLABS
- Next:
Re: AutoSAVE file cannot use substitution macros Amien TLABS
- 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:
AutoSAVE file cannot use substitution macros Amien TLABS
- Next:
Re: AutoSAVE file cannot use substitution macros Amien TLABS
- 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