EPICS: generation of DBs and GUIs for HV
Following procedure generates *.db and *.adl/*.alh files for High Voltage applications.
cd $APP/hvca/db/
Create *.dat file with following format:
clonpc1:db> more caen.dat CAEN_1_00 02 1 1 01 01 03 00 -1200.0 1.5 1.3 121.5 486.0 2550.0 -2500.0 CAEN_1_01 02 1 1 01 01 03 01 -1200.0 1.5 1.3 121.5 486.0 2550.0 -2500.0 CAEN_1_02 02 1 1 01 01 03 02 -1200.0 1.5 1.3 121.5 486.0 2550.0 -2500.0 CAEN_1_03 02 1 1 01 01 03 03 -1200.0 1.5 1.3 121.5 486.0 2550.0 -2500.0 .....................................
Columns have following meaning (NEED CHECK !):
1 - group name (channel name, will be used as part of EPICS channel access variable names) 2 - group number 3 - allow (?) 4 - ioc number 5 - mainframe address (for Lecroy by jumpers, for CAEN by IP names, test setup mainframe numbers must be >100 ???) 6 - slot number 7 - submodule (?) 8 - channel number 9 - voltage (demand, V) 10 - mvdz (measured voltage, V) 11 - mcdz (measuerd current, uA?) 12 - rump up speed 13 - rump down speed 14 - tc (trip current, uA?) 15 - voltage (max, V)
Second input file is *.grp, for example caen.grp:
clonpc1:db> more caen.grp 1 CAEN_7
First column is group number and second one is group name. It will be first two columns on medm screen.
Makefile must be manually adjusted for every new *.dat file. It is possible to combine several *.dat file in one - see inside Makefile.
To generate all necessary file type 'make <filename without extension>', for example if file name is 'caen.dat', type:
make caen
Following output fill shows up:
clonpc1:db> make caen ./dat2db.pl caen echo caen | /usr/local/clas/devel/R3.14.8.2/EPICS/app/hvca/bin/hv_adl Input name of hv data file (omit the extension '.dat') : WORKING ON GROUP #1 Initializing variables to default values. Creating file: caen_CAEN_7_1.adl Initializing variables to default values. Creating file: caen_CAEN_7_param_1.adl Initializing variables to default values. Creating file: caen.adl ./dat2req.pl caen chmod +x caen*.csh test -d ../medm/adl || mkdir ../medm/adl test -d ../req || mkdir ../req mv caen*.adl ../medm/adl mv caen*.snap ../req mv caen*.csh ../medm/adl mv caen*.alarms ../medm/adl test -d ../medm/alh || mkdir ../medm/alh mv caen*.alhConfig* ../medm/alh
Following files willbe produced:
caen_01.db ../medm/adl/caen.adl .................adl ../medm/alh/caen_CAEN_7.alhConfig ../medm/alh/caen_mf_01_01.alhConfig_mf
Now copy generated *.db files into final destination where it will be picked up by IOC startup script, for example:
cp caen_01.db $BASEB/src/CAEN_HV/IocShell/
Create appropriate links to our medm files from standatd place:
cd $APP/medm make
Create appropriate links to our alh files from standatd place:
cd $APP/alh make