From: PANDA DIRDAQ Date: Fri, 11 Jul 2014 13:46:04 +0000 (+0200) Subject: current status, mt X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=3f25b98b7869257e37ffb858a5d2a4500e15612d;p=daqtools.git current status, mt --- diff --git a/base/addresses_trb3.db b/base/addresses_trb3.db index 4d2cf4d..965cacf 100644 --- a/base/addresses_trb3.db +++ b/base/addresses_trb3.db @@ -599,11 +599,11 @@ 0xc003 107 3 0x8000 107 5 -0xc000 108 0 -0xc001 108 1 -0xc002 108 2 -0xc003 108 3 -0x8000 108 5 +0x2110 108 0 +0x2111 108 1 +0x2112 108 2 +0x2113 108 3 +0x8021 108 5 #MCP 9 0x0910 109 0 diff --git a/users/gsi_dirc/EventBuilder.xml b/users/gsi_dirc/EventBuilder.xml index 6ef34b2..2b5bf1d 100644 --- a/users/gsi_dirc/EventBuilder.xml +++ b/users/gsi_dirc/EventBuilder.xml @@ -50,7 +50,7 @@ store data in lmd files. - + diff --git a/users/gsi_dirc/configure_trb3.sh b/users/gsi_dirc/configure_trb3.sh index e35f5c3..f3e6e84 100755 --- a/users/gsi_dirc/configure_trb3.sh +++ b/users/gsi_dirc/configure_trb3.sh @@ -1,111 +1,165 @@ -# CTS Board 0x8000 trb060 -trbcmd w 0x8000 0x8300 0x8000 # SubeventId -trbcmd w 0x8000 0x8301 0x00020001 # SubEventDecoding -trbcmd w 0x8000 0x8302 0x00030062 # Queue decoding -trbcmd w 0x8000 0x8303 0xea60 # max packet size -trbcmd w 0x8000 0x8304 0x0578 # max frame size -trbcmd w 0x8000 0x8305 0x1 # use GbE -trbcmd w 0x8000 0x8306 0x0 # use TRBnet to send data -trbcmd w 0x8000 0x8307 0x0 # Multi event queue size -trbcmd w 0x8000 0x8308 0xffffff # Trigger counter -trbcmd w 0x8000 0x830b 0x7 # ?? -trbcmd w 0x8000 0x830d 0x1 # enable readout bit + + +trbcmd w 0xff7f 0x8305 0x1 # use GbE +trbcmd w 0xff7f 0x8306 0x0 # use TRBnet to send data +trbcmd w 0xff7f 0x8308 0xffffff # Trigger counter + +#trbcmd w 0xff7f 0x830e 0x4 + + +# CTS Board 0x8000 trb056 02:00:be:de:1c:6f +trbcmd w 0x7999 0x8300 0x7999 # SubeventId +trbcmd w 0x7999 0x8301 0x00020001 # SubEventDecoding +trbcmd w 0x7999 0x8302 0x00030064 # Queue decoding +#trbcmd w 0x7999 0x8303 0xea60 # max packet size +trbcmd w 0x7999 0x8304 0x0578 # max frame size +trbcmd w 0x7999 0x8305 0x1 # use GbE +trbcmd w 0x7999 0x8306 0x0 # use TRBnet to send data +trbcmd w 0x7999 0x8307 0x0 # Multi event queue size +#trbcmd w 0x7999 0x8308 0xffffff # Trigger counter +trbcmd w 0x7999 0x8309 0x1 # RX-channel +trbcmd w 0x7999 0x830a 0x1 # include additional slow control header +trbcmd w 0x7999 0x830b 0x0 # include trigger type +#trbcmd w 0x7999 0x830d 0x1 # enable readout bit + + #mac address of the EB #kp1pc105 00:1b:21:43:97:ea -#dircdaq002 d4:ae:52:ba:16:a6 -trbcmd w 0x8000 0x8100 0x52ba16a6 # lower 4 bytes -trbcmd w 0x8000 0x8101 0xd4ae # upper two bytes - -trbcmd w 0x8000 0x8102 0xc0a80001 # destination IP-address: 192.168.0.2 -trbcmd w 0x8000 0x8103 0xc350 # destination port 50000 -trbcmd w 0x8000 0x8104 0xdead0110 # source MAC-address -trbcmd w 0x8000 0x8105 0x001b # source MAC: upper bytes -trbcmd w 0x8000 0x8106 0xc0a80138 # source IP trb056 -trbcmd w 0x8000 0x8107 0xc353 # source Port -trbcmd w 0x8000 0x8108 0x578 # MTU - - - -## Slave 1 0x8001 trb061 -#trbcmd w 0x8001 0x8300 0x8001 # SubeventId -#trbcmd w 0x8001 0x8301 0x00020001 # SubEventDecoding -#trbcmd w 0x8001 0x8302 0x00030062 # Queue decoding -#trbcmd w 0x8001 0x8303 0xea60 # max packet size -#trbcmd w 0x8001 0x8304 0x0578 # max frame size -#trbcmd w 0x8001 0x8305 0x1 # use GbE -#trbcmd w 0x8001 0x8306 0x0 # use TRBnet to send data -#trbcmd w 0x8001 0x8307 0x0 # Multi event queue size -#trbcmd w 0x8001 0x8308 0xffffff # Trigger counter -#trbcmd w 0x8001 0x830b 0x7 # ?? -#trbcmd w 0x8001 0x830d 0x1 # enable readout bit - -##mac address of the EB -##kp1pc105 00:1b:21:43:97:ea -#trbcmd w 0x8001 0x8100 0x214397ea # lower 4 bytes -#trbcmd w 0x8001 0x8101 0x001b # upper two bytes -# -#trbcmd w 0x8001 0x8102 0xc0a80001 # destination IP-address: 192.168.0.1 -#trbcmd w 0x8001 0x8103 0xc352 # destination port 50002 -# # port 50001 is for debug messages from GbE -#trbcmd w 0x8001 0x8104 0xdead0110 # source MAC-address -#trbcmd w 0x8001 0x8105 0x001b # source MAC: upper bytes -#trbcmd w 0x8001 0x8106 0xc0a8013d # source IP trb061 -#trbcmd w 0x8001 0x8107 0xc353 # source Port -#trbcmd w 0x8001 0x8108 0x578 # MTU -# - -## Slave 2 0x8002 trb062 -#trbcmd w 0x8002 0x8300 0x8002 # SubeventId -#trbcmd w 0x8002 0x8301 0x00020001 # SubEventDecoding -#trbcmd w 0x8002 0x8302 0x00030062 # Queue decoding -#trbcmd w 0x8002 0x8303 0xea60 # max packet size -#trbcmd w 0x8002 0x8304 0x0578 # max frame size -#trbcmd w 0x8002 0x8305 0x1 # use GbE -#trbcmd w 0x8002 0x8306 0x0 # use TRBnet to send data -#trbcmd w 0x8002 0x8307 0x0 # Multi event queue size -#trbcmd w 0x8002 0x8308 0xffffff # Trigger counter -#trbcmd w 0x8002 0x830b 0x7 # ?? -#trbcmd w 0x8002 0x830d 0x1 # enable readout bit - -##mac address of the EB -##kp1pc105 00:1b:21:43:97:ea -#trbcmd w 0x8002 0x8100 0x214397ea # lower 4 bytes -#trbcmd w 0x8002 0x8101 0x001b # upper two bytes -# -#trbcmd w 0x8002 0x8102 0xc0a80001 # destination IP-address: 192.168.0.1 -#trbcmd w 0x8002 0x8103 0xc353 # destination port 50003 -# # port 50001 is for debug messages from GbE -#trbcmd w 0x8002 0x8104 0xdead0110 # source MAC-address -#trbcmd w 0x8002 0x8105 0x001b # source MAC: upper bytes -#trbcmd w 0x8002 0x8106 0xc0a8013e # source IP trb062 -#trbcmd w 0x8002 0x8107 0xc353 # source Port -#trbcmd w 0x8002 0x8108 0x578 # MTU -# - -## Slave 3 0x8003 trb063 -#trbcmd w 0x8003 0x8300 0x8003 # SubeventId -#trbcmd w 0x8003 0x8301 0x00020001 # SubEventDecoding -#trbcmd w 0x8003 0x8302 0x00030062 # Queue decoding -#trbcmd w 0x8003 0x8303 0xea60 # max packet size -#trbcmd w 0x8003 0x8304 0x0578 # max frame size -#trbcmd w 0x8003 0x8305 0x1 # use GbE -#trbcmd w 0x8003 0x8306 0x0 # use TRBnet to send data -#trbcmd w 0x8003 0x8307 0x0 # Multi event queue size -#trbcmd w 0x8003 0x8308 0xffffff # Trigger counter -#trbcmd w 0x8003 0x830b 0x7 # ?? -#trbcmd w 0x8003 0x830d 0x1 # enable readout bit - -##mac address of the EB -##kp1pc105 00:1b:21:43:97:ea -#trbcmd w 0x8003 0x8100 0x214397ea # lower 4 bytes -#trbcmd w 0x8003 0x8101 0x001b # upper two bytes -# -#trbcmd w 0x8003 0x8102 0xc0a80001 # destination IP-address: 192.168.0.1 -#trbcmd w 0x8003 0x8103 0xc354 # destination port 50004 -# # port 50001 is for debug messages from GbE -#trbcmd w 0x8003 0x8104 0xdead0110 # source MAC-address -#trbcmd w 0x8003 0x8105 0x001b # source MAC: upper bytes -#trbcmd w 0x8003 0x8106 0xc0a8013f # source IP trb063 -#trbcmd w 0x8003 0x8107 0xc353 # source Port -#trbcmd w 0x8003 0x8108 0x578 # MTU +#dircdaq002 d4:ae:52:ba08/-:16:a6 +trbcmd w 0x7999 0x8100 0x52ba16a6 # lower 4 bytes +trbcmd w 0x7999 0x8101 0xd4ae # upper two bytes +trbcmd w 0x7999 0x8102 0xc0a80001 # destination IP-address: 192.168.0.1 +trbcmd w 0x7999 0x8103 0xc350 # destination port 50000 +trbcmd w 0x7999 0x8104 0xdead0000 # source MAC-address +trbcmd w 0x7999 0x8105 0x001b # source MAC: upper bytes +trbcmd w 0x7999 0x8106 0xc0a80138 # source IP trb056 +trbcmd w 0x7999 0x8107 0xc353 # source Port +#trbcmd w 0x7999 0x8108 0x578 # MTU + + +trbcmd w 0xff7f 0x8301 0x00020001 # SubEventDecoding +trbcmd w 0xff7f 0x8302 0x00030064 # Queue decoding +trbcmd w 0xff7f 0x8304 0x0578 # max frame size +trbcmd w 0xff7f 0x8305 0x1 # use GbE +trbcmd w 0xff7f 0x8306 0x0 # use TRBnet to send data +trbcmd w 0xff7f 0x8307 0x0 # Multi event queue size +trbcmd w 0xff7f 0x8309 0x1 # RX-channel +trbcmd w 0xff7f 0x830a 0x1 # include additional slow control header +trbcmd w 0xff7f 0x830b 0x0 # include trigger type + +trbcmd w 0xff7f 0x8100 0x52ba16a6 # lower 4 bytes +trbcmd w 0xff7f 0x8101 0xd4ae # upper two bytes +trbcmd w 0xff7f 0x8102 0xc0a80001 # destination IP-address: 192.168.0.1 +trbcmd w 0xff7f 0x8103 0xc350 # destination port 50000 +trbcmd w 0xff7f 0x8104 0xdead0110 # source MAC-address +trbcmd w 0xff7f 0x8105 0x001b # source MAC: upper bytes +trbcmd w 0xff7f 0x8106 0xc0a80138 # source IP trb056 +trbcmd w 0xff7f 0x8107 0xc353 # source Port + + +trbcmd w 0x7999 0x8300 0x7999 # SubeventId + +trbcmd w 0x8000 0x8300 0x8000 # SubeventId +trbcmd w 0x8001 0x8300 0x8001 +trbcmd w 0x8002 0x8300 0x8002 +trbcmd w 0x8003 0x8300 0x8003 +trbcmd w 0x8004 0x8300 0x8004 +trbcmd w 0x8005 0x8300 0x8005 +trbcmd w 0x8006 0x8300 0x8006 +trbcmd w 0x8007 0x8300 0x8007 +trbcmd w 0x8008 0x8300 0x8008 +trbcmd w 0x8009 0x8300 0x8009 +trbcmd w 0x8010 0x8300 0x8010 +trbcmd w 0x8011 0x8300 0x8011 +trbcmd w 0x8012 0x8300 0x8012 +trbcmd w 0x8013 0x8300 0x8013 +trbcmd w 0x8014 0x8300 0x8014 +trbcmd w 0x8015 0x8300 0x8015 +trbcmd w 0x8016 0x8300 0x8016 +trbcmd w 0x8017 0x8300 0x8017 +trbcmd w 0x8018 0x8300 0x8018 +trbcmd w 0x8019 0x8300 0x8019 +trbcmd w 0x8020 0x8300 0x8020 +trbcmd w 0x8021 0x8300 0x8021 +#trbcmd w 0x8022 0x8300 0x8022 + + +trbcmd w 0x7999 0x8103 0xc350 # destination port 50000 + +trbcmd w 0x8000 0x8103 0xc351 +trbcmd w 0x8001 0x8103 0xc352 +trbcmd w 0x8002 0x8103 0xc353 +trbcmd w 0x8003 0x8103 0xc354 +trbcmd w 0x8004 0x8103 0xc355 +trbcmd w 0x8005 0x8103 0xc356 +trbcmd w 0x8006 0x8103 0xc357 +trbcmd w 0x8007 0x8103 0xc358 +trbcmd w 0x8008 0x8103 0xc359 +trbcmd w 0x8009 0x8103 0xc35a +trbcmd w 0x8010 0x8103 0xc35b +trbcmd w 0x8011 0x8103 0xc35c +trbcmd w 0x8012 0x8103 0xc35d +trbcmd w 0x8013 0x8103 0xc35e +trbcmd w 0x8014 0x8103 0xc35f +trbcmd w 0x8015 0x8103 0xc360 +trbcmd w 0x8016 0x8103 0xc361 +trbcmd w 0x8017 0x8103 0xc362 +trbcmd w 0x8018 0x8103 0xc363 +trbcmd w 0x8019 0x8103 0xc364 +trbcmd w 0x8020 0x8103 0xc365 +trbcmd w 0x8021 0x8103 0xc366 +#trbcmd w 0x8022 0x8103 0xc367 + +# source mac +trbcmd w 0x8000 0x8104 0xdead0001 +trbcmd w 0x8001 0x8104 0xdead0002 +trbcmd w 0x8002 0x8104 0xdead0003 +trbcmd w 0x8003 0x8104 0xdead0004 +trbcmd w 0x8004 0x8104 0xdead0005 +trbcmd w 0x8005 0x8104 0xdead0006 +trbcmd w 0x8006 0x8104 0xdead0007 +trbcmd w 0x8007 0x8104 0xdead0008 +trbcmd w 0x8008 0x8104 0xdead0009 +trbcmd w 0x8009 0x8104 0xdead000a +trbcmd w 0x8010 0x8104 0xdead000b +trbcmd w 0x8011 0x8104 0xdead000c +trbcmd w 0x8012 0x8104 0xdead000d +trbcmd w 0x8013 0x8104 0xdead000e +trbcmd w 0x8014 0x8104 0xdead000f +trbcmd w 0x8015 0x8104 0xdead0010 +trbcmd w 0x8016 0x8104 0xdead0011 +trbcmd w 0x8017 0x8104 0xdead0012 +trbcmd w 0x8018 0x8104 0xdead0013 +trbcmd w 0x8019 0x8104 0xdead0014 +trbcmd w 0x8020 0x8104 0xdead0015 +trbcmd w 0x8021 0x8104 0xdead0016 +#trbcmd w 0x8022 0x8104 0xdead0017 + +# source IP +trbcmd w 0x8000 0x8106 0xc0a80000 +trbcmd w 0x8001 0x8106 0xc0a80001 +trbcmd w 0x8002 0x8106 0xc0a80002 +trbcmd w 0x8003 0x8106 0xc0a80003 +trbcmd w 0x8004 0x8106 0xc0a80004 +trbcmd w 0x8005 0x8106 0xc0a80005 +trbcmd w 0x8006 0x8106 0xc0a80006 +trbcmd w 0x8007 0x8106 0xc0a80007 +trbcmd w 0x8008 0x8106 0xc0a80008 +trbcmd w 0x8009 0x8106 0xc0a80009 +trbcmd w 0x8010 0x8106 0xc0a8000a +trbcmd w 0x8011 0x8106 0xc0a8000b +trbcmd w 0x8012 0x8106 0xc0a8000c +trbcmd w 0x8013 0x8106 0xc0a8000d +trbcmd w 0x8014 0x8106 0xc0a8000e +trbcmd w 0x8015 0x8106 0xc0a8000f +trbcmd w 0x8016 0x8106 0xc0a80010 +trbcmd w 0x8017 0x8106 0xc0a80011 +trbcmd w 0x8018 0x8106 0xc0a80012 +trbcmd w 0x8019 0x8106 0xc0a80013 +trbcmd w 0x8020 0x8106 0xc0a80014 +trbcmd w 0x8021 0x8106 0xc0a80015 +#trbcmd w 0x8022 0x8106 0xc0a80016 + + + diff --git a/users/gsi_dirc/start_readout.pl b/users/gsi_dirc/start_readout.pl index b016ceb..db52797 100755 --- a/users/gsi_dirc/start_readout.pl +++ b/users/gsi_dirc/start_readout.pl @@ -37,13 +37,17 @@ $c=qq|pkill -f "daq_evtbuild -S $label"|; qx($c); # if any, kill existing daq_ev $c=qq|pkill -f "daq_netmem -S $label"|; qx($c); # if any, kill existing daq_netmem -$c=qq|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -S $label -m 1 -d file -o $dataPath'|; +$c=qq|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -S $label -m 22 -x cc -d file -o $dataPath'|; +#$c=qq|xterm -geometry 122x14-0+0 -e bash -c 'daq_evtbuild -S $label -m 1 -d file -o $dataPath'|; print $c; system("$c &"); sleep 1; -$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 1 -i UDP:127.0.0.1:50000'"; +#$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 1 -i UDP:127.0.0.1:50000 '"; +$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 22 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50001 -i UDP:127.0.0.1:50002 -i UDP:127.0.0.1:50003 -i UDP:127.0.0.1:50004 -i UDP:127.0.0.1:50005 -i UDP:127.0.0.1:50006 -i UDP:127.0.0.1:50007 -i UDP:127.0.0.1:50008 -i UDP:127.0.0.1:50009 -i UDP:127.0.0.1:50010 -i UDP:127.0.0.1:50011 -i UDP:127.0.0.1:50012 -i UDP:127.0.0.1:50013 -i UDP:127.0.0.1:50014 -i UDP:127.0.0.1:50015 -i UDP:127.0.0.1:50016 -i UDP:127.0.0.1:50017 -i UDP:127.0.0.1:50018 -i UDP:127.0.0.1:50019 -i UDP:127.0.0.1:50020 -i UDP:127.0.0.1:50021 + '"; +#$c=qq"xterm -geometry 82x17-0+210 -e bash -c 'daq_netmem -S $label -m 2 -i UDP:127.0.0.1:50000 -i UDP:127.0.0.1:50002'"; system("$c &"); print "Saving data to $dataPath\n"; diff --git a/users/gsi_dirc/startup.sh b/users/gsi_dirc/startup.sh index 596aaa8..12852ac 100755 --- a/users/gsi_dirc/startup.sh +++ b/users/gsi_dirc/startup.sh @@ -10,25 +10,27 @@ export TRBNETDPID=$(pgrep trbnetd) echo "trbnetd pid: $TRBNETDPID" if [[ -z "$TRBNETDPID" ]] -then - ~/trbsoft/trbnettools/binlocal/trbnetd -i 56 +then + ~/bin/trbnetd -i 56 + #~/trbsoft/trbnettools/binlocal/trbnetd -i 56 fi #export TRB3_SERVER=trb056 export DAQOPSERVER=localhost:56 -trbcmd i 0xffff +echo -n "number of trb endpoints in the system: " +trbcmd i 0xffff | wc -l ################################################## -## Set addresses +## System Reset ################################################## -./merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/daqtools/base/addresses_trb3.db > /dev/null +#trbcmd reset ################################################## -## System Reset +## Set addresses ################################################## -trbcmd reset +./merge_serial_address.pl ~/trbsoft/daqtools/base/serials_trb3.db ~/trbsoft/daqtools/base/addresses_trb3.db > /dev/null ################################################## ## Configure GbE for DAQ @@ -38,10 +40,14 @@ trbcmd reset ################################################## ## Configure TDCs ################################################## -trbcmd setbit 0xfe48 0xc800 0x00001000 ## Triggerless mode -#trbcmd clearbit 0xfe48 0xc800 0x00001000 ## Triggered mode +trbcmd w 0xfe48 0xc800 0x00000001 ## logic analyser control register +trbcmd w 0xfe48 0xc801 0x000f0005 ## trigger window enable & trigger window width + +#trbcmd w 0xfe48 0xc800 0x00002000 ## Triggered mode +#trbcmd w 0xfe48 0xc800 0x00003000 ## Triggerless mode -trbcmd w 0xfe48 0xc801 0x000f0005 ## trigger window enable & trigger window width +#trbcmd w 0xfe48 0xc801 0x000f0005 ## trigger window enable & trigger window width +trbcmd w 0xfe48 0xc801 0x80620062 ## triggerwindow +/-490ns ;5ns granularity trbcmd w 0xfe48 0xc802 0x00000000 ## channel 01-32 enable trbcmd w 0xfe48 0xc803 0x00000000 ## channel 33-64 enable trbcmd w 0xfe48 0xc804 0x00000080 ## data transfer limit @@ -52,12 +58,294 @@ trbcmd w 0xfe48 0xc804 0x00000080 ## data transfer limit # Reset trigger logic - only a workaround for a bug #trbcmd w 0xffff 0x20 0x33 +echo -n "padiwas: inverting padiwa outputs: "; +perl -e \ +' +use Parallel::ForkManager; + +@padiwas = qw(0x010 0x011 0x012 0x013 0x110 0x111 0x112 0x113 0x210 0x211 0x212 0x213 0x310 0x311 0x312 0x313 0x410 0x411 0x412 0x413 0x510 0x511 0x512 0x513 0x610 0x611 0x612 0x613 0x710 0x711 0x712 0x713 0x810 0x811 0x812 0x813 0x910 0x911 0x912 0x913 0x1010 0x1011 0x1012 0x1013 0x1110 0x1111 0x1112 0x1113 0x1210 0x1211 0x1212 0x1213 0x1310 0x1311 0x1312 0x1313 0x1410 0x1411 0x1412 0x1413); + +my $MAX_PROCESSES = 100; +my $pm = Parallel::ForkManager->new($MAX_PROCESSES); + +foreach (@padiwas) { + my $pid = $pm->start and next; + print "$_ "; + $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 invert 0xffff >/dev/null"; + qx($c); die "could not execute command $c" if $?; + $pm->finish; # Terminates the child process +}; +$pm->wait_all_children; +print "\n"; + +print "padiwas: turn off all leds: "; +foreach (@padiwas) { + my $pid = $pm->start and next; + print "$_ "; + $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 led 0x10 >/dev/null"; + qx($c); die "could not execute command $c" if $?; + $pm->finish; # Terminates the child process +}; +$pm->wait_all_children; + +print " done\n"; +' + +#beam counter TRB 15 - no PADIWAs (yet) + +# enable used channels + +trbcmd w 0xfe48 0xc802 0x00000000 +trbcmd w 0xfe48 0xc803 0x00000000 + +echo "turn on/off TDC-channels" +# (MCP# * 100 ) + 10 + 0...3 +trbcmd w 0x0010 0xc802 0xffffffff +trbcmd w 0x0010 0xc803 0x00000000 +trbcmd w 0x0011 0xc802 0xffffffff +trbcmd w 0x0011 0xc803 0x00000000 +trbcmd w 0x0012 0xc802 0xffffffff +trbcmd w 0x0012 0xc803 0x00000000 +trbcmd w 0x0013 0xc802 0xffffffff +trbcmd w 0x0013 0xc803 0x00000000 + +trbcmd w 0x0110 0xc802 0xffffffff +trbcmd w 0x0110 0xc803 0x00000000 +trbcmd w 0x0111 0xc802 0xffffffff +trbcmd w 0x0111 0xc803 0x00000000 +trbcmd w 0x0112 0xc802 0xffffffff +trbcmd w 0x0112 0xc803 0x00000000 +trbcmd w 0x0113 0xc802 0xffffffff +trbcmd w 0x0113 0xc803 0x00000000 + +trbcmd w 0x0210 0xc802 0xffffffff +trbcmd w 0x0210 0xc803 0x00000000 +trbcmd w 0x0211 0xc802 0xffffffff +trbcmd w 0x0211 0xc803 0x00000000 +trbcmd w 0x0212 0xc802 0xffffffff +trbcmd w 0x0212 0xc803 0x00000000 +trbcmd w 0x0213 0xc802 0xffffffff +trbcmd w 0x0213 0xc803 0x00000000 + +trbcmd w 0x0310 0xc802 0xffffffff +trbcmd w 0x0310 0xc803 0x00000000 +trbcmd w 0x0311 0xc802 0xffffffff +trbcmd w 0x0311 0xc803 0x00000000 +trbcmd w 0x0312 0xc802 0xffffffff +trbcmd w 0x0312 0xc803 0x00000000 +trbcmd w 0x0313 0xc802 0xffffffff +trbcmd w 0x0313 0xc803 0x00000000 + +trbcmd w 0x0410 0xc802 0xffffffff +trbcmd w 0x0410 0xc803 0x00000000 +trbcmd w 0x0411 0xc802 0xffffffff +trbcmd w 0x0411 0xc803 0x00000000 +trbcmd w 0x0412 0xc802 0xffffffff +trbcmd w 0x0412 0xc803 0x00000000 +trbcmd w 0x0413 0xc802 0xffffffff +trbcmd w 0x0413 0xc803 0x00000000 + +trbcmd w 0x0510 0xc802 0xffffffff +trbcmd w 0x0510 0xc803 0x00000000 +trbcmd w 0x0511 0xc802 0xffffffff +trbcmd w 0x0511 0xc803 0x00000000 +trbcmd w 0x0512 0xc802 0xffffffff +trbcmd w 0x0512 0xc803 0x00000000 +trbcmd w 0x0513 0xc802 0xffffffff +trbcmd w 0x0513 0xc803 0x00000000 + +trbcmd w 0x0610 0xc802 0xffffffff +trbcmd w 0x0610 0xc803 0x00000000 +trbcmd w 0x0611 0xc802 0xffffffff +trbcmd w 0x0611 0xc803 0x00000000 +trbcmd w 0x0612 0xc802 0xffffffff +trbcmd w 0x0612 0xc803 0x00000000 +trbcmd w 0x0613 0xc802 0xffffffff +trbcmd w 0x0613 0xc803 0x00000000 + +trbcmd w 0x0710 0xc802 0xffffffff +trbcmd w 0x0710 0xc803 0x00000000 +trbcmd w 0x0711 0xc802 0xffffffff +trbcmd w 0x0711 0xc803 0x00000000 +trbcmd w 0x0712 0xc802 0xffffffff +trbcmd w 0x0712 0xc803 0x00000000 +trbcmd w 0x0713 0xc802 0xffffffff +trbcmd w 0x0713 0xc803 0x00000000 + +trbcmd w 0x0810 0xc802 0xffffffff +trbcmd w 0x0810 0xc803 0x00000000 +trbcmd w 0x0811 0xc802 0xffffffff +trbcmd w 0x0811 0xc803 0x00000000 +trbcmd w 0x0812 0xc802 0xffffffff +trbcmd w 0x0812 0xc803 0x00000000 +trbcmd w 0x0813 0xc802 0xffffffff +trbcmd w 0x0813 0xc803 0x00000000 + +trbcmd w 0x0910 0xc802 0xffffffff +trbcmd w 0x0910 0xc803 0x00000000 +trbcmd w 0x0911 0xc802 0xffffffff +trbcmd w 0x0911 0xc803 0x00000000 +trbcmd w 0x0912 0xc802 0xffffffff +trbcmd w 0x0912 0xc803 0x00000000 +trbcmd w 0x0913 0xc802 0xffffffff +trbcmd w 0x0913 0xc803 0x00000000 + +trbcmd w 0x1010 0xc802 0xffffffff +trbcmd w 0x1010 0xc803 0x00000000 +trbcmd w 0x1011 0xc802 0xffffffff +trbcmd w 0x1011 0xc803 0x00000000 +trbcmd w 0x1012 0xc802 0xffffffff +trbcmd w 0x1012 0xc803 0x00000000 +trbcmd w 0x1013 0xc802 0xffffffff +trbcmd w 0x1013 0xc803 0x00000000 + +trbcmd w 0x1110 0xc802 0xffffffff +trbcmd w 0x1110 0xc803 0x00000000 +trbcmd w 0x1111 0xc802 0xffffffff +trbcmd w 0x1111 0xc803 0x00000000 +trbcmd w 0x1112 0xc802 0xffffffff +trbcmd w 0x1112 0xc803 0x00000000 +trbcmd w 0x1113 0xc802 0xffffffff +trbcmd w 0x1113 0xc803 0x00000000 + +trbcmd w 0x1210 0xc802 0xffffffff +trbcmd w 0x1210 0xc803 0x00000000 +trbcmd w 0x1211 0xc802 0xffffffff +trbcmd w 0x1211 0xc803 0x00000000 +trbcmd w 0x1212 0xc802 0xffffffff +trbcmd w 0x1212 0xc803 0x00000000 +trbcmd w 0x1213 0xc802 0xffffffff +trbcmd w 0x1213 0xc803 0x00000000 + +trbcmd w 0x1310 0xc802 0xffffffff +trbcmd w 0x1310 0xc803 0x00000000 +trbcmd w 0x1311 0xc802 0xffffffff +trbcmd w 0x1311 0xc803 0x00000000 +trbcmd w 0x1312 0xc802 0xffffffff +trbcmd w 0x1312 0xc803 0x00000000 +trbcmd w 0x1313 0xc802 0xffffffff +trbcmd w 0x1313 0xc803 0x00000000 + +trbcmd w 0x1410 0xc802 0xffffffff +trbcmd w 0x1410 0xc803 0x00000000 +trbcmd w 0x1411 0xc802 0xffffffff +trbcmd w 0x1411 0xc803 0x00000000 +trbcmd w 0x1412 0xc802 0xffffffff +trbcmd w 0x1412 0xc803 0x00000000 +trbcmd w 0x1413 0xc802 0xffffffff +trbcmd w 0x1413 0xc803 0x00000000 + +trbcmd w 0x1510 0xc802 0xffffffff +trbcmd w 0x1510 0xc803 0x00000000 +trbcmd w 0x1511 0xc802 0xffffffff +trbcmd w 0x1511 0xc803 0x00000000 +trbcmd w 0x1512 0xc802 0x00000000 +trbcmd w 0x1512 0xc803 0x00000000 +trbcmd w 0x1513 0xc802 0x00000000 +trbcmd w 0x1513 0xc803 0x00000000 + +#for now: disable TDC for both SciFis + +trbcmd w 0x1610 0xc802 0x00000000 +trbcmd w 0x1610 0xc803 0x00000000 +trbcmd w 0x1611 0xc802 0x00000000 +trbcmd w 0x1611 0xc803 0x00000000 +trbcmd w 0x1612 0xc802 0x00000000 +trbcmd w 0x1612 0xc803 0x00000000 +trbcmd w 0x1613 0xc802 0x00000000 +trbcmd w 0x1613 0xc803 0x00000000 + +trbcmd w 0x2110 0xc802 0x00000000 +trbcmd w 0x2110 0xc803 0x00000000 +trbcmd w 0x2111 0xc802 0x00000000 +trbcmd w 0x2111 0xc803 0x00000000 +trbcmd w 0x2112 0xc802 0x00000000 +trbcmd w 0x2112 0xc803 0x00000000 +trbcmd w 0x2113 0xc802 0x00000000 +trbcmd w 0x2113 0xc803 0x00000000 + +# single pixels from MCP-TOF Sensor 1341 10um downstream +trbcmd w 0x1710 0xc802 0xffffffff +trbcmd w 0x1710 0xc803 0x00000000 +trbcmd w 0x1711 0xc802 0xffffffff +trbcmd w 0x1711 0xc803 0x00000000 +trbcmd w 0x1712 0xc802 0xffffffff +trbcmd w 0x1712 0xc803 0x00000000 +trbcmd w 0x1713 0xc802 0xffffffff +trbcmd w 0x1713 0xc803 0x00000000 + +# single pixels from MCP-TOF Sensor 1340 25um upstream +trbcmd w 0x1910 0xc802 0xffffffff +trbcmd w 0x1910 0xc803 0x00000000 +trbcmd w 0x1911 0xc802 0xffffffff +trbcmd w 0x1911 0xc803 0x00000000 +trbcmd w 0x1912 0xc802 0xffffffff +trbcmd w 0x1912 0xc803 0x00000000 +trbcmd w 0x1913 0xc802 0xffffffff +trbcmd w 0x1913 0xc803 0x00000000 + +# only 2 MCP-Out chan on first TDC 1810 chan1(1,2) and chan3(5,6) #2,6 = leading edge +trbcmd w 0x1810 0xc802 0x00000033 +trbcmd w 0x1810 0xc803 0x00000000 +trbcmd w 0x1811 0xc802 0x00000000 +trbcmd w 0x1811 0xc803 0x00000000 +trbcmd w 0x1812 0xc802 0x00000000 +trbcmd w 0x1812 0xc803 0x00000000 +trbcmd w 0x1813 0xc802 0x00000000 +trbcmd w 0x1813 0xc803 0x00000000 + +# only 1 MCP-Out chan on first TDC 2010 chan1 (1,2) 2=leading edge +trbcmd w 0x2010 0xc802 0x00000003 +trbcmd w 0x2010 0xc803 0x00000000 +trbcmd w 0x2011 0xc802 0x00000000 +trbcmd w 0x2011 0xc803 0x00000000 +trbcmd w 0x2012 0xc802 0x00000000 +trbcmd w 0x2012 0xc803 0x00000000 +trbcmd w 0x2013 0xc802 0x00000000 +trbcmd w 0x2013 0xc803 0x00000000 + + +# disable all channels +#trbcmd w 0xfe48 0xc802 0x00000000 +#trbcmd w 0xfe48 0xc803 0x00000000 + + # timeouts trbcmd w 0xfffe 0xc5 0x800050ff # pulser #1 to 1k Hz -trbcmd w 0x8000 0xa140 0x0001869f +#trbcmd w 0x8000 0xa140 0x0001869f # pulser enable -trbcmd setbit 0x8000 0xa101 0x2 +#trbcmd setbit 0x8000 0xa101 0x2 #trbcmd clearbit 0x8000 0xa101 0x3 + +# divert TDC inputs to the CTS for trigger +trbcmd setbit 0xfe48 0xcf00 0x1 + +# trigger rate 150Hz +trbcmd w 0x7999 0xa150 0x100000 + +#trbcmd setbit 0x8000 0xa1d4 0x10000 ## ??? + +# set proto MCP 0-14 thresholds +echo "loading proto MCP-PMT 0-14 thresholds..." +cd ~/trbsoft/daqtools/thresholds/ +./load_thresh.sh + +#set MCPTOF thresholds +echo "loading proto MCP-TOF thresholds..." +cd ~/trbsoft/daqtools/thresholds/ +./write_thresholds.pl MCPTOF_all_thresholds_zero.log -o 0 >> /dev/null +./write_thresholds.pl MCPTOF_all_thresholds_zero.log -o 1500 >> /dev/null # =75mV after amp + + +#8103 3 +#trbcmd clearbit 0x7999 0xc0 0x7 +#trbcmd clearbit 0x7999 0xc1 0x7 +#trbcmd clearbit 0x7999 0xc3 0x7 + +#trbcmd clearbit 0x8103 0xc0 0xf6 +#trbcmd clearbit 0x8103 0xc1 0xf6 +#trbcmd clearbit 0x8103 0xc3 0xf6 +echo "ready to go" diff --git a/web/CtsConfig.pm b/web/CtsConfig.pm index 5863cc4..82f32aa 100644 --- a/web/CtsConfig.pm +++ b/web/CtsConfig.pm @@ -2,7 +2,7 @@ package CtsConfig; #default cts endpoint. can be overriden by a command line parameter sub getDefaultEndpoint { - return 0x8000; + return 0x7999; } 1; diff --git a/web/htdocs/tdc/tdc.htm b/web/htdocs/tdc/tdc.htm index bb7ffb1..09779f3 100644 --- a/web/htdocs/tdc/tdc.htm +++ b/web/htdocs/tdc/tdc.htm @@ -23,7 +23,7 @@ Split Table - + Differences @@ -50,7 +50,7 @@ var updaterate2= document.getElementById("form_rate2").value; var filter = document.getElementById("form_filter").value; var board = document.getElementById("form_board").value; var channels = document.getElementById("form_channels").value; -var split = document.getElementById("form_split").checked?"-2":""; +var split = document.getElementById("form_split").checked?"-4":""; var differences= document.getElementById("form_diff").checked; var showstatus = document.getElementById("form_status").checked; var showenable = document.getElementById("form_enable").checked; @@ -167,7 +167,7 @@ function setValues() { updaterate2= document.getElementById("form_rate2").value; board = document.getElementById("form_board").value; filter = document.getElementById("form_filter").value; - split = document.getElementById("form_split").checked?"-2":""; + split = document.getElementById("form_split").checked?"-4":""; differences= document.getElementById("form_diff").checked; showstatus = document.getElementById("form_status").checked; channels = document.getElementById("form_channels").value;