Adapt shell scripts with new versions of commands

This commit is contained in:
2021-10-13 14:07:59 +02:00
parent f12cb7ecd8
commit aabbaa557e
7 changed files with 95 additions and 96 deletions

View File

@ -26,7 +26,7 @@ sls_detector_put powerchip 1
sls_detector_put delay 0
sls_detector_put cycles 1
sls_detector_put triggers 1
sls_detector_put frames 100
sls_detector_put period 0.005
sls_detector_put exptime 0.000040
@ -34,13 +34,13 @@ sls_detector_put highvoltage 0
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.4.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.4.9
sls_detector_put detectormac 00:ab:be:cc:dd:e2
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_srcmac 00:ab:be:cc:dd:e2
#sls_detector_put configuremac 0
sls_detector_put speed 1
sls_detector_put readoutspeed 1
CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay

View File

@ -2,6 +2,7 @@
# to run do: bash BP_scan.sh 0/1
# arg 1 specify if normal or HG0G1G2 setting
# 1.1 needs file in the blackfin
# prerequisites:
# - setup_env.sh souced
@ -25,7 +26,7 @@ fi
sls_detector_put stop;
sls_detector_put powerchip 0
sleep 3
sls_detector_put setbit 0x5d 7
#sls_detector_put setbit 0x5d 7
sls_detector_put powerchip 1
CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
@ -33,47 +34,47 @@ CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minid
#sls_detector_put setbit 0x5d 0
sls_detector_put delay 0
sls_detector_put cycles 1
sls_detector_put triggers 1
sls_detector_put frames 100
sls_detector_put period 0.005
sls_detector_put exptime 0.000040
sls_detector_put highvoltage 0
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.4.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.5.9 #wrong on purpose, so we send some packets to nowhere
sls_detector_put detectormac 00:ab:be:cc:dd:e2
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.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
sls_detector_put speed 1
sls_detector_put readoutspeed 1
sls_detector_put start # this puts the chip in a known state. packets to nowhere
sls_detector_put stop
sls_detector_put detectorip 10.1.4.9 #now the right one.
sls_detector_put udp_srcip 10.1.4.9 #now the right one.
sleep 3
if [ "$1" == 'HG0' ]; then
sls_detector_put setbit 0x5d 0
sls_detector_put reg 0x58 0x00800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
sls_detector_put settings highgain0
#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 clearbit 0x5d 0
sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
sls_detector_put settings gain0
#sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
echo "normal mode"
fi
sls_detector_put reg 0x7f 0xff1f
sls_detector_put reg 0x59 0x1110
#sls_detector_put reg 0x59 0x1110
sleep 1
#sls_detector_put reg 0x5b 0xffffffff
#sls_detector_put reg 0x5a 0xffffffff
sleep 1
sls_detector_put setbit 0x58 30 ; sleep 1 ;sls_detector_put clearbit 0x58 30;
#sls_detector_put setbit 0x58 30 ; sleep 1 ;sls_detector_put clearbit 0x58 30;
sleep 1
@ -140,7 +141,7 @@ if [[ $input = "q" ]]; then
fi
# high voltage
sls_detector_put vhighvoltage 200
sls_detector_put highvoltage 200
# output on
echo $CLI" OUTP ON" | nc pc8830 5555
sleep 0.2
@ -188,7 +189,7 @@ done
# high voltage
sls_detector_put vhighvoltage 0
sls_detector_put highvoltage 0
# output off
echo $CLI" OUTP OFF " | nc pc8830 5555

Binary file not shown.

View File

@ -25,14 +25,16 @@ sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.4.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.4.9
sls_detector_put detectormac 00:ab:be:cc:dd:e2
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_srcmac 00:ab:be:cc:dd:e2
sls_detector_put readoutspeed 1
sleep 3
$TKCSG0 &
# $TKCSG0 &
sleep 3
@ -42,25 +44,25 @@ sleep 4
echo "recording G1 pede"
sls_detector_put setbit 0x5d 12
sls_detector_put gainmode forceswitchg1
sls_detector_put start
sleep 4
echo "recording G2 pede"
sls_detector_put setbit 0x5d 13
sls_detector_put gainmode forceswitchg2
sls_detector_put start
sleep 4
sls_detector_put clearbit 0x5d 12
sls_detector_put clearbit 0x5d 13
sls_detector_put gainmode dynamic
# turn on current source
# bit 16 high bit 17 low = automatic cal col sweep
# bit 16 high bit 17 high = cal col selected with bits 26-20
sls_detector_put setbit 0x5d 16
sls_detector_put currentsource 1 nofix 0
sleep 1
@ -167,7 +169,7 @@ echo "Finished scan"
sls_detector_put exptime 0.000010
sls_detector_put period 0.002
sls_detector_put frames 1000000
sls_detector_put clearbit 0x5d 16
sls_detector_put currentsource 0
echo "Script finished"
$KILLRCV

View File

@ -19,8 +19,8 @@ $KILLRCV
sls_detector_put powerchip 0
sleep 1
sls_detector_put stop;
sls_detector_put setbit 0x5d 7
sls_detector_put stop
sls_detector_put powerchip 1
sleep 3
@ -30,16 +30,16 @@ sleep 3
sls_detector_put frames 640
sls_detector_put period 0.005
sls_detector_put exptime 0.000010
sls_detector_put vhighvoltage 90
sls_detector_put highvoltage 90
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.4.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.4.9
sls_detector_put detectormac 00:ab:be:cc:dd:e2
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_srcmac 00:ab:be:cc:dd:e2
sls_detector_put speed 1
sls_detector_put readoutspeed 1
sls_detector_put start # this puts the chip in a known state.
sls_detector_put stop
@ -47,26 +47,25 @@ sls_detector_put stop
if [ "$1" == 'HG0' ]; then
sls_detector_put setbit 0x5d 0
sls_detector_put reg 0x58 0x00800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
sls_detector_put settings highgain0
#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 clearbit 0x5d 0
sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
sls_detector_put settings gain0
#sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31;
echo "normal mode"
fi
sls_detector_put reg 0x7f 0xff1f
sls_detector_put reg 0x59 0x1110
#sls_detector_put reg 0x59 0x1110
#sls_detector_put reg 0x5b 0xffffffff
#sls_detector_put reg 0x5a 0xffffffff
sls_detector_put setbit 0x58 30 ; sls_detector_put clearbit 0x58 30;#set colum select register to ffffffff, normal state, switch enabled.
#sls_detector_put setbit 0x58 30 ; sls_detector_put clearbit 0x58 30;#set colum select register to ffffffff, normal state, switch enabled.
sls_detector_put clearbit 0x5d 16
sls_detector_put clearbit 0x5d 17
sls_detector_put gainmode dynamic
@ -85,33 +84,26 @@ sleep 4
echo "recording G1 pede"
sls_detector_put setbit 0x5d 12
sls_detector_put gainmode forceswitchg1
sls_detector_put start
sleep 4
echo "recording G2 pede"
sls_detector_put setbit 0x5d 13
sls_detector_put gainmode forceswitchg2
sls_detector_put start
sleep 4
sls_detector_put clearbit 0x5d 12
sls_detector_put clearbit 0x5d 13
sls_detector_put gainmode dynamic
# turn on current source
# bit 16 high bit 17 low = automatic cal col sweep
# bit 16 high bit 17 high = cal col selected with bits 26-20
sls_detector_put currentsource 1 nofix 0x8000000000000000 normal
sls_detector_put reg 0x5b 0x80000000
sls_detector_put reg 0x5a 0x00000000
#sls_detector_put reg 0x5a 0x00000001
sls_detector_put setbit 0x58 30 ; sls_detector_put clearbit 0x58 30;
sls_detector_put setbit 0x5d 16
sleep 1
@ -226,7 +218,7 @@ echo "Finished scan"
sls_detector_put exptime 0.000010
sls_detector_put period 0.002
sls_detector_put frames 1000000
sls_detector_put clearbit 0x5d 16
sls_detector_put currentsource 0
echo "Script finished"
$KILLRCV

View File

@ -16,15 +16,20 @@ sls_detector_put powerchip 1
sls_detector_put period 0.002
sls_detector_put exptime 0.000010
sls_detector_put vhighvoltage 200
sls_detector_put highvoltage 200
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.4.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.4.9
sls_detector_put detectormac 00:ab:be:cc:dd:e2
sls_detector_put speed 1
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_srcmac 00:ab:be:cc:dd:e2
sls_detector_put readoutspeed 1
#sls_detector_put reg 0x59 0x1310 #0001 0011 0001 0000
#sls_detector_put readoutspeed 0
#sls_detector_put reg 0x59 0x0100 #0000 0001 0000 0000
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
@ -57,19 +62,18 @@ sleep 3
# 1000 frames at 500 frames per second takes 2s
echo "recording G1 pede"
sls_detector_put setbit 0x5d 12
sls_detector_put gainmode forceswitchg1
sls_detector_put start
sleep 3
echo "recording G2 pede"
sls_detector_put setbit 0x5d 13
sls_detector_put gainmode forceswitchg2
sls_detector_put start
sleep 3
sls_detector_put clearbit 0x5d 12
sls_detector_put clearbit 0x5d 13
sls_detector_put gainmode dynamic
$KILLRCV
echo "closed G0 pede file and open the G0 CuFluo file"
@ -91,7 +95,7 @@ echo "closed G0 CuFluo file and open HG0 pede file"
sleep 1
$TKPHG0 &
sls_detector_put setbit 0x5d 0
sls_detector_put settings highgain0
sls_detector_put frames 1000

View File

@ -15,7 +15,7 @@ sls_detector_put powerchip 0
sleep 1
sls_detector_put stop;
sls_detector_put setbit 0x5d 7
#sls_detector_put setbit 0x5d 7
sls_detector_put powerchip 1
sleep 3
@ -23,16 +23,16 @@ sleep 3
sls_detector_put period 0.002
sls_detector_put exptime 0.000010
sls_detector_put vhighvoltage 200
sls_detector_put highvoltage 200
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.4.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.4.9
sls_detector_put detectormac 00:ab:be:cc:dd:e2
sls_detector_put speed 1
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_srcmac 00:ab:be:cc:dd:e2
sls_detector_put readoutspeed 1
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
@ -43,11 +43,11 @@ sleep 1
#sls_detector_put reg 0x5b 0xffffffff
#sls_detector_put reg 0x5a 0xffffffff
sls_detector_put setbit 0x58 30 ; sls_detector_put clearbit 0x58 30; #set colum select register to ffffffff, normal state.
#sls_detector_put setbit 0x58 30 ; sls_detector_put clearbit 0x58 30; #set colum select register to ffffffff, normal state.
sls_detector_put reg 0x7f 0xff1f
sls_detector_put reg 0x59 0x1110
#sls_detector_put reg 0x59 0x1110
@ -70,9 +70,9 @@ $KILLRCV
sleep 1
$TKPG0 &
sls_detector_put stop
sls_detector_put clearbit 0x5d 0
sls_detector_put settings gain0 #clearbit 0x5d 0
sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31; #setting G0, H filter, 1 SC , 4FC
#sls_detector_put reg 0x58 0x10800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31; #setting G0, H filter, 1 SC , 4FC
echo "recording G0 pede"
@ -81,19 +81,19 @@ sleep 3
# 1000 frames at 500 frames per second takes 2s
echo "recording G1 pede"
sls_detector_put setbit 0x5d 12
sls_detector_put gainmode forceswitchg1 #setbit 0x5d 12
sls_detector_put start
sleep 3
echo "recording G2 pede"
sls_detector_put setbit 0x5d 13
sls_detector_put gainmode forceswitchg2 #setbit 0x5d 13
sls_detector_put start
sleep 3
sls_detector_put clearbit 0x5d 12
sls_detector_put clearbit 0x5d 13
sls_detector_put gainmode dynamic #clearbit 0x5d 12
#sls_detector_put clearbit 0x5d 13
$KILLRCV
echo "closed G0 pede file and open the G0 CuFluo file"
@ -114,8 +114,8 @@ $KILLRCV
echo "closed G0 CuFluo file and open HG0 pede file"
sleep 1
$TKPHG0 &
sls_detector_put setbit 0x5d 0
sls_detector_put reg 0x58 0x00800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31; #setting HG0, H filter, 1 SC , 4FC
sls_detector_put settings highgain0 #setbit 0x5d 0
#sls_detector_put reg 0x58 0x00800f ; sls_detector_put setbit 0x58 31 ; sls_detector_put clearbit 0x58 31; #setting HG0, H filter, 1 SC , 4FC
@ -144,5 +144,5 @@ $CLI shutter 1 off
$KILLRCV
sls_detector_put clearbit 0x5d 0
sls_detector_put settings gain0 #clearbit 0x5d 0
echo "Script finished"