diff --git a/BP_scan_JF11.sh b/BP_scan_JF11.sh index e804ef6..590869c 100644 --- a/BP_scan_JF11.sh +++ b/BP_scan_JF11.sh @@ -15,7 +15,8 @@ # nc -k -n -v -l -p 5555 -e /bin/bash - +KILLRCV="killall ju_udp_receiver_3threads_2_0" +$KILLRCV if [ "$1" == "" ] || [ $# -gt 1 ]; then @@ -42,8 +43,8 @@ sls_detector_put highvoltage 0 # configure for receiver on mpc2012 sls_detector_put udp_dstport 32410 -sls_detector_put udp_dstip 10.1.4.105 -sls_detector_put udp_dstmac 3C:FD:FE:A2:14:D8 +sls_detector_put udp_dstip $DSTIP #10.1.4.105 +sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8 sls_detector_put udp_srcip 10.1.5.9 #wrong on purpose, so we send some packets to nowhere sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2 #sls_detector_put configuremac 0 @@ -52,16 +53,20 @@ sls_detector_put start # this puts the chip in a known state. packets to nowhe sls_detector_put stop -sls_detector_put udp_srcip 10.1.4.9 #now the right one. +sls_detector_put udp_srcip $SRCIP #10.1.4.9 #now the right one. sleep 3 if [ "$1" == 'HG0' ]; then sls_detector_put settings highgain0 +RCVON=$TKBPHG0 +echo $RCVON #sls_detector_put reg 0x58 0x00800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31; echo "HG0G1G2 mode" else sls_detector_put settings gain0 +RCVON=$TKBPG0 +echo $RCVON #sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31; echo "normal mode" fi @@ -94,6 +99,13 @@ echo $CLI" OUTP OFF " | nc pc8830 5555 sleep 0.2 +#remember to put High-Z load! +#Change load to Infinity +echo $CLI" OUTP:LOAD INF " | nc pc8830 5555 + +# Polarity normal +echo $CLI" OUTP:POL NORM" | nc pc8830 5555 + # pulse echo $CLI" FUNC PULS" | nc pc8830 5555 sleep 0.2 @@ -143,8 +155,9 @@ if [[ $input = "q" ]]; then exit 1 fi + # high voltage -sls_detector_put highvoltage 200 +#sls_detector_put highvoltage 200 #because it seemed more stable, we are using external HV 230V # output on echo $CLI" OUTP ON" | nc pc8830 5555 sleep 0.2 @@ -166,9 +179,7 @@ if [[ $input = "q" ]]; then fi - - - +$RCVON & # the scan for ivpulse in {10..1000..10} @@ -192,7 +203,7 @@ done # high voltage -sls_detector_put highvoltage 0 +#sls_detector_put highvoltage 0 # output off echo $CLI" OUTP OFF " | nc pc8830 5555 diff --git a/CS_scan.sh b/CS_scan.sh index b24b2f5..ac0d2e5 100644 --- a/CS_scan.sh +++ b/CS_scan.sh @@ -38,8 +38,14 @@ sls_detector_put readoutspeed half_speed #sls_detector_put dbitphase 125 sleep 3 -$TKCSG0 & +sls_detector_put frames 10000 +sls_detector_put start +sleep 70 +sls_detector_put stop +sls_detector_put frames 640 + +$TKCSG0 & sleep 3 echo "recording G0 pede" diff --git a/CS_scan_JF11.sh b/CS_scan_JF11.sh index f906299..2c4f26c 100644 --- a/CS_scan_JF11.sh +++ b/CS_scan_JF11.sh @@ -30,13 +30,13 @@ sleep 3 sls_detector_put frames 640 sls_detector_put period 0.005 sls_detector_put exptime 0.000010 -sls_detector_put highvoltage 90 +sls_detector_put highvoltage 200 # configure for receiver on mpc2012 sls_detector_put udp_dstport 32410 -sls_detector_put udp_dstip 10.1.4.105 -sls_detector_put udp_dstmac 3C:FD:FE:A2:14:D8 -sls_detector_put udp_srcip 10.1.4.9 +sls_detector_put udp_dstip $DSTIP #10.1.4.105 +sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8 +sls_detector_put udp_srcip $SRCIP #10.1.4.9 sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2 sls_detector_put readoutspeed 1 @@ -219,6 +219,7 @@ sls_detector_put exptime 0.000010 sls_detector_put period 0.002 sls_detector_put frames 1000000 sls_detector_put currentsource 0 +sls_detector_put highvoltage 0 echo "Script finished" - +sleep 4 $KILLRCV diff --git a/CuFluo_exposure.sh b/CuFluo_exposure.sh index 3ecfcc1..dad59e2 100644 --- a/CuFluo_exposure.sh +++ b/CuFluo_exposure.sh @@ -11,6 +11,8 @@ # - source pccalib.sh [pc] (mpc2012/pc-jungfrau-test) # - xray tube is on and ramped for 40 kV, 60 mA, set to Cu +shutter=2 + sls_detector_put stop #just in case sls_detector_put powerchip 1 @@ -46,7 +48,7 @@ $CLI HV on sls_detector_put clearbit 0x5d 0 -$CLI shutter 1 off +$CLI shutter $shutter off #$CLI shutter 1 off echo "warmin up the board" sls_detector_put frames 40000 sls_detector_put start @@ -87,12 +89,12 @@ $TKFG0 & sls_detector_put frames 220000 -$CLI shutter 1 on +$CLI shutter $shutter on #$CLI shutter 1 on sleep 1 sls_detector_put start sleep 450 # 200k frames at 500 frames per second takes 400s -$CLI shutter 1 off +$CLI shutter $shutter off #$CLI shutter 1 off $KILLRCV @@ -117,12 +119,12 @@ $TKFHG0 & sls_detector_put frames 220000 -$CLI shutter 1 on +$CLI shutter $shutter on #$CLI shutter 1 on sleep 1 sls_detector_put start sleep 450 # 200k frames at 500 frames per second takes 400s -$CLI shutter 1 off +$CLI shutter $shutter off #$CLI shutter 1 off $KILLRCV diff --git a/CuFluo_exposure_JF11.sh b/CuFluo_exposure_JF11.sh index ec66343..facca4c 100644 --- a/CuFluo_exposure_JF11.sh +++ b/CuFluo_exposure_JF11.sh @@ -9,6 +9,8 @@ # - detector is on # - xray tube is on and ramped for 40 kV, 60 mA, set to Cu +shutter=2 + sls_detector_put stop #just in case sls_detector_put powerchip 0 @@ -28,11 +30,12 @@ sls_detector_put highvoltage 200 # configure for receiver on mpc2012 sls_detector_put udp_dstport 32410 -sls_detector_put udp_dstip 10.1.4.105 -sls_detector_put udp_dstmac 3C:FD:FE:A2:14:D8 -sls_detector_put udp_srcip 10.1.4.9 +sls_detector_put udp_dstip $DSTIP #10.1.4.105 +sls_detector_put udp_dstmac $DSTMAC #3C:FD:FE:A2:14:D8 +sls_detector_put udp_srcip $SRCIP #10.1.4.9 sls_detector_put udp_srcmac 00:ab:be:cc:dd:e2 -sls_detector_put readoutspeed 1 + +sls_detector_put readoutspeed 1 KILLRCV="killall ju_udp_receiver_3threads_2_0" $KILLRCV @@ -57,7 +60,7 @@ $CLI setc 60 $CLI HV on -$CLI shutter 1 off +$CLI shutter $shutter off #$CLI shutter 1 off echo "warmin up the board" sls_detector_put frames 40000 sls_detector_put start @@ -102,12 +105,12 @@ $TKFG0 & sls_detector_put frames 220000 -$CLI shutter 1 on +$CLI shutter $shutter on #$CLI shutter 1 on sleep 1 sls_detector_put start sleep 450 # 200k frames at 500 frames per second takes 400s -$CLI shutter 1 off +$CLI shutter $shutter off #$CLI shutter 1 off $KILLRCV @@ -134,15 +137,17 @@ $TKFHG0 & sls_detector_put frames 220000 #220000 -$CLI shutter 1 on +$CLI shutter $shutter on #$CLI shutter 1 on sleep 1 sls_detector_put start sleep 450 # 200k frames at 500 frames per second takes 400s -$CLI shutter 1 off +$CLI shutter $shutter off #$CLI shutter 1 off $KILLRCV sls_detector_put settings gain0 #clearbit 0x5d 0 +sls_detector_put highvoltage 0 + echo "Script finished"