# Database for Harp scan # # Vanik Kakoyan July 24, 2012 # modif: 15 Sep 2014 # Macro paramters: # $(P) - XPS Controller name (P=T1-7-BOT:) # $(R) - Motor (R=m6) # (HARP) -prefix for PV and for the Name of the file to save data # /gluex/data/HarpScans/ - dir for data saving ##### Harp Scan Parameters ## record(stringout,"$(HARP):fileName1"){ field(DTYP,"Soft Channel") field(VAL,"/gluex/data/HarpScans/s_1.out") field(SCAN, "Passive") } record(stringout,"$(HARP):fileName2"){ field(DTYP,"Soft Channel") field(VAL,"/gluex/data/HarpScans/s_2.out") field(SCAN, "Passive") } record(stringout,"$(HARP):fileName"){ field(DTYP,"Soft Channel") field(VAL,"$(HARP)") field(SCAN, "Passive") } record(ao,"$(HARP):motionCondit"){ field(DTYP,"Soft Channel") # field(VAL,"0.01") field(SCAN, "Passive") } record(ao,"$(HARP):motionConditInit"){ field(DTYP,"Soft Channel") field(DOL,"$(P)$(R).MRES") field(OUT, "$(HARP):motionCondit") field(PINI, "YES") field(OMSL,"closed_loop") field(SCAN, "Passive") } record(ao,"$(HARP):runStatus"){ field(DTYP,"Soft Channel") field(VAL,"0") field(SCAN, "Passive") } record(ao,"$(HARP):offset"){ field(DTYP,"Soft Channel") field(VAL,"0.2") field(SCAN, "Passive") field(FLNK, "$(HARP):startPosition") } # $(HARP):harpStatus 0-Ready, 1-Go to Start position, 2-Acquiring, 3-Done, 4-Abort record(ao,"$(HARP):harpStatus"){ field(DTYP,"Soft Channel") field(VAL,"0") field(SCAN, "Passive") } record(ao,"$(HARP):harpQuality"){ field(DTYP,"Soft Channel") field(VAL,"0") field(SCAN, "Passive") } record(ao,"$(HARP):homePosition"){ field(DTYP,"Soft Channel") field(PINI, "YES") field(VAL,".2") field(SCAN, "Passive") } record(ao,"$(HARP):startPulse"){ field(DTYP,"Soft Channel") field(PINI, "YES") field(VAL,"1.") field(SCAN, "Passive") field(FLNK, "$(HARP):nSteps") } record(ao,"$(HARP):endPulse"){ field(DTYP,"Soft Channel") field(PINI, "YES") field(VAL,"1.5") field(SCAN, "Passive") field(FLNK, "$(HARP):nSteps") } record(ao,"$(HARP):step"){ field(DTYP,"Soft Channel") field(PINI, "YES") field(VAL,"0.05") field(SCAN, "Passive") field(FLNK, "$(HARP):nSteps") } record(calcout, "$(HARP):nSteps") { field(INPA, "$(HARP):startPulse") field(INPB, "$(HARP):endPulse") field(INPC, "$(HARP):step") field(CALC, "A>B?(A-B)/C:(B-A)/C") field(SCAN, "Passive") field(FLNK, "$(HARP):startPosition") } record(calc, "$(HARP):startPosition") { field(INPA, "$(HARP):startPulse") field(INPB, "$(HARP):endPulse") field(INPC, "$(HARP):offset") field(INPD, "$(HARP):step") field(CALC, "AB?B:A") field(OUT,"$(P)$(R)PCOMinPosition.VAL PP NMS") field(SCAN, "Passive") field(FLNK, "$(HARP):max_pr") } record(calcout, "$(HARP):max_pr") { field(INPA, "$(HARP):startPulse") field(INPB, "$(HARP):endPulse") field(CALC, "A>B?A:B") field(OUT,"$(P)$(R)PCOMaxPosition.VAL PP NMS") field(SCAN, "Passive") field(FLNK, "$(HARP):step_pr") } record(ao,"$(HARP):step_pr"){ field(DTYP,"Soft Channel") field(DOL,"$(HARP):step") field(OMSL,"closed_loop") field(OUT,"$(P)$(R)PCOPositionStep.VAL PP NMS") field(SCAN, "Passive") field(FLNK, "$(HARP):pulseWidth_pr") } record(ao,"$(HARP):pulseWidth_pr"){ field(DTYP,"Soft Channel") field(DOL,"2") field(OMSL,"closed_loop") # field(OUT,"$(P)$(R)PCOPulseWidth.VAL PP NMS") field(SCAN, "Passive") field(FLNK, "$(HARP):homeSpeed_pr") } record(ao,"$(HARP):homeSpeed_pr"){ field(DTYP,"Soft Channel") field(DOL,"$(HARP):homeSpeed") field(OMSL,"closed_loop") field(OUT,"$(P)$(R).VELO PP NMS") field(SCAN, "Passive") field(FLNK, "$(HARP):startPos_pr") } record(ao,"$(HARP):startPos_pr"){ field(DTYP,"Soft Channel") field(DOL,"$(HARP):startPosition") field(OMSL,"closed_loop") field(OUT,"$(P)$(R).VAL PP NMS") field(SCAN, "Passive") field(FLNK, "$(HARP):disable_pr") } record(ao,"$(HARP):disable_pr"){ field(DTYP,"Soft Channel") field(DOL,"1") field(OMSL,"closed_loop") field(OUT,"$(P)$(R)PCODisable PP NMS") field(SCAN, "Passive") field(FLNK, "$(HARP):set_pr") } record(ao,"$(HARP):set_pr"){ field(DTYP,"Soft Channel") field(DOL,"1") field(OMSL,"closed_loop") field(OUT,"$(P)$(R)PCOSet PP NMS") field(SCAN, "Passive") } ## start scanning record(calcout, "$(HARP):harp_at_start") { field(INPA, "$(P)$(R).RBV") field(INPB, "$(HARP):startPosition") field(INPC, "$(P)$(R).DMOV") field(INPD, "$(HARP):runStatus") field(INPE, "$(HARP):motionCondit") field(SCAN, ".2 second") field(CALC, "(ABS(A-B)