correct set-ready logic

This commit is contained in:
2026-04-10 14:48:38 +02:00
parent 6541ef13cb
commit 171ee7227e
2 changed files with 13 additions and 11 deletions
+7 -5
View File
@@ -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")
+6 -6
View File
@@ -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"