########################################################################### How to use shell scripts from the terminal prompt on phoncs0 to set values of EPICS records, and to retrieve values from EPICS records Johann M. Heuser Febr. 23, 2000 ########################################################################### This envolves the BURT tool, the Backup and Restore Tool that comes with the EPICS package. Important: before executing the scripts, change the attributes with "chmod +x *.csh". 1. Example: set values of EPICS records ======================================= channel_enable.csh ================== #!/bin/csh -f burtwb -f channel_enable.snap sleep 2 exit channel_enable.snap =================== --- Start BURT header Time: Mon Feb 21 16:00:04 2000 Login ID: phoncs () Eff UID: 31071 Group ID: 31071 Keywords: Comments: Type: Absolute Directory /home/phoncs/heuser/epicsB/app/hvca/db Req File: --- End BURT header HV_DC_W_S_KS00_X1__C.CEO 1 1 HV_DC_W_S_KS00_X1__P.CEO 1 1 HV_DC_W_S_KS00_X1__G.CEO 1 1 HV_DC_W_S_KS00_X1__B.CEO 1 1 HV_DC_W_S_KS00_UV1_C.CEO 1 1 HV_DC_W_S_KS00_UV1_P.CEO 1 1 HV_DC_W_S_KS00_UV1_G.CEO 1 1 2. Example: retrieve values from EPICS records: =============================================== retrieve.csh ============ #!/bin/csh -f burtrb -f retrieve.req -o retrieve.snap sleep 1 # #optionally: #convert input field snapshot file to output field snapshot sed 's/\.\(.\)\(.\)I/\.\1\2O/' retrieve.snap > retrieve.snap.out rm retrieve.snap mv retrieve.snap.out retrieve.snap # sleep 1 exit retrieve.req ============ HV_DC_W_S_KS00_X1__C.CEI HV_DC_W_S_KS00_X1__P.CEI HV_DC_W_S_KS00_X1__G.CEI HV_DC_W_S_KS00_X1__B.CEI HV_DC_W_S_KS00_UV1_C.CEI HV_DC_W_S_KS00_UV1_P.CEI HV_DC_W_S_KS00_UV1_G.CEI retrieve.snap --> this file is created by BURTRB ============= --- Start BURT header Time: Mon Feb 21 16:00:04 2000 Login ID: phoncs () Eff UID: 31071 Group ID: 31071 Keywords: Comments: Type: Absolute Directory /home/phoncs/heuser/epicsB/app/hvca/db Req File: --- End BURT header HV_DC_W_S_KS00_X1__C.CEI 1 1 HV_DC_W_S_KS00_X1__P.CEI 1 1 HV_DC_W_S_KS00_X1__G.CEI 1 1 HV_DC_W_S_KS00_X1__B.CEI 1 1 HV_DC_W_S_KS00_UV1_C.CEI 1 1 HV_DC_W_S_KS00_UV1_P.CEI 1 1 HV_DC_W_S_KS00_UV1_G.CEI 1 1 retrieve.snap after conversion of input to output fields --> this file can immediately be used as shown with the channel_enable example ============================================================ --- Start BURT header Time: Mon Feb 21 16:00:04 2000 Login ID: phoncs () Eff UID: 31071 Group ID: 31071 Keywords: Comments: Type: Absolute Directory /home/phoncs/heuser/epicsB/app/hvca/db Req File: --- End BURT header HV_DC_W_S_KS00_X1__C.CEO 1 1 HV_DC_W_S_KS00_X1__P.CEO 1 1 HV_DC_W_S_KS00_X1__G.CEO 1 1 HV_DC_W_S_KS00_X1__B.CEO 1 1 HV_DC_W_S_KS00_UV1_C.CEO 1 1 HV_DC_W_S_KS00_UV1_P.CEO 1 1 HV_DC_W_S_KS00_UV1_G.CEO 1 1