Ignore:
Timestamp:
04/16/12 14:29:41 (13 years ago)
Author:
Jens Buss
Message:
switched to the 0new commenting method
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/ScriptsForDimCtrl/FirstDrsCalib

    r13112 r13349  
    11# dimctrl script
    2 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
    3 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
    4 .! echo `date -u` "First DRS Calibration Script starting up..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
    5 .! echo `date -u` "-------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     2>
     3> -------------------------------------------
     4> First DRS Calibration Script starting up...
     5> -------------------------------------------
    66
    77.w 2000
     
    1010# so for this we should get the feedback and biasctrl programs into known states
    1111# I think it is good to try a RECONNECT to the bias, and make sure the voltage is off
    12 # Since we do not know, what the feedback program is doing at the moment, we should as well, 
     12# Since we do not know, what the feedback program is doing at the moment, we should as well,
    1313# tell it to keep its mouth shut ... just to be sure, we know whats going on
     14> stopping feedback
    1415FEEDBACK/STOP
    1516.w 2000
    1617# stopping should always be possible, and end in state 'Connected'(6)
    1718.s FEEDBACK 6
     19> ..done
    1820
    1921#BIAS_CONTROL/RECONNECT
     
    2224#.s BIAS_CONTROL 3
    2325#.s BIAS_CONTROL 7 5000
    24 # if these assumptions are all wrong, then we might have been properly connected anyway, 
     26# if these assumptions are all wrong, then we might have been properly connected anyway,
    2527# and just have to ramp down... lets do it, but wait forever, in case it does not work
     28> switching off bias
    2629BIAS_CONTROL/SET_ZERO_VOLTAGE
    2730.w 2000
    2831.s BIAS_CONTROL 7
     32> ...done
    2933
    3034# in case we reach this line, the voltages are all off, and the feedback does not do anything
    3135# So lets do the current calibration, therefor we tell the bias crate to ramp up just 1 single DAC count(~22mV)
    3236# the result of this action is, to get bias_ctrl into the state 'VoltageOn'(9), but since we only go one DAC count it shouldn't take long
     37> setting bias globally to 1 DAC
    3338BIAS_CONTROL/SET_GLOBAL_DAC 1
    3439.w 2000
    3540.s BIAS_CONTROL 9
     41> ...done
    3642
    37 # now we may tell the feedback program to calibrate the currents ... 
     43# now we may tell the feedback program to calibrate the currents ...
    3844# I do not understand, if I have to explicitely allow the feedback program to generate output,
    3945# or if it just produces output...
    40 # As far as I understand, the feedback output enable status is the same, 
     46# As far as I understand, the feedback output enable status is the same,
    4147# as it was before I send the STOP command... so it is unknown at this point.
    42 # and in addition enabling or disabling the output, when STOPed is not possible as far as I know... 
     48# and in addition enabling or disabling the output, when STOPed is not possible as far as I know...
    4349# I try to enable it anyway.
     50> enabling output for feedback
    4451FEEDBACK/ENABLE_OUTPUT yes
    4552.w 2000
     53> ...done
    4654
    47 .! echo `date -u` "calibrating bias crate current readings..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     55> calibrating bias crate current readings...
    4856FEEDBACK/CALIBRATE_CURRENTS
    4957.w 5000
     
    5563# Thomas Bretz told me, that the feedback, after this is step has disabled its output
    5664# and is in the mode, we might call 'temperature control' even there is no temerature beeing controlled.
    57 # I don't know where the voltage is ... in order to perform the calibration, the feedback had to 
     65# I don't know where the voltage is ... in order to perform the calibration, the feedback had to
    5866# ramp up to 2V below the operational voltage, i.e. about 1V below the breakdown voltage
    5967
    6068# We want to take a DRS amplitude calibration so we have to ramp down the bias voltage.
    6169# this 10sec wait is needed in order for the bias not to disconect all the time...
    62 .! echo `date -u` "current calibration done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     70> ... current calibration done
    6371.w 10000
    6472
     73> switching off bias
    6574BIAS_CONTROL/SET_ZERO_VOLTAGE
    6675.w 5000
    6776.s BIAS_CONTROL 7
     77> ...done
    6878
    6979# So now we can take the 3 runs, which are called DRS amplitude calibration:
     
    7181# A gain calibration run with ROI=1024
    7282# and a second pedestal run, with the same ROI as our next data will be, i.e. ROI=300 in this case
    73 .! echo `date -u` "taking DRS:Pedestal 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     83> taking DRS:Pedestal 1000 ...
    7484FAD_CONTROL/START_DRS_CALIBRATION
    75 ###FAD_CONTROL/SET_FILE_FORMAT 0 
     85###FAD_CONTROL/SET_FILE_FORMAT 0
    7686MCP/START -1 1000 drs-pedestal
    7787.s FAD_CONTROL 8
    7888.s FAD_CONTROL 4
    79 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     89> ... done
    8090
    81 .! echo `date -u` "taking DRS:Gain 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     91> taking DRS:Gain 1000 ...
    8292MCP/START -1 1000 drs-gain
    8393.s FAD_CONTROL 8
    8494.s FAD_CONTROL 4
    85 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     95> ... done
    8696
    87 .! echo `date -u` "taking Pedestal 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     97> taking Pedestal 1000 ...
    8898MCP/START -1 1000 pedestal
    8999.s FAD_CONTROL 8
    90100.s FAD_CONTROL 4
    91 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     101> ... done
    92102
    93103# okay this is the DRS calibration for the next few runs.
    94 # we are now asked to take again a pedestal run, which can be used, to 
    95 # calculate the electronics noise for instance ... since the shutter is closed and the 
     104# we are now asked to take again a pedestal run, which can be used, to
     105# calculate the electronics noise for instance ... since the shutter is closed and the
    96106# voltage is off .. there should not be alot of signal in it :-)
    97 .! echo `date -u` "taking crosscheck Pedestal 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     107> taking crosscheck Pedestal 1000 ...
    98108FAD_CONTROL/SET_FILE_FORMAT 2
    99109###FAD_CONTROL/SET_FILE_FORMAT 0
     
    101111.s FAD_CONTROL 8
    102112.s FAD_CONTROL 4
    103 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     113> ... done
    104114
    105 # now we want to take a run, with dark counts events 
     115# now we want to take a run, with dark counts events
    106116# so we need to ramp up the voltage
    107117# we want to use the 'current control' more so we give the commands for this...
    108 .! echo `date -u` "switching on bias ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     118> switching on current controll feedback ...
    109119FEEDBACK/STOP
    110120FEEDBACK/START_CURRENT_CONTROL 0.0
     
    112122# the feedback should be in state 'CurrentControl'(12) now
    113123.s FEEDBACK 12
    114 
    115 # now we give the feedback a hint, that it may ramp ...
     124> ... done
     125> switching on bias
     126# now we give the feedback a hint, that it may ramp ...
    116127BIAS_CONTROL/SET_GLOBAL_DAC 1
    117128# after this command the bias_ctrl should be in state 'VoltageOn'(9) after a second or so
    118129.s BIAS_CONTROL 9
     130> ...1 DAC globally set
    119131# then usually it takes some time until the feedback has enough information to really start controlling the voltage
    120132# when the feedback actually kicks in, the bias is first in state 'Ramping'(5) for some seconds and finally in 'VoltageOn'(9)
    121133# again
    122134.s BIAS_CONTROL 5
     135> ...ramping to nominal voltage
    123136.s BIAS_CONTROL 9
     137> ...bias on
    124138# here we should wait 45 sec in order for the current control to get enough current readings and temp readings to stabilize..
    125 .! echo `date -u` "...waiting 45sec for the current control..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     139> waiting 45sec for the current control to stabilize...
    126140.w 45000
    127 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     141> ... done
    128142
    129 # so now we can take the dark count run ... 
     143# so now we can take the dark count run ...
    130144# this might be changed in the future ... either the number of events or the the ROI might be changed
    131145# then the DRS calibration above, and the pedestal run in between have to be changed as well.
    132 .! echo `date -u` "taking Pedestal with BIAS on 3000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     146> taking Pedestal with BIAS on 3000 ...
    133147MCP/START -1 3000 pedestal
    134148.s FAD_CONTROL 8
    135149.s FAD_CONTROL 4
    136 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     150> ... done
    137151
    138152# at the end the bias voltage should be ramped down, since in a few seconds a shifter wit ha flashlight
    139153# will come out to open the shutter...
    140 .! echo `date -u` "switching OFF bias ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     154> switching OFF bias ...
    141155BIAS_CONTROL/SET_ZERO_VOLTAGE
    142156.s BIAS_CONTROL 7
    143 
    144 .! echo `date -u` "This is the end of First DRS Calibration" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
    145 .! echo `date -u` "----------------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
    146 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
    147 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
     157> ...done
     158>
     159> This is the end of First DRS Calibration
     160> ----------------------------------------------------
     161>
Note: See TracChangeset for help on using the changeset viewer.