diff --git a/db/sans_llb_beamstop.db b/db/sans_llb_beamstop.db index ffa39cd..1cf4bbb 100644 --- a/db/sans_llb_beamstop.db +++ b/db/sans_llb_beamstop.db @@ -88,7 +88,7 @@ record(calcout, "$(INSTR)$(SPS_REGISTER_NAME):RETRY") record(calcout, "$(INSTR)$(SPS_REGISTER_NAME):DECREASE-BUSY-TICK") { - field(INPA, "$(INSTR)$(SPS_REGISTER_NAME):BUSY") + field(INPA, "$(INSTR)$(SPS_REGISTER_NAME):BUSY NPP") field(CALC, "A") field(OOPT, "When Non-zero") field(DOPT, "Use OCAL") @@ -131,7 +131,8 @@ record(calc, "$(INSTR)$(SPS_REGISTER_NAME):MAP-STATUS") field(INPG, "$(INSTR)$(SPS_REGISTER_NAME):ConnStatusWrite NPP") field(INPH, "$(INSTR)$(SPS_REGISTER_NAME):BEAMSTOP NPP") field(INPI, "$(INSTR)$(SPS_REGISTER_NAME):BEAMSTOP_RBV NPP") - field(CALC, "(F=0||G=0||D=1)?3:(A=1)?2:(C=1||H#I)?1:(B=0)?3:0") + field(INPK, "$(INSTR)$(SPS_REGISTER_NAME):RETRY-ERROR NPP") + field(CALC, "(F=0||G=0||D=1||K=1)?3:(A=1)?2:(C=1||H#I)?1:(B=0)?3:0") field(FLNK, "$(INSTR)$(SPS_REGISTER_NAME):STATUS PP") } @@ -171,12 +172,13 @@ record(scalcout, "$(INSTR)$(SPS_REGISTER_NAME):STATUS-Msg") record(calcout, "$(INSTR)$(SPS_REGISTER_NAME):SET-READY") { field(INPA, "$(INSTR)$(SPS_REGISTER_NAME):MOVES") - field(CALC, "A") - field(OOPT, "Transition To Zero") + field(INPB, "$(INSTR)$(SPS_REGISTER_NAME):BUSY") + field(CALC, "B?A:0") + field(OOPT, "Transition To Non-zero") field(DOPT, "Use OCAL") field(OCAL, "0") field(OUT, "$(INSTR)$(SPS_REGISTER_NAME):BUSY PP") - field(FLNK, "$(INSTR)$(SPS_REGISTER_NAME):SHOULD-BLOCK-MOTORS") + field(FLNK, "$(INSTR)$(SPS_REGISTER_NAME):SHOULD-BLOCK-BSX") } record(calc, "$(INSTR)$(SPS_REGISTER_NAME):SHOULD-BLOCK-BSX") diff --git a/templates/sans_llb_beamstop.substitutions b/templates/sans_llb_beamstop.substitutions index ddb5cb3..539b130 100644 --- a/templates/sans_llb_beamstop.substitutions +++ b/templates/sans_llb_beamstop.substitutions @@ -23,12 +23,12 @@ file "$(sinqSPS_DB)/readusint.db" file "$(sinqSPS_DB)/readbit.db" { pattern - {OFFSET, BIT, BIT_NAME , ZNAM , ONAM , DESC, FLNK } - {6 , 0 , "SERVICE-MODE" , "disabled", "enabled", "" , "" } - {6 , 1 , "IN-POSITION" , "no" , "yes" , "" , "" } - {6 , 2 , "MOVES" , "no" , "yes" , "" , "" } - {6 , 3 , "ERROR" , "no" , "yes" , "" , "" } - {6 , 4 , "EXECUTE-POSSIBLE" , "no" , "yes" , "" , "$(STATUS_FLNK)"} + {OFFSET, BIT, BIT_NAME , ZNAM , ONAM , DESC} + {6 , 0 , "SERVICE-MODE" , "disabled", "enabled", "" } + {6 , 1 , "IN-POSITION" , "no" , "yes" , "" } + {6 , 2 , "MOVES" , "no" , "yes" , "" } + {6 , 3 , "ERROR" , "no" , "yes" , "" } + {6 , 4 , "EXECUTE-POSSIBLE" , "no" , "yes" , "" } } file "$(sinqSPS_DB)/readstring.db"