source: trunk/FACT++/ScriptsForDimCtrl/FirstDrsCalib@ 13492

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