source: trunk/FACT++/ScriptsForDimCtrl/FeedbackOn.dim@ 19547

Last change on this file since 19547 was 13720, checked in by Jens Buss, 13 years ago
add line for making scritpts executable and renamed all scripts to *.dim
File size: 4.8 KB
Line 
1#!dimctrl --exec
2
3# dimctrl script
4>
5> -------------------------------------------
6> Bias and Feedback StartUp (Current Calibration)
7> -------------------------------------------
8
9.w 2000
10# As a First step we want to calibrate the current, which are read from the bias crate,
11# and not take a DRS calibration, as it is mentioned in the data taking page...
12# so for this we should get the feedback and biasctrl programs into known states
13# I think it is good to try a RECONNECT to the bias, and make sure the voltage is off
14#
15# NOTE:
16# The ideas in the line above are both valid, but both not done.
17# This is *not good*
18
19# Since we do not know, what the feedback program is doing at the moment, we should as well,
20# tell it to keep its mouth shut ... just to be sure, we know whats going on
21> stopping feedback
22FEEDBACK/STOP
23.w 2000
24# stopping should always be possible, and end in state 'Connected'(6)
25.s FEEDBACK 6
26> ..done
27
28#BIAS_CONTROL/RECONNECT
29# If we were disconnected, and this was the first try of the night, the bias_ctrl should
30# be in state 'VoltageOff'(7) more or less immediately
31#.s BIAS_CONTROL 3
32#.s BIAS_CONTROL 7 5000
33# if these assumptions are all wrong, then we might have been properly connected anyway,
34# and just have to ramp down... lets do it, but wait forever, in case it does not work
35> switching off bias
36BIAS_CONTROL/SET_ZERO_VOLTAGE
37.w 2000
38.s BIAS_CONTROL 7
39> ...done
40
41# in case we reach this line, the voltages are all off, and the feedback does not do anything
42# So lets do the current calibration, therefor we tell the bias crate to ramp up just 1 single DAC count(~22mV)
43# 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
44> setting bias globally to 1 DAC
45BIAS_CONTROL/SET_GLOBAL_DAC 1
46.w 2000
47.s BIAS_CONTROL 9
48> ...done
49
50# now we may tell the feedback program to calibrate the currents ...
51# I do not understand, if I have to explicitely allow the feedback program to generate output,
52# or if it just produces output...
53# As far as I understand, the feedback output enable status is the same,
54# as it was before I send the STOP command... so it is unknown at this point.
55# and in addition enabling or disabling the output, when STOPed is not possible as far as I know...
56# I try to enable it anyway.
57> enabling output for feedback
58FEEDBACK/ENABLE_OUTPUT yes
59.w 2000
60> ...done
61
62> calibrating bias crate current readings...
63FEEDBACK/CALIBRATE_CURRENTS
64.w 5000
65# in order to find out when the calibration ends, we have to wait for the transistion from state
66# 'Calibrating'(13) back to 'Connected'(6)
67.s FEEDBACK 13
68.s FEEDBACK 6
69
70# Thomas Bretz told me, that the feedback, after this step has disabled its output
71# and is in the mode, we might call 'temperature control' even there is no temerature beeing controlled.
72# I don't know where the voltage is ... in order to perform the calibration, the feedback had to
73# ramp up to 2V below the operational voltage, i.e. about 1V below the breakdown voltage
74
75# We want to take a DRS amplitude calibration so we have to ramp down the bias voltage.
76# this 10sec wait is needed in order for the bias not to disconect all the time...
77> ... current calibration done
78.w 10000
79
80> switching off bias
81BIAS_CONTROL/SET_ZERO_VOLTAGE
82.w 5000
83.s BIAS_CONTROL 7
84> ...done
85
86# now we want to take a run, with dark counts events
87# so we need to ramp up the voltage
88# we want to use the 'current control' more so we give the commands for this...
89> switching on current controll feedback ...
90FEEDBACK/STOP
91FEEDBACK/START_CURRENT_CONTROL 0.0
92FEEDBACK/ENABLE_OUTPUT yes
93# the feedback should be in state 'CurrentControl'(12) now
94.s FEEDBACK 12
95> ... done
96> switching on bias
97# now we give the feedback a hint, that it may ramp ...
98BIAS_CONTROL/SET_GLOBAL_DAC 1
99# after this command the bias_ctrl should be in state 'VoltageOn'(9) after a second or so
100.s BIAS_CONTROL 9
101> ...1 DAC globally set
102# then usually it takes some time until the feedback has enough information to really start controlling the voltage
103# when the feedback actually kicks in, the bias is first in state 'Ramping'(5) for some seconds and finally in 'VoltageOn'(9)
104# again
105.s BIAS_CONTROL 5
106> ...ramping to nominal voltage
107.s BIAS_CONTROL 9
108> ...bias on
109# here we should wait 45 sec in order for the current control to get enough current readings and temp readings to stabilize..
110> waiting 45sec for the current control to stabilize...
111.w 45000
112> ... done
113
114
115# at the end the bias voltage should be ramped down, since in a few seconds a shifter wit ha flashlight
116# will come out to open the shutter...
117> switching OFF bias ...
118BIAS_CONTROL/SET_ZERO_VOLTAGE
119.s BIAS_CONTROL 7
120> ...done
121> ----------------------------------------------------
122> Bias and Feedback StartUp (Current Calibration)
123> ... done.
124> ----------------------------------------------------
125>
Note: See TracBrowser for help on using the repository browser.