Changeset 14330


Ignore:
Timestamp:
08/12/12 14:46:12 (12 years ago)
Author:
Jens Buss
Message:
modified: for software startup
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/ScriptsForDimCtrl/Startup.dim

    r14329 r14330  
    11#!dimctrl --exec
    22
    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 > -------------------------------------------
     3# ==========================================================================
     4# Startup
    95
    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
     6# ==========================================================================
     7# Script for Software Startup
    238
    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
     9# call it by: .x ScriptsForDimCtrl/Startup.dim
    3610
    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
     11# ----------------------------------------------------
    4512
    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
     13> ===================================================
     14> SYSTEM STARTUP
     15> ===================================================
     16> BIAS_CONTROL
     17> ...checking state of biasctrl
     18.s BIAS_CONTROL 1 1000 2
     19> ...bias DISCONNECTED
     20> ...reconnecting
     21BIAS_CONTROL/RECONNECT
    5722
    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
     23:2
     24> ...wating for state 7: VoltageOff
     25.s BIAS_CONTROL 7 2000 3
     26.j 4
    6527
    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
     28:3
     29.s BIAS_CONTROL 9 2000 256
     30> ...VoltageOn
     31> ...ramping down
     32BIAS_CONTROL/SET_GLOBAL_DAC 0
     33> ...waiting for bias ramping
     34.s BIAS_CONTROL 5
     35> ...ramping
     36.s BIAS_CONTROL 7 15000 4
    7037
    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
     38:4
     39> ...connected, VoltageOff
     40> Bias ready
     41> =============
    7542
    76 > switching off bias
    77 BIAS_CONTROL/SET_ZERO_VOLTAGE
    78 .w 5000
    79 .s BIAS_CONTROL 7
    80 > ...done
     43# --------------------------------------------------
    8144
    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
     45> FTM_CONTROL
     46> ...enabling all FTUs
     47FTM_CONTROL/ENABLE_FTU -1 yes
    9448
    95 > taking DRS:Gain 1000 ...
    96 MCP/START -1 1000 drs-gain
    97 .s FAD_CONTROL 8
    98 .s FAD_CONTROL 4
    99 > ... done
     49# --------------------------------------------------
     50> FAD_CONTROL
     51> ...starting FADs
     52FAD_CONTROL/START
     53> ...checking fadctrl state
     54.s FAD_CONTROL 4 5000 5
     55> ...connected
     56> FADs Ready!
     57>-
    10058
    101 > taking Pedestal 1000 ...
    102 MCP/START -1 1000 pedestal
    103 .s FAD_CONTROL 8
    104 .s FAD_CONTROL 4
    105 > ... done
     59> Startup finished
     60> ------------------------------------
     61.j 300
    10662
    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
     63:5
     64> not alle FADs are connected
     65> ------------------------------------
     66> OPERATOR: check for FAD or FTU Loss
     67> ------------------------------------
     68.j 300
    11869
    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
     70:256
     71> BIAS not connecte4d properly
     72> ------------------------------------
     73> OPERATOR: check biasctrl
     74> ------------------------------------
    14775
    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 >
     76:300
     77
     78
Note: See TracChangeset for help on using the changeset viewer.