#no of installed radiators record(ao, "$(P)NRAD"){ field(DESC, "No of radiators in Goniometer") field(VAL,"$(NRAD)") } #approximate psitions of the cross on the camera picture record(ai, "$(P)CROSSX"){ field(DESC, "x of crosswire overlaid in camera") field(VAL,"$(CROSSX)") } record(ai, "$(P)CROSSY"){ field(DESC, "y of crosswire overlaid in camera") field(VAL,"$(CROSSY)") } #approximate psitions of the cross on the camera picture record(ai, "$(P)CROSSX_D"){ field(DESC, "x of crosswire 4 diamonds") field(VAL,"$(CROSSX)") field( PINI, "YES") } record(ai, "$(P)CROSSY_D"){ field(DESC, "y of crosswire 4 diamonds") field(VAL,"$(CROSSY)") field( PINI, "YES") } #approximate psitions of the cross on the camera picture record(ai, "$(P)CROSSX_A"){ field(DESC, "x of crosswire 4 AMO") field(VAL,"$(CROSSX_A)") field( PINI, "YES") } record(ai, "$(P)CROSSY_A"){ field(DESC, "y of crosswire 4 AMO") field(VAL,"$(CROSSY_A)") field( PINI, "YES") } record(calcout, "$(P)CROSSX_CALC"){ field(DESC,"CALC for crosswire x") field(SCAN,"Passive") field(OUT, "$(P)CROSSX PP") field(INPA,"$(P)CROSSX_D CPP") field(INPB,"$(P)CROSSX_A CPP") field(INPC,"$(P)RADIATOR_ID CPP") field(CALC,"(C>0)?A:B") field(OOPT,"Every Time") field(DOPT, "Use CALC" ) } record(calcout, "$(P)CROSSY_CALC"){ field(DESC,"CALC for crosswire y") field(SCAN,"Passive") field(OUT, "$(P)CROSSY PP") field(INPA,"$(P)CROSSY_D CPP") field(INPB,"$(P)CROSSY_A CPP") field(INPC,"$(P)RADIATOR_ID CPP") field(CALC,"(C>0)?A:B") field(OOPT,"Every Time") field(DOPT, "Use CALC" ) } record(ao, "$(P)RAD:DX"){ field(DESC, "Tolerance in X") field(VAL,"$(DX)") } record(ao, "$(P)RAD:DY"){ field(DESC, "Tolerance in Y") field(VAL,"$(DY)") } record(ao, "$(P)RAD:DROLL"){ field(DESC, "Tolerance in ROLL") field(VAL,"$(DROLL)") } record(ao, "$(P)RAD:DYAW"){ field(DESC, "Tolerance in YAW") field(VAL,"$(DYAW)") } record(ao, "$(P)RAD:DPITCH"){ field(DESC, "Tolerance in PITCH") field(VAL,"$(DPITCH)") } #Records for all the parameters of the currently installed radiator #If INDEX = 0 no radiator is intalled, and other params have no meaning. record(ai, "$(P)RADIATOR_INDEX"){ field(SCAN,".5 second") field(DESC, "Installed Radiator Index") # field(VAL , "0") # field(PINI, "YES") } record(ai, "$(P)RADIATOR_ID"){ field( PINI, "YES") } record(ao, "$(P)RADIATOR_X"){ } record(ao, "$(P)RADIATOR_Y"){ } record(ao, "$(P)RADIATOR_ROLL"){ } record(ao, "$(P)RADIATOR_R"){ } record(stringin, "$(P)RADIATOR_NAME"){ } #write zero to $(P)RADIATOR_INDEX as soon as X,Y or ROLL motion detected. #and forward link to also set the ID to zero. These get overwritten when a #radiator calculated that it's in place record(calcout, "$(P)CHANGE_XYROLL"){ field(SCAN,".5 second") field(OUT, "$(P)RADIATOR_INDEX PP") field(INPA,"$(P)X.MOVN") field(INPB,"$(P)Y.MOVN") field(INPC,"$(P)ROLL.MOVN") field(OOPT,"When Zero") field(CALC,"((A+B+C)>0)?0:1") # field(FLNK, "$(P)CHANGE_ID PP") } #force the ID to zero until we know better record(seq, "$(P)CHANGE_ID"){ field(DOL1, "0") field(LNK1, "$(P)RADIATOR_ID") } #force the ID to zero until we know better record(stringout, "$(P)CHANGE_NAME"){ field(SCAN, "Passive") field(VAL , "Undefined") field(PINI, "YES") field(OUT , "$(P)RADIATOR_NAME PP") field(OMSL, "supervisory") } # This record keep incrementing each time each target request # to be the one in the beamline. This is ensured by the forward # link in the SET_IN1 record for each target. record(calc, "$(P)RAD_CHANGE_CNTR") { field( SCAN, "Passive" ) field( VAL , "0" ) field( PINI, "YES") field( CALC, "A+1" ) field( INPA, "$(P)RAD_CHANGE_CNTR") } # If no target makes a request to become the target in the beamline # this record will make the radiator ID record to be 0. This should # work since the radiators that are in the beamline should be requesting # to store their ID in RADIATOR_ID each 0.2 second. Can be replacing the # CHANGE_ID record. record(calcout, "$(P)RAD_ID_TEST") { field( SCAN, "1 second" ) field( CALC, "(A-B)>0?A:0") field( INPA, "$(P)RAD_CHANGE_CNTR") field( INPB, "$(P)RAD_ID_TEST") field( OOPT, "When Zero") field( OUT , "$(P)RADIATOR_ID PP" ) field( OCAL, "0" ) field( DOPT, "Use OCAL" ) } record(calcout, "$(P)RAD_NAME_TEST") { field( SCAN, "1 second" ) field( CALC, "(A-B)>0?A:0") field( INPA, "$(P)RAD_CHANGE_CNTR") field( INPB, "$(P)RAD_NAME_TEST") field( OOPT, "When Zero") field( OUT , "$(P)CHANGE_NAME.PROC PP" ) field( OCAL, "1" ) field( DOPT, "Use OCAL" ) }