1 | #!dimctrl --exec
|
---|
2 |
|
---|
3 | >
|
---|
4 | > -------------------------------------------
|
---|
5 | > First DRS Calibration Script starting up...
|
---|
6 | > Special Edition, in case the Lid is open already
|
---|
7 | > (leaves out the dark count run)
|
---|
8 | > -------------------------------------------
|
---|
9 |
|
---|
10 | .w 2000
|
---|
11 | # As a First step we want to calibrate the current, which are read from the bias crate,
|
---|
12 | # and not take a DRS calibration, as it is mentioned in the data taking page...
|
---|
13 | # so for this we should get the feedback and biasctrl programs into known states
|
---|
14 | # I think it is good to try a RECONNECT to the bias, and make sure the voltage is off
|
---|
15 | # Since we do not know, what the feedback program is doing at the moment, we should as well,
|
---|
16 | # tell it to keep its mouth shut ... just to be sure, we know whats going on
|
---|
17 | > stopping feedback
|
---|
18 | FEEDBACK/STOP
|
---|
19 | .w 2000
|
---|
20 | # stopping should always be possible, and end in state 'Connected'(6)
|
---|
21 | .s FEEDBACK 6
|
---|
22 | > ..done
|
---|
23 |
|
---|
24 | #BIAS_CONTROL/RECONNECT
|
---|
25 | # If we were disconnected, and this was the first try of the night, the bias_ctrl should
|
---|
26 | # be in state 'VoltageOff'(7) more or less immediately
|
---|
27 | #.s BIAS_CONTROL 3
|
---|
28 | #.s BIAS_CONTROL 7 5000
|
---|
29 | # if these assumptions are all wrong, then we might have been properly connected anyway,
|
---|
30 | # and just have to ramp down... lets do it, but wait forever, in case it does not work
|
---|
31 | > switching off bias
|
---|
32 | BIAS_CONTROL/SET_ZERO_VOLTAGE
|
---|
33 | .w 2000
|
---|
34 | .s BIAS_CONTROL 7
|
---|
35 | > ...done
|
---|
36 |
|
---|
37 | # in case we reach this line, the voltages are all off, and the feedback does not do anything
|
---|
38 | # So lets do the current calibration, therefor we tell the bias crate to ramp up just 1 single DAC count(~22mV)
|
---|
39 | # 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
|
---|
40 | > setting bias globally to 1 DAC
|
---|
41 | BIAS_CONTROL/SET_GLOBAL_DAC 1
|
---|
42 | .w 2000
|
---|
43 | .s BIAS_CONTROL 9
|
---|
44 | > ...done
|
---|
45 |
|
---|
46 | # now we may tell the feedback program to calibrate the currents ...
|
---|
47 | # I do not understand, if I have to explicitely allow the feedback program to generate output,
|
---|
48 | # or if it just produces output...
|
---|
49 | # As far as I understand, the feedback output enable status is the same,
|
---|
50 | # as it was before I send the STOP command... so it is unknown at this point.
|
---|
51 | # and in addition enabling or disabling the output, when STOPed is not possible as far as I know...
|
---|
52 | # I try to enable it anyway.
|
---|
53 | > enabling output for feedback
|
---|
54 | FEEDBACK/ENABLE_OUTPUT yes
|
---|
55 | .w 2000
|
---|
56 | > ...done
|
---|
57 |
|
---|
58 | > calibrating bias crate current readings...
|
---|
59 | FEEDBACK/CALIBRATE_CURRENTS
|
---|
60 | .w 5000
|
---|
61 | # in order to find out when the calibration ends, we have to wait for the transistion from state
|
---|
62 | # 'Calibrating'(13) back to 'Connected'(6)
|
---|
63 | .s FEEDBACK 13
|
---|
64 | .s FEEDBACK 6
|
---|
65 |
|
---|
66 | # Thomas Bretz told me, that the feedback, after this is step has disabled its output
|
---|
67 | # and is in the mode, we might call 'temperature control' even there is no temerature beeing controlled.
|
---|
68 | # I don't know where the voltage is ... in order to perform the calibration, the feedback had to
|
---|
69 | # ramp up to 2V below the operational voltage, i.e. about 1V below the breakdown voltage
|
---|
70 |
|
---|
71 | # We want to take a DRS amplitude calibration so we have to ramp down the bias voltage.
|
---|
72 | # this 10sec wait is needed in order for the bias not to disconect all the time...
|
---|
73 | > ... current calibration done
|
---|
74 | .w 10000
|
---|
75 |
|
---|
76 | > switching off bias
|
---|
77 | BIAS_CONTROL/SET_ZERO_VOLTAGE
|
---|
78 | .w 5000
|
---|
79 | .s BIAS_CONTROL 7
|
---|
80 | > ...done
|
---|
81 |
|
---|
82 | # So now we can take the 3 runs, which are called DRS amplitude calibration:
|
---|
83 | # A pedestal run with ROI=1024
|
---|
84 | # A gain calibration run with ROI=1024
|
---|
85 | # and a second pedestal run, with the same ROI as our next data will be, i.e. ROI=300 in this case
|
---|
86 | > taking DRS:Pedestal 1000 ...
|
---|
87 | > OPERATOR: observe Events tab and make sure there are no patches with strange behaviour, which can be caused by DRS-CHIP Problems
|
---|
88 | FAD_CONTROL/START_DRS_CALIBRATION
|
---|
89 | ###FAD_CONTROL/SET_FILE_FORMAT 0
|
---|
90 | MCP/START -1 1000 drs-pedestal
|
---|
91 | .s FAD_CONTROL 8
|
---|
92 | .s FAD_CONTROL 4
|
---|
93 | > ... done
|
---|
94 |
|
---|
95 | > taking DRS:Gain 1000 ...
|
---|
96 | MCP/START -1 1000 drs-gain
|
---|
97 | .s FAD_CONTROL 8
|
---|
98 | .s FAD_CONTROL 4
|
---|
99 | > ... done
|
---|
100 |
|
---|
101 | > taking Pedestal 1000 ...
|
---|
102 | MCP/START -1 1000 pedestal
|
---|
103 | .s FAD_CONTROL 8
|
---|
104 | .s FAD_CONTROL 4
|
---|
105 | > ... done
|
---|
106 |
|
---|
107 | # okay this is the DRS calibration for the next few runs.
|
---|
108 | # we are now asked to take again a pedestal run, which can be used, to
|
---|
109 | # calculate the electronics noise for instance ... since the shutter is closed and the
|
---|
110 | # voltage is off .. there should not be alot of signal in it :-)
|
---|
111 | > taking crosscheck Pedestal 1000 ...
|
---|
112 | FAD_CONTROL/SET_FILE_FORMAT 2
|
---|
113 | ###FAD_CONTROL/SET_FILE_FORMAT 0
|
---|
114 | MCP/START -1 1000 pedestal
|
---|
115 | .s FAD_CONTROL 8
|
---|
116 | .s FAD_CONTROL 4
|
---|
117 | > ... done
|
---|
118 |
|
---|
119 | # now we want to take a run, with dark counts events
|
---|
120 | # so we need to ramp up the voltage
|
---|
121 | # we want to use the 'current control' more so we give the commands for this...
|
---|
122 | > switching on current controll feedback ...
|
---|
123 | FEEDBACK/STOP
|
---|
124 | FEEDBACK/START_CURRENT_CONTROL 0.0
|
---|
125 | FEEDBACK/ENABLE_OUTPUT yes
|
---|
126 | # the feedback should be in state 'CurrentControl'(12) now
|
---|
127 | # the feedback should be in state 'CurrentCtrlIdle'(9) now since 30.05.12
|
---|
128 | .s FEEDBACK 9
|
---|
129 | > ... done
|
---|
130 | > switching on bias
|
---|
131 | # now we give the feedback a hint, that it may ramp ...
|
---|
132 | BIAS_CONTROL/SET_GLOBAL_DAC 1
|
---|
133 | # after this command the bias_ctrl should be in state 'VoltageOn'(9) after a second or so
|
---|
134 | .s BIAS_CONTROL 9
|
---|
135 | > ...1 DAC globally set
|
---|
136 | # then usually it takes some time until the feedback has enough information to really start controlling the voltage
|
---|
137 | # when the feedback actually kicks in, the bias is first in state 'Ramping'(5) for some seconds and finally in 'VoltageOn'(9)
|
---|
138 | # again
|
---|
139 | .s BIAS_CONTROL 5
|
---|
140 | > ...ramping to nominal voltage
|
---|
141 | .s BIAS_CONTROL 9
|
---|
142 | > ...bias on
|
---|
143 | # here we should wait 45 sec in order for the current control to get enough current readings and temp readings to stabilize..
|
---|
144 | > waiting 45sec for the current control to stabilize...
|
---|
145 | .w 45000
|
---|
146 | > ... done
|
---|
147 |
|
---|
148 | # at the end the bias voltage should be ramped down, since in a few seconds a shifter wit ha flashlight
|
---|
149 | # will come out to open the shutter...
|
---|
150 | > switching OFF bias ...
|
---|
151 | BIAS_CONTROL/SET_ZERO_VOLTAGE
|
---|
152 | .s BIAS_CONTROL 7
|
---|
153 | > ...done
|
---|
154 | >
|
---|
155 | > This is the end of First DRS Calibration
|
---|
156 | > ----------------------------------------------------
|
---|
157 | >
|
---|