source: trunk/FACT++/ScriptsForDimCtrl/FeedbackOn@ 13719

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