# Database for radiator positions # # V.K. July 16, 2012 record(ao,"$(pref)hd:radiator:motionCondit"){ field(DTYP,"Soft Channel") field(VAL,"0.1") field(SCAN, "Passive") } record(ao,"$(pref)hd:radiator:home"){ field(DTYP,"Soft Channel") field(VAL,"0.") field(PINI, "YES") field(SCAN, "Passive") } record(ao,"$(pref)hd:radiator:home:proc"){ field(DTYP,"Soft Channel") field(DOL,"$(pref)hd:radiator:home") field(OMSL,"closed_loop") field(OUT,"$(pref)hd:radiator:motor.VAL PP NMS") field(SCAN, "Passive") } record(calc, "$(pref)hd:radiator_at_home") { field(INPA, "$(pref)hd:radiator:motor.RBV") field(INPB, "$(pref)hd:radiator:home") field(INPC, "$(pref)hd:radiator:motor.DMOV") field(INPE, "$(pref)hd:radiator:motionCondit") field(SCAN, ".5 second") field(CALC, "(ABS(A-B)0)?1:0") } record( stringout, "$(pref)hd:radiator:d:name" ){ field( VAL , "W Wire 25um" ) } record(longout, "$(pref)hd:radiator:d:id") { field(VAL , "5" ) } # ID for the case when the AMO radiator is undefined record( longout, "$(pref)hd:radiator:udf:id" ){ field( VAL , "0" ) } # String name for AMO radiator when AMO radiator is undefined record( stringout, "$(pref)hd:radiator:udf:name" ) { field( VAL , "UNDEFINED" ) } # String name for AMO radiator when AMO radiator is undefined record( stringout, "$(pref)hd:radiator:none:name" ) { field( VAL , "NO RADIATOR" ) } # Calculation of the amorphous radiator ID record( calcout, "$(pref)hd:radiator:id_calc") { field( SCAN, "Passive" ) field( PINI, "YES" ) field( CALC, "A=1?F:B=1?G:C=1?H:D=1?I:E=1?J:K") # field( INPA, "$(pref)hd:radiator_at_a CPP" ) field( INPB, "$(pref)hd:radiator_at_b CPP" ) field( INPC, "$(pref)hd:radiator_at_c CPP" ) field( INPD, "$(pref)hd:radiator_at_d CPP" ) field( INPE, "$(pref)hd:radiator_at_home CPP" ) # field( INPF, "$(pref)hd:radiator:a:id CPP" ) field( INPG, "$(pref)hd:radiator:b:id CPP" ) field( INPH, "$(pref)hd:radiator:c:id CPP" ) field( INPI, "$(pref)hd:radiator:d:id CPP" ) field( INPJ, "$(pref)hd:radiator:home:id CPP" ) field( INPK, "$(pref)hd:radiator:udf:id CPP" ) # field( OOPT, "Every Time") field( OUT , "hd:radiator:id PP" ) field( DOPT, "Use CALC" ) } # Amorphous radiator ID record(longout, "$(pref)hd:radiator:id") { } # Calculation of the amorphous radiator name record(scalcout, "$(pref)hd:radiator:name_calc") { field( SCAN, "Passive" ) field( PINI, "YES" ) field( CALC, "A=1?AA:B=1?BB:C=1?CC:D=1?DD:E=1?EE:FF") field( INAA, "$(pref) hd:radiator:a:name CPP" ) field( INBB, "$(pref)hd:radiator:b:name CPP" ) field( INCC, "$(pref)hd:radiator:c:name CPP" ) field( INDD, "$(pref)hd:radiator:d:name CPP" ) field( INEE, "$(pref)hd:radiator:home:name CPP" ) field( INFF, "$(pref)hd:radiator:udf:name CPP" ) # field( INPA, "$(pref)hd:radiator_at_a CPP" ) field( INPB, "$(pref)hd:radiator_at_b CPP" ) field( INPC, "$(pref)hd:radiator_at_c CPP" ) field( INPD, "$(pref)hd:radiator_at_d CPP" ) field( INPE, "$(pref)hd:radiator_at_home CPP" ) # field( OOPT, "Every Time") field( OUT , "hd:radiator:name PP" ) field( DOPT, "Use CALC" ) } # Amorphous radiator name record(stringout, "$(pref)hd:radiator:name" ){ } # If this record is equal to 1 then the target is undefined # meaning that either or both of the targets are in undefined state. # Value of 2 means that both targets are in the beam. record(calc, "$(pref)hd:radiator:undefined" ) { field( SCAN, "Passive" ) field( PINI, "YES" ) field( CALC, "(A>1&&B>2)?2:((A=0||B=0)?1:0)" ) field( INPA, "$(pref)hd:radiator:id CPP" ) field( INPB, "$(GONI_ID) CPP" ) field( HIHI, "1.5" ) field( HHSV, "MAJOR" ) } # Calculation of the unified name of Hall D radiator combining the goniometer and the # amorphous radiator insertion devices. record(scalcout, "$(pref)hd:radiator:uname_calc") { field( SCAN, "Passive" ) field( PINI, "YES" ) # field( CALC, "C>0?CC:B>2?BB:A>1?AA:DD" ) field( INPA, "$(pref)hd:radiator:id CPP" ) field( INPB, "$(GONI_ID) CPP" ) field( INPC, "$(pref)hd:radiator:undefined CPP" ) field( INAA, "$(pref)hd:radiator:name CPP" ) field( INBB, "$(GONI_NAME) CPP" ) field( INCC, "$(pref)hd:radiator:udf:name" ) field( INDD, "$(pref)hd:radiator:none:name" ) # field( OOPT, "Every Time") field( OUT , "$(pref)hd:radiator:uname PP" ) field( DOPT, "Use CALC" ) } # Unified name of Hall D radiator combining the goniometer and the # amorphous radiator insertion devices. record(stringout, "$(pref)hd:radiator:uname" ){ field( SCAN, "Passive" ) field( OUT , "HALL_D_TARGET PP" ) field( OMSL, "supervisory" ) }