Allow different receiver pcs

This commit is contained in:
2024-02-09 12:33:00 +01:00
parent 9ecc784cae
commit a901bc5d94
5 changed files with 86 additions and 27 deletions

View File

@ -7,6 +7,7 @@
# - the hostname is set
# - detector is on
# - Filename_creator has been run (with correct module #)
# - source pccalib.sh with pc (mpc2012/pc-jungfrau-test)
# - waveform generator is on
# - amplifier board is powered and unconnected.
# - last file should be 2097184000 bytes big.
@ -31,19 +32,21 @@ sls_detector_put delay 0
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 exptime 0.00004
sls_detector_put highvoltage 0
# configure for receiver on mpc2012/pc-jungfrau-test
# source pccalib.sh with pc (mpc2012/pc-jungfrau-test)
# 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 configuremac 0
sls_detector_put readoutspeed half_speed
#sls_detector_put readoutspeed full_speed
sls_detector_put gainmode dynamic
@ -55,6 +58,11 @@ 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
@ -62,7 +70,7 @@ sleep 0.2
# frequency 1kHz
echo $CLI" FREQ 1000" | nc pc8830 5555
sleep 0.2
# width 40 us
# width 40 us
echo $CLI" PULS:WIDT 0.000040" | nc pc8830 5555
sleep 0.2
# amplitude 0.1 V" | nc pc8830 5555
@ -130,8 +138,6 @@ if [[ $input = "q" ]]; then
fi
fi
$TKBPG0 &

View File

@ -7,6 +7,7 @@
# - the hostname is set
# - detector is on
# - fileneame script has been sourced
# - source pccalib.sh [pc] (mpc2012/pc-jungfrau-test)
# last file should have exactly 4194368000 byte in it.
@ -24,14 +25,16 @@ sls_detector_put period 0.005
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200
# configure for receiver on mpc2012
# configure for receiver on mpc2012/pc-jungfrau-test
# source pccalib.sh [pc] (mpc2012/pc-jungfrau-test)
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip 10.1.4.105 #10.1.4.105
sls_detector_put udp_dstmac 3C:FD:FE:A2:14:D8 #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip 10.1.4.9 #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 half_speed
#sls_detector_put readoutspeed full_speed
#sls_detector_put dbitphase 125
sleep 3
@ -171,6 +174,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

View File

@ -7,6 +7,8 @@
# - export PATH=/afs/psi.ch/project/sls_det_software/latest_slsDetectorPackage/build/bin:$PATH
# - export LD_LIBRARY_PATH=/afs/psi.ch/project/sls_det_software/latest_slsDetectorPackage/build/bin:$LD_LIBRARY_PATH
# - detector is on
# - source filename_creator.sh #
# - source pccalib.sh [pc] (mpc2012/pc-jungfrau-test)
# - xray tube is on and ramped for 40 kV, 60 mA, set to Cu
sls_detector_put stop #just in case
@ -18,13 +20,16 @@ sls_detector_put period 0.002
sls_detector_put exptime 0.000010
sls_detector_put highvoltage 200
# configure for receiver on mpc2012
# configure for receiver on mpc2012/pc-jungfrau-test
# source pccalib.sh [pc] (mpc2012/pc-jungfrau-test)
sls_detector_put udp_dstport 32410
sls_detector_put udp_dstip 10.1.4.105 #10.1.4.105
sls_detector_put udp_dstmac 3C:FD:FE:A2:14:D8 #3C:FD:FE:A2:14:D8
sls_detector_put udp_srcip 10.1.4.9 #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 half_speed #half_speed
#sls_detector_put reg 0x59 0x1310 #0001 0011 0001 0000
@ -34,7 +39,7 @@ sls_detector_put readoutspeed half_speed #half_speed
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl7
CLI=/afs/psi.ch/project/sls_det_software/bin/xrayClient_sl7 #/vacuumClient_sl7
$CLI setv 40
$CLI setc 60
$CLI HV on
@ -119,8 +124,9 @@ sleep 450
# 200k frames at 500 frames per second takes 400s
$CLI shutter 1 off
$KILLRCV
sls_detector_put highvoltage 0
echo "Script finished"

View File

@ -25,22 +25,21 @@ echo "mkdir "$calibdatafolder "if not already existing."
mkdir -p $calibdatafolder
export TKBPG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"BP_M"$1"_"$datestring"_ 10.1.4.105"
export TKBPG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"BP_M"$1"_"$datestring"_ 10.1.1.105"
export TKBPHG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"BP_M"$1"_"$datestring"_HGOG1G2_ 10.1.4.105"
export TKBPHG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"BP_M"$1"_"$datestring"_HGOG1G2_ 10.1.1.105"
export TKCSHG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CS_M"$1"_"$datestring"_HGOG1G2_ 10.1.1.105"
export TKCSHG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CS_M"$1"_"$datestring"_HGOG1G2_ 10.1.4.105"
export TKCSG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CS_M"$1"_"$datestring"_ 10.1.4.105"
export TKCSG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CS_M"$1"_"$datestring"_ 10.1.1.105"
echo "exporting the fluorescence receiver commands "
export TKFG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CuFluoG0_M"$1"_"$datestring"_ 10.1.4.105"
export TKFHG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CuFluoHG0_M"$1"_"$datestring"_ 10.1.4.105"
export TKPG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"pedeG0_M"$1"_"$datestring"_ 10.1.4.105"
export TKPHG0="ju_udp_receiver_3threads_2_0 S "$calibdatafolder"pedeHG0_M"$1"_"$datestring"_ 10.1.4.105"
export TKFG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CuFluoG0_M"$1"_"$datestring"_ 10.1.1.105"
export TKFHG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"CuFluoHG0_M"$1"_"$datestring"_ 10.1.1.105"
export TKPG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"pedeG0_M"$1"_"$datestring"_ 10.1.1.105"
export TKPHG0="./slsDetector_bin/ju_udp_receiver_3threads_2_0 S "$calibdatafolder"pedeHG0_M"$1"_"$datestring"_ 10.1.1.105"

44
pccalib.sh Normal file
View File

@ -0,0 +1,44 @@
#!/bin/bash
#set the destination mac address
#source pccalib.sh mpc2012/pc-jungfrau-test
if [[ "$0" == *"pccalib.sh"* ]]; then
echo "script changes env. variables: should be invoked with source, not sh "
exit
fi
echo $0
echo "Assigning MAC address " $1
if [[ $1 == "pc-jungfrau-test" ]]; then
export DSTMAC="00:02:c9:30:68:31"
export DSTIP="10.1.1.110"
export SRCIP="10.1.1.9"
echo "DSTMAC" $DSTMAC
echo "DSTIP" $DSTIP
echo "SRCIP" $SRCIP
elif [[ $1 == "mpc2012" ]]; then
export DSTMAC="3C:FD:FE:A2:14:DB"
export DSTIP="10.1.1.105"
export SRCIP="10.1.1.9"
echo "DSTMAC" $DSTMAC
echo "DSTIP" $DSTIP
echo "SRCIP" $SRCIP
else
echo "Incorrect pc name. Try again"
unset DSTMAC
unset DSTIP
unset SRCIP
fi