Changeset 13349 for trunk/FACT++/ScriptsForDimCtrl/FirstDrsCalib
- Timestamp:
- 04/16/12 14:29:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/ScriptsForDimCtrl/FirstDrsCalib
r13112 r13349 1 1 # 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 > ------------------------------------------- 6 6 7 7 .w 2000 … … 10 10 # so for this we should get the feedback and biasctrl programs into known states 11 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, 12 # Since we do not know, what the feedback program is doing at the moment, we should as well, 13 13 # tell it to keep its mouth shut ... just to be sure, we know whats going on 14 > stopping feedback 14 15 FEEDBACK/STOP 15 16 .w 2000 16 17 # stopping should always be possible, and end in state 'Connected'(6) 17 18 .s FEEDBACK 6 19 > ..done 18 20 19 21 #BIAS_CONTROL/RECONNECT … … 22 24 #.s BIAS_CONTROL 3 23 25 #.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, 25 27 # and just have to ramp down... lets do it, but wait forever, in case it does not work 28 > switching off bias 26 29 BIAS_CONTROL/SET_ZERO_VOLTAGE 27 30 .w 2000 28 31 .s BIAS_CONTROL 7 32 > ...done 29 33 30 34 # in case we reach this line, the voltages are all off, and the feedback does not do anything 31 35 # So lets do the current calibration, therefor we tell the bias crate to ramp up just 1 single DAC count(~22mV) 32 36 # 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 33 38 BIAS_CONTROL/SET_GLOBAL_DAC 1 34 39 .w 2000 35 40 .s BIAS_CONTROL 9 41 > ...done 36 42 37 # now we may tell the feedback program to calibrate the currents ... 43 # now we may tell the feedback program to calibrate the currents ... 38 44 # I do not understand, if I have to explicitely allow the feedback program to generate output, 39 45 # 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, 41 47 # 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... 43 49 # I try to enable it anyway. 50 > enabling output for feedback 44 51 FEEDBACK/ENABLE_OUTPUT yes 45 52 .w 2000 53 > ...done 46 54 47 .! echo `date -u` "calibrating bias crate current readings..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 55 > calibrating bias crate current readings... 48 56 FEEDBACK/CALIBRATE_CURRENTS 49 57 .w 5000 … … 55 63 # Thomas Bretz told me, that the feedback, after this is step has disabled its output 56 64 # 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 58 66 # ramp up to 2V below the operational voltage, i.e. about 1V below the breakdown voltage 59 67 60 68 # We want to take a DRS amplitude calibration so we have to ramp down the bias voltage. 61 69 # 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 63 71 .w 10000 64 72 73 > switching off bias 65 74 BIAS_CONTROL/SET_ZERO_VOLTAGE 66 75 .w 5000 67 76 .s BIAS_CONTROL 7 77 > ...done 68 78 69 79 # So now we can take the 3 runs, which are called DRS amplitude calibration: … … 71 81 # A gain calibration run with ROI=1024 72 82 # 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 ... 74 84 FAD_CONTROL/START_DRS_CALIBRATION 75 ###FAD_CONTROL/SET_FILE_FORMAT 0 85 ###FAD_CONTROL/SET_FILE_FORMAT 0 76 86 MCP/START -1 1000 drs-pedestal 77 87 .s FAD_CONTROL 8 78 88 .s FAD_CONTROL 4 79 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 89 > ... done 80 90 81 .! echo `date -u` "taking DRS:Gain 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 91 > taking DRS:Gain 1000 ... 82 92 MCP/START -1 1000 drs-gain 83 93 .s FAD_CONTROL 8 84 94 .s FAD_CONTROL 4 85 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 95 > ... done 86 96 87 .! echo `date -u` "taking Pedestal 1000 ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 97 > taking Pedestal 1000 ... 88 98 MCP/START -1 1000 pedestal 89 99 .s FAD_CONTROL 8 90 100 .s FAD_CONTROL 4 91 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 101 > ... done 92 102 93 103 # 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 96 106 # 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 ... 98 108 FAD_CONTROL/SET_FILE_FORMAT 2 99 109 ###FAD_CONTROL/SET_FILE_FORMAT 0 … … 101 111 .s FAD_CONTROL 8 102 112 .s FAD_CONTROL 4 103 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 113 > ... done 104 114 105 # now we want to take a run, with dark counts events 115 # now we want to take a run, with dark counts events 106 116 # so we need to ramp up the voltage 107 117 # 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 ... 109 119 FEEDBACK/STOP 110 120 FEEDBACK/START_CURRENT_CONTROL 0.0 … … 112 122 # the feedback should be in state 'CurrentControl'(12) now 113 123 .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 ... 116 127 BIAS_CONTROL/SET_GLOBAL_DAC 1 117 128 # after this command the bias_ctrl should be in state 'VoltageOn'(9) after a second or so 118 129 .s BIAS_CONTROL 9 130 > ...1 DAC globally set 119 131 # then usually it takes some time until the feedback has enough information to really start controlling the voltage 120 132 # when the feedback actually kicks in, the bias is first in state 'Ramping'(5) for some seconds and finally in 'VoltageOn'(9) 121 133 # again 122 134 .s BIAS_CONTROL 5 135 > ...ramping to nominal voltage 123 136 .s BIAS_CONTROL 9 137 > ...bias on 124 138 # 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... 126 140 .w 45000 127 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 141 > ... done 128 142 129 # so now we can take the dark count run ... 143 # so now we can take the dark count run ... 130 144 # this might be changed in the future ... either the number of events or the the ROI might be changed 131 145 # 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 ... 133 147 MCP/START -1 3000 pedestal 134 148 .s FAD_CONTROL 8 135 149 .s FAD_CONTROL 4 136 .! echo `date -u` "... done" >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 150 > ... done 137 151 138 152 # at the end the bias voltage should be ramped down, since in a few seconds a shifter wit ha flashlight 139 153 # will come out to open the shutter... 140 .! echo `date -u` "switching OFF bias ..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 154 > switching OFF bias ... 141 155 BIAS_CONTROL/SET_ZERO_VOLTAGE 142 156 .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.