## Detector records ## ###################### ################## Board Base ####################### ######### Status variable used for sincronization ############ record(longout, "$(DET):sync_status_w") { field(SCAN, "Passive") } record( bi, "$(DET):auto_pulsing_stat" ) { field(SCAN, "Passive") field(ZNAM, "STOP") field(ONAM, "RUN") } record(bo, "$(DET):sync_semaphore_w") { field(SCAN, "Passive") field(ZNAM, "INHIBIT") field(ONAM, "ALLOW") field(OMSL, "supervisory") } record(bo, "$(P1):gui_start_stop_w") { field(SCAN, "Passive") field(ZNAM, "STOPPED") field(ONAM, "STARTED") field(OMSL, "supervisory") } record(bo, "$(P2):gui_start_stop_w") { field(SCAN, "Passive") field(ZNAM, "STOPPED") field(ONAM, "STARTED") field(OMSL, "supervisory") } ##### trigger 4 upper frequency ###################### record(ao, "$(DET):trigup1_freq_w" ) { field(SCAN, "Passive") } record(ao, "$(DET):trigup2_freq_w" ) { field(SCAN, "Passive") } ##### trigger 4 upper width ###### record(longout, "$(DET):trigup1_width_w" ) { field(SCAN, "Passive") } record(longout, "$(DET):trigup2_width_w" ) { field(SCAN, "Passive") } ##### trigger 4 upper npulses ###### record(longout, "$(DET):trigup1_npulses_w" ) { field(SCAN, "Passive") } record(bo, "$(DET):trigup1_npulses_button_w" ) { field(SCAN, "Passive") field(ZNAM, "Disabled") field(ONAM, "Enabled") field(OMSL, "supervisory") } record(longout, "$(DET):trigup2_npulses_w" ) { field(SCAN, "Passive") } record(bo, "$(DET):trigup2_npulses_button_w" ) { field(SCAN, "Passive") field(ZNAM, "Disabled") field(ONAM, "Enabled") field(OMSL, "supervisory") } #############################################3 ##### trigger width ###### record(longout, "$(DET):trig1_width_w" ) { field(SCAN, "Passive") } ##### trigger width ###### record(longout, "$(DET):trig2_width_w" ) { field(SCAN, "Passive") } ##### width ###### record(longout, "$(DET):width_w" ) { field(SCAN, "Passive") } ##### npulses ###### record(longout, "$(DET):npulses_w" ) { field(SCAN, "Passive") } ##### npulses_button ###### record(bo, "$(DET):npulses_button_w" ) { field(SCAN, "Passive") field(ZNAM, "Disabled") field(ONAM, "Enabled") field(OMSL, "supervisory") } ##### led_bit ###### record(bo, "$(DET):led_bit_w" ) { field(SCAN, "Passive") field(ZNAM, "Disabled") field(ONAM, "Enabled") field(OMSL, "supervisory") } ####### Read status ########################### record(longin, "$(DET):status_r") { field(SCAN, "Passive") field(INP, "$(DET)double:status_r CPP") } record( calc, "$(DET)double:status_r" ) { field(SCAN, "Passive") field(INPA, "$(P1):status_h_r CPP") field(INPB, "$(P2):status_h_r CPP") field(INPC, "$(P1):status_l_r CPP") field(INPD, "$(P2):status_l_r CPP") #field(CALC, "((C&0x80000000)>>31)|((A&0x00007fff)<<1)|(((D&0x80000000)>>1)|((B&0x7fff)<<17))<<16") field(CALC, "((C>>31)&0x1) | ((A<<1)&0xfffe) | (((D>>31)&0x1) | ((B<<1)&0xfffe))<<16") } ########################################### ####### Read start_mask ########################### record(longin, "$(DET):start_mask_r") { field(SCAN, "Passive") field(INP, "$(DET)double:start_mask_r CPP") } record( calc, "$(DET)double:start_mask_r" ) { field(SCAN, "Passive") field(INPA, "$(P1):start_mask_h_r CPP") field(INPB, "$(P2):start_mask_h_r CPP") field(INPC, "$(P1):start_mask_l_r CPP") field(INPD, "$(P2):start_mask_l_r CPP") #field(CALC, "((C&0x80000000)>>31)|((A&0x00007fff)<<1)|(((D&0x80000000)>>1)|((B&0x7fff)<<17))<<16") field(CALC, "((C>>31)&0x1) | ((A<<1)&0xfffe) | (((D>>31)&0x1) | ((B<<1)&0xfffe))<<16") } ########################################### ####### Read stop_mask ########################### record(longin, "$(DET):stop_mask_r") { field(SCAN, "Passive") field(INP, "$(DET)double:stop_mask_r CPP") } record( calc, "$(DET)double:stop_mask_r" ) { field(SCAN, "Passive") field(INPA, "$(P1):stop_mask_h_r CPP") field(INPB, "$(P2):stop_mask_h_r CPP") field(INPC, "$(P1):stop_mask_l_r CPP") field(INPD, "$(P2):stop_mask_l_r CPP") #field(CALC, "((C&0x80000000)>>31)|((A&0x00007fff)<<1)|(((D&0x80000000)>>1)|((B&0x7fff)<<17))<<16") field(CALC, "((C>>31)&0x1) | ((A<<1)&0xfffe) | (((D>>31)&0x1) | ((B<<1)&0xfffe))<<16") } ########################################### ####### Write start_mask ########################## record(longout, "$(DET):start_mask_w") { field(SCAN, "Passive") field(OUT, "$(DET)fanout:start_mask_w PP") } record(dfanout, "$(DET)fanout:start_mask_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "Mask") field(SELN, 0xf) # field(DOL, "$(DET):start_mask_w") field(OUTA, "$(P1)mask:start_mask_h_w PP") field(OUTB, "$(P2)mask:start_mask_h_w PP") field(OUTC, "$(P1)mask:start_mask_l_w PP") field(OUTD, "$(P2)mask:start_mask_l_w PP") } record( calcout, "$(P1)mask:start_mask_h_w" ) { field(SCAN, "Passive") field(CALC, "(VAL & 0xfffe)>>1") field(OUT, "$(P1):start_mask_h_w PP") } record( calcout, "$(P1)mask:start_mask_l_w" ) { field(SCAN, "Passive") field(CALC, "(VAL & 0x1)<<31") field(OUT, "$(P1):start_mask_l_w PP") } record( calcout, "$(P2)mask:start_mask_h_w" ) { field(SCAN, "Passive") field(CALC, "((VAL>>16) & 0xfffe)>>1") field(OUT, "$(P2):start_mask_h_w PP") } record( calcout, "$(P2)mask:start_mask_l_w" ) { field(SCAN, "Passive") field(CALC, "((VAL>>16) & 0x1)<<31") field(OUT, "$(P2):start_mask_l_w PP") } ########################################### ####### Write stop_mask ########################## record(longout, "$(DET):stop_mask_w") { field(SCAN, "Passive") field(OUT, "$(DET)fanout:stop_mask_w PP") } record(dfanout, "$(DET)fanout:stop_mask_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "Mask") field(SELN, 0xf) # field(DOL, "$(DET):stop_mask_w") field(OUTA, "$(P1)mask:stop_mask_h_w PP") field(OUTB, "$(P2)mask:stop_mask_h_w PP") field(OUTC, "$(P1)mask:stop_mask_l_w PP") field(OUTD, "$(P2)mask:stop_mask_l_w PP") } record( calcout, "$(P1)mask:stop_mask_h_w" ) { field(SCAN, "Passive") field(CALC, "(VAL & 0xfffe)>>1") field(OUT, "$(P1):stop_mask_h_w PP") } record( calcout, "$(P1)mask:stop_mask_l_w" ) { field(SCAN, "Passive") field(CALC, "(VAL & 0x1)<<31") field(OUT, "$(P1):stop_mask_l_w PP") } record( calcout, "$(P2)mask:stop_mask_h_w" ) { field(SCAN, "Passive") field(CALC, "((VAL>>16) & 0xfffe)>>1") field(OUT, "$(P2):stop_mask_h_w PP") } record( calcout, "$(P2)mask:stop_mask_l_w" ) { field(SCAN, "Passive") field(CALC, "((VAL>>16) & 0x1)<<31") field(OUT, "$(P2):stop_mask_l_w PP") } ########################################### ###### FANOUT rawfreq ########################## record(dfanout, "$(DET):all:rawfreq_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "Mask") field(SELN, 0xf) field(OUTA, "$(DET)fanout1:rawfreq_w PP") field(OUTB, "$(DET)fanout2:rawfreq_w PP") field(OUTC, "$(DET)fanout3:rawfreq_w PP") field(OUTD, "$(DET)fanout4:rawfreq_w PP") } record(dfanout, "$(DET)fanout1:rawfreq_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):1_rawfreq_w PP") field(OUTB, "$(DET):2_rawfreq_w PP") field(OUTC, "$(DET):3_rawfreq_w PP") field(OUTD, "$(DET):4_rawfreq_w PP") field(OUTE, "$(DET):5_rawfreq_w PP") field(OUTF, "$(DET):6_rawfreq_w PP") field(OUTG, "$(DET):7_rawfreq_w PP") field(OUTH, "$(DET):8_rawfreq_w PP") } record(dfanout, "$(DET)fanout2:rawfreq_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):9_rawfreq_w PP") field(OUTB, "$(DET):10_rawfreq_w PP") field(OUTC, "$(DET):11_rawfreq_w PP") field(OUTD, "$(DET):12_rawfreq_w PP") field(OUTE, "$(DET):13_rawfreq_w PP") field(OUTF, "$(DET):14_rawfreq_w PP") field(OUTG, "$(DET):15_rawfreq_w PP") field(OUTH, "$(DET):16_rawfreq_w PP") } record(dfanout, "$(DET)fanout3:rawfreq_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):17_rawfreq_w PP") field(OUTB, "$(DET):18_rawfreq_w PP") field(OUTC, "$(DET):19_rawfreq_w PP") field(OUTD, "$(DET):20_rawfreq_w PP") field(OUTE, "$(DET):21_rawfreq_w PP") field(OUTF, "$(DET):22_rawfreq_w PP") field(OUTG, "$(DET):23_rawfreq_w PP") field(OUTH, "$(DET):24_rawfreq_w PP") } record(dfanout, "$(DET)fanout4:rawfreq_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):25_rawfreq_w PP") field(OUTB, "$(DET):26_rawfreq_w PP") field(OUTC, "$(DET):27_rawfreq_w PP") field(OUTD, "$(DET):28_rawfreq_w PP") field(OUTE, "$(DET):29_rawfreq_w PP") field(OUTF, "$(DET):30_rawfreq_w PP") field(OUTG, "$(DET):31_rawfreq_w PP") field(OUTH, "$(DET):32_rawfreq_w PP") } ###### FANOUT rawwidth ########################## record(dfanout, "$(DET):all:rawwidth_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "Mask") field(SELN, 0xf) field(OUTA, "$(DET)fanout1:rawwidth_w PP") field(OUTB, "$(DET)fanout2:rawwidth_w PP") field(OUTC, "$(DET)fanout3:rawwidth_w PP") field(OUTD, "$(DET)fanout4:rawwidth_w PP") } record(dfanout, "$(DET)fanout1:rawwidth_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):1_rawwidth_w PP") field(OUTB, "$(DET):2_rawwidth_w PP") field(OUTC, "$(DET):3_rawwidth_w PP") field(OUTD, "$(DET):4_rawwidth_w PP") field(OUTE, "$(DET):5_rawwidth_w PP") field(OUTF, "$(DET):6_rawwidth_w PP") field(OUTG, "$(DET):7_rawwidth_w PP") field(OUTH, "$(DET):8_rawwidth_w PP") } record(dfanout, "$(DET)fanout2:rawwidth_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):9_rawwidth_w PP") field(OUTB, "$(DET):10_rawwidth_w PP") field(OUTC, "$(DET):11_rawwidth_w PP") field(OUTD, "$(DET):12_rawwidth_w PP") field(OUTE, "$(DET):13_rawwidth_w PP") field(OUTF, "$(DET):14_rawwidth_w PP") field(OUTG, "$(DET):15_rawwidth_w PP") field(OUTH, "$(DET):16_rawwidth_w PP") } record(dfanout, "$(DET)fanout3:rawwidth_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):17_rawwidth_w PP") field(OUTB, "$(DET):18_rawwidth_w PP") field(OUTC, "$(DET):19_rawwidth_w PP") field(OUTD, "$(DET):20_rawwidth_w PP") field(OUTE, "$(DET):21_rawwidth_w PP") field(OUTF, "$(DET):22_rawwidth_w PP") field(OUTG, "$(DET):23_rawwidth_w PP") field(OUTH, "$(DET):24_rawwidth_w PP") } record(dfanout, "$(DET)fanout4:rawwidth_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):25_rawwidth_w PP") field(OUTB, "$(DET):26_rawwidth_w PP") field(OUTC, "$(DET):27_rawwidth_w PP") field(OUTD, "$(DET):28_rawwidth_w PP") field(OUTE, "$(DET):29_rawwidth_w PP") field(OUTF, "$(DET):30_rawwidth_w PP") field(OUTG, "$(DET):31_rawwidth_w PP") field(OUTH, "$(DET):32_rawwidth_w PP") } ###### FANOUT rawnpulses ########################## record(dfanout, "$(DET):all:rawnpulses_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "Mask") field(SELN, 0xf) field(OUTA, "$(DET)fanout1:rawnpulses_w PP") field(OUTB, "$(DET)fanout2:rawnpulses_w PP") field(OUTC, "$(DET)fanout3:rawnpulses_w PP") field(OUTD, "$(DET)fanout4:rawnpulses_w PP") } record(dfanout, "$(DET)fanout1:rawnpulses_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):1_rawnpulses_w PP") field(OUTB, "$(DET):2_rawnpulses_w PP") field(OUTC, "$(DET):3_rawnpulses_w PP") field(OUTD, "$(DET):4_rawnpulses_w PP") field(OUTE, "$(DET):5_rawnpulses_w PP") field(OUTF, "$(DET):6_rawnpulses_w PP") field(OUTG, "$(DET):7_rawnpulses_w PP") field(OUTH, "$(DET):8_rawnpulses_w PP") } record(dfanout, "$(DET)fanout2:rawnpulses_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):9_rawnpulses_w PP") field(OUTB, "$(DET):10_rawnpulses_w PP") field(OUTC, "$(DET):11_rawnpulses_w PP") field(OUTD, "$(DET):12_rawnpulses_w PP") field(OUTE, "$(DET):13_rawnpulses_w PP") field(OUTF, "$(DET):14_rawnpulses_w PP") field(OUTG, "$(DET):15_rawnpulses_w PP") field(OUTH, "$(DET):16_rawnpulses_w PP") } record(dfanout, "$(DET)fanout3:rawnpulses_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):17_rawnpulses_w PP") field(OUTB, "$(DET):18_rawnpulses_w PP") field(OUTC, "$(DET):19_rawnpulses_w PP") field(OUTD, "$(DET):20_rawnpulses_w PP") field(OUTE, "$(DET):21_rawnpulses_w PP") field(OUTF, "$(DET):22_rawnpulses_w PP") field(OUTG, "$(DET):23_rawnpulses_w PP") field(OUTH, "$(DET):24_rawnpulses_w PP") } record(dfanout, "$(DET)fanout4:rawnpulses_w") { field(SCAN, "Passive") field(OMSL, "supervisory") field(SELM, "All") field(OUTA, "$(DET):25_rawnpulses_w PP") field(OUTB, "$(DET):26_rawnpulses_w PP") field(OUTC, "$(DET):27_rawnpulses_w PP") field(OUTD, "$(DET):28_rawnpulses_w PP") field(OUTE, "$(DET):29_rawnpulses_w PP") field(OUTF, "$(DET):30_rawnpulses_w PP") field(OUTG, "$(DET):31_rawnpulses_w PP") field(OUTH, "$(DET):32_rawnpulses_w PP") }