# {prefix}:switch will output to {prefix}p:switch and {prefix}n:switch # this requires the detector channels to be named accordingly (i.e. PREFIXpSUFFIX and PREFIXnSUFFIX) record(longout, "$(DETch):switch") { field(DESC, "Turn ON and OFF switch") field(SCAN, "Passive") field( OUT, "$(DETch):switch:out PP") } record(dfanout, "$(DETch):switch:out") { field(DESC, "dfanout to 2 switches") field(SCAN, "Passive") #field( DOL, "$(DETch):switch") field(OMSL, "supervisory") field(OUTA, "$(DETch)p:switch PP") field(OUTB, "$(DETch)n:switch PP") field(OUTC, "$(DETch)p:pilock PP") field(OUTD, "$(DETch)n:pilock PP") field(OUTE, "$(DETch)o:switch PP") field(OUTF, "$(DETch)o:pilock PP") } record(calcout, "$(DETch):switch:current") { field(DESC, "check of +/- BCAL LV pair") #field(INPA, "$(DETch)p:switch:fbk NPP") #field(INPB, "$(DETch)n:switch:fbk NPP") field(INPC, "$(DETch)p:parsed:status NPP") field(INPD, "$(DETch)n:parsed:status NPP") field(INPF, "$(DETch)o:parsed:status NPP") field(INPE, "$(DETch):switch:delayed NPP") field( OUT, "$(DETch):switch PP") field(CALC, "(((C&1)&&(D&1)&&(F&1))&&(E=0))?0:1") field(OOPT, "When Zero") field(DOPT, "Use CALC") #field(ODLY, "5") } record(bi, "$(DETch):switch:delayed") { field(DESC, "delayed status of +/- BCAL LV pair") field( VAL, "1") field( ZNAM, "0") field( ONAM, "1") # field( FLNK, "$(DETch):switch:current" ) } record(calcout, "$(DETch):switch:delay") { field(DESC, "delayed check of +/- BCAL LV pair") #field(INPA, "$(DETch)p:switch:fbk CPP") #field(INPB, "$(DETch)n:switch:fbk CPP") field(INPC, "$(DETch)p:parsed:status CPP") field(INPD, "$(DETch)n:parsed:status CPP") field(INPE, "$(DETch)o:parsed:status CPP") field( OUT, "$(DETch):switch:delayed PP") # field(CALC, "(C&1||D&1)?0:1") field(CALC, "(((C&1)#(D&1))&&((C&1)#(E&1)))?0:1") field(OOPT, "When Zero") field(DOPT, "Use CALC") field(ODLY, "20") field( VAL, "1") } record(calcout, "$(DETch):switch:delay1") { field(DESC, "delayed check of +/- BCAL LV pair") #field(INPA, "$(DETch)p:switch:fbk CPP") #field(INPB, "$(DETch)n:switch:fbk CPP") field(INPC, "$(DETch)p:parsed:status CPP") field(INPD, "$(DETch)n:parsed:status CPP") field(INPE, "$(DETch)o:parsed:status CPP") field( OUT, "$(DETch):switch:delayed PP") # field(CALC, "(C&1||D&1)?0:1") field(CALC, "((C&1)#(D&1)#(E&1))?0:1") field(OOPT, "When Non-zero") field(DOPT, "Use CALC") field(ODLY, "20") field( VAL, "1") } record(bi, "$(DETch)p:pilock") { } record(bi, "$(DETch)n:pilock") { } record(bi, "$(DETch)o:pilock") { } # {prefix}:enable will output to {prefix}p:switch and {prefix}n:switch record(bo, "$(DETch):enable") { field(DESC, "Enable/disable of BCAL LV pair") field(SCAN, "Passive") field( OUT, "$(DETch):enable:out PP") field( ZNAM, "Disabled") field( ONAM, "Enabled") field( PINI, "YES") field( VAL, "1") } record(dfanout, "$(DETch):enable:out") { field(DESC, "dfanout to 2 enables") field(SCAN, "Passive") field( DOL, "$(DETch):enable") field(OMSL, "supervisory") field(OUTA, "$(DETch)p:enable PP") field(OUTB, "$(DETch)n:enable PP") field(OUTC, "$(DETch)o:enable PP") }