Changeset 13110 for trunk/FACT++/ScriptsForDimCtrl/FirstDrsCalib
- Timestamp:
- 03/14/12 21:19:38 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/ScriptsForDimCtrl/FirstDrsCalib
r13087 r13110 1 # Making sure bias is off 1 # dimctrl script 2 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 3 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 2 4 .! echo `date -u` "First DRS Calibration Script starting up..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 3 5 .! echo `date -u` "-------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 4 .! echo `date -u` "reconnecting to bias crate / switching bias ON / disabling feedback" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 5 BIAS_CONTROL/RECONNECT 6 .! echo `date -u` "wating for RECONNECT --> voltageOff" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 7 .s BIAS_CONTROL 7 5000 8 FEEDBACK/START_CURRENT_CONTROL 0.00 9 FEEDBACK/ENABLE_OUTPUT 1 10 .w 3000 6 7 .w 2000 8 # As a First step we want to calibrate the current, which are read from the bias crate, 9 # and not take a DRS calibration, as it is mentioned in the data taking page... 10 # so for this we should get the feedback and biasctrl programs into known states 11 # 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, 13 # tell it to keep its mouth shut ... just to be sure, we know whats going on 14 FEEDBACK/STOP 15 .w 2000 16 # stopping should always be possible, and end in state 'Connected'(6) 17 .s FEEDBACK 6 18 19 #BIAS_CONTROL/RECONNECT 20 # If we were disconnected, and this was the first try of the night, the bias_ctrl should 21 # be in state 'VoltageOff'(7) more or less immediately 22 #.s BIAS_CONTROL 3 23 #.s BIAS_CONTROL 7 5000 24 # if these assumptions are all wrong, then we might have been properly connected anyway, 25 # and just have to ramp down... lets do it, but wait forever, in case it does not work 26 BIAS_CONTROL/SET_ZERO_VOLTAGE 27 .w 2000 28 .s BIAS_CONTROL 7 29 30 # in case we reach this line, the voltages are all off, and the feedback does not do anything 31 # So lets do the current calibration, therefor we tell the bias crate to ramp up just 1 single DAC count(~22mV) 32 # 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 11 33 BIAS_CONTROL/SET_GLOBAL_DAC 1 34 .w 2000 12 35 .s BIAS_CONTROL 9 13 FEEDBACK/ENABLE_OUTPUT 0 14 FEEDBACK/STOP 15 .s FEEDBACK 6 16 .w 500 17 .! echo `date -u` "calibrating bias crate current readings..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 36 37 # now we may tell the feedback program to calibrate the currents ... 38 # I do not understand, if I have to explicitely allow the feedback program to generate output, 39 # or if it just produces output... 40 # As far as I understand, the feedback output enable status is the same, 41 # 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... 43 # I try to enable it anyway. 44 FEEDBACK/ENABLE_OUTPUT yes 45 .w 2000 46 47 .! echo `date -u` "calibrating bias crate current readings..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 18 48 FEEDBACK/CALIBRATE_CURRENTS 49 .w 5000 50 # in order to find out when the calibration ends, we have to wait for the transistion from state 51 # 'Calibrating'(13) back to 'Connected'(6) 19 52 .s FEEDBACK 13 20 53 .s FEEDBACK 6 21 .w 3000 22 FEEDBACK/START_CURRENT_CONTROL 0.00 23 .w 500 24 FEEDBACK/ENABLE_OUTPUT 1 54 55 # Thomas Bretz told me, that the feedback, after this is step has disabled its output 56 # 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 58 # ramp up to 2V below the operational voltage, i.e. about 1V below the breakdown voltage 59 60 # We want to take a DRS amplitude calibration so we have to ramp down the bias voltage. 61 # 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 63 .w 10000 64 25 65 BIAS_CONTROL/SET_ZERO_VOLTAGE 66 .w 5000 26 67 .s BIAS_CONTROL 7 27 .! echo `date -u` "bias voltage is switched off" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 68 69 # So now we can take the 3 runs, which are called DRS amplitude calibration: 70 # A pedestal run with ROI=1024 71 # A gain calibration run with ROI=1024 72 # 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 28 74 FAD_CONTROL/START_DRS_CALIBRATION 29 30 .! echo `date -u` "taking DRS:Pedestal 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 75 ###FAD_CONTROL/SET_FILE_FORMAT 0 31 76 MCP/START -1 1000 drs-pedestal 32 77 .s FAD_CONTROL 8 … … 46 91 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 47 92 93 # 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 96 # voltage is off .. there should not be alot of signal in it :-) 48 97 .! echo `date -u` "taking crosscheck Pedestal 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 49 98 FAD_CONTROL/SET_FILE_FORMAT 2 99 ###FAD_CONTROL/SET_FILE_FORMAT 0 50 100 MCP/START -1 1000 pedestal 51 101 .s FAD_CONTROL 8 … … 53 103 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 54 104 105 # now we want to take a run, with dark counts events 106 # so we need to ramp up the voltage 107 # we want to use the 'current control' more so we give the commands for this... 55 108 .! echo `date -u` "switching on bias ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 109 FEEDBACK/STOP 110 FEEDBACK/START_CURRENT_CONTROL 0.0 111 FEEDBACK/ENABLE_OUTPUT yes 112 # the feedback should be in state 'CurrentControl'(12) now 113 .s FEEDBACK 12 114 115 # now we give the feedback a hint, that it may ramp ... 56 116 BIAS_CONTROL/SET_GLOBAL_DAC 1 117 # after this command the bias_ctrl should be in state 'VoltageOn'(9) after a second or so 57 118 .s BIAS_CONTROL 9 119 # then usually it takes some time until the feedback has enough information to really start controlling the voltage 120 # when the feedback actually kicks in, the bias is first in state 'Ramping'(5) for some seconds and finally in 'VoltageOn'(9) 121 # again 58 122 .s BIAS_CONTROL 5 59 123 .s BIAS_CONTROL 9 60 124 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 61 125 62 .! echo `date -u` "taking Pedestal with BIAS on 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 63 MCP/START -1 1000 pedestal 126 # so now we can take the dark count run ... 127 # this might be changed in the future ... either the number of events or the the ROI might be changed 128 # then the DRS calibration above, and the pedestal run in between have to be changed as well. 129 .! echo `date -u` "taking Pedestal with BIAS on 3000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 130 MCP/START -1 3000 pedestal 64 131 .s FAD_CONTROL 8 65 132 .s FAD_CONTROL 4 66 133 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 67 134 135 # at the end the bias voltage should be ramped down, since in a few seconds a shifter wit ha flashlight 136 # will come out to open the shutter... 68 137 .! echo `date -u` "switching OFF bias ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 69 138 BIAS_CONTROL/SET_ZERO_VOLTAGE 70 139 .s BIAS_CONTROL 7 71 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log72 140 141 .! echo `date -u` "This is the end of First DRS Calibration" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 73 142 .! echo `date -u` "----------------------------------------------------" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 74 .! echo `date -u` "This is the end of First DRS Calibration" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 143 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 144 .! echo `date -u` " " >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log
Note:
See TracChangeset
for help on using the changeset viewer.