## Set addresses
##################################################
merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_trb3.db $USER_DIR/db/addresses_trb3.db
-#merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_trb3sc.db $USER_DIR/db/addresses_trb3sc.db
+merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_trb3sc.db $USER_DIR/db/addresses_trb3sc.db
merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_dirich.db $USER_DIR/db/addresses_dirich.db
merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_dirich_concentrator.db $USER_DIR/db/addresses_dirich_concentrator.db
merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_farich_concentrator.db $USER_DIR/db/addresses_farich_concentrator.db
merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_farich.db $USER_DIR/db/addresses_farich.db
+merge_serial_address.pl $DAQ_TOOLS_PATH/base/serials_dirich5s.db $USER_DIR/db/addresses_dirich5s.db
#echo "disable port 6 on hub 0x8841"
#trbcmd clearbit 0x8841 0xc0 0x40
#trbcmd clearbit 0x16f7 0xcd00 0x1
-
+#exit
# pulser to 100kHz and 50kHz
#trbcmd w 0xc840 0xa156 0x0000270f #10khz pulser 0
trbcmd w 0xc001 0xa158 0x0000270f #10khz pulser 0
+
+
#trbcmd w 0xc840 0xa150 0x000003e7 #100khz
#trbcmd w 0xc840 0xa150 0x0001869f #1khz
#trbcmd w 0xc840 0xa150 0x00001387 #20khz
# trigger on TDC channel 1
#trbcmd setbit 0x0810 0xcf00 0x1 #direct TDC input to CTS
#trbcmd setbit 0xc001 0xa14d 0x2 #select F5_COMM input
-#trbcmd setbit 0xc840 0xa101 0x200 #enable input at CTS
+#trbcmd setbit 0xc001 0xa101 0x200 #enable input from peripheral TDC to CTS as trigger input
# set correct timeout: off for channel 0, 1, 2sec for 2
trbcmd w 0xfffe 0xc5 0x50ff
echo "pulser"
# pulser #0 to 10 kHz
-trbcmd w 0xc001 0xa154 0x0000270f
+trbcmd w 0xc001 0xa158 0x0000270f
#trbcmd w 0xc001 0xa150 0x0022270f
echo "trigger type"
# set trigger type to 0x1
-trbcmd setbit 0xc001 0xa15c 0x10
+trbcmd setbit 0xc001 0xa15c 0x1
#trbcmd clearbit 0x1130 0xc801 0x80000000 # disable window