Changeset 18607 for trunk


Ignore:
Timestamp:
09/17/16 19:34:55 (8 years ago)
Author:
tbretz
Message:
WORKAROUND CH272: Removed the shortcut channel from the list of treated channels.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/feedback.cc

    r18590 r18607  
    209209
    210210        // Only the channels which are no spare channels are ramped
    211         if (std::count(fBiasDac.begin(), fBiasDac.end(), dac)!=320)
     211        // Due to the shortcut, only 319 channels are ramped, so only
     212        // 320 and not 319 are expected to have the correct day setting
     213        if (std::count(fBiasDac.begin(), fBiasDac.end(), dac)!=319/*320*/)
    212214            return GetCurrentState();
    213215
     
    255257            fCurrentsRms.assign(BIAS::kNumChannels, 0);
    256258
    257             Dim::SendCommandNB("BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(256+512*fCalibStep));
     259            // Ramp all channels to the calibration setting except the one
     260            // with a shortcut
     261            vector<uint16_t> vec(BIAS::kNumChannels, uint16_t(256+512*fCalibStep));
     262            vec[272] = 0;
     263            Dim::SendCommandNB("BIAS_CONTROL/SET_ALL_CHANNELS_DAC", vec);
     264
     265            //Dim::SendCommandNB("BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(256+512*fCalibStep));
    258266
    259267            return GetCurrentState();
     
    572580
    573581            // Check if this is a blocked channel
     582            // 272 is the one with the shortcut
    574583            const bool blocked =
    575584                (fMoonMode>0 && std::find(inner0.begin(), inner0.end(), i)!=inner0.end()) ||
    576585                (fMoonMode>1 && std::find(inner1.begin(), inner1.end(), i)!=inner1.end()) ||
    577                 (fMoonMode>2 && std::find(inner2.begin(), inner2.end(), i)!=inner2.end());
     586                (fMoonMode>2 && std::find(inner2.begin(), inner2.end(), i)!=inner2.end()) ||
     587                i==272;
    578588
    579589            // Number of G-APDs in this patch
     
    810820                vec[263] = vec[262]-fVoltGapd[262]+fVoltGapd[263];
    811821
     822                // Do not ramp the channel with a shortcut
     823                vec[272] = 0;
     824
    812825//            if (fDimBias.state()!=BIAS::State::kRamping)
    813826//            {
     
    9961009        fTimeCalib = Time();
    9971010
    998         Dim::SendCommandNB("BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(256+512*fCalibStep));
     1011        // Ramp all channels to the calibration setting except the one
     1012        // with a shortcut
     1013        vector<uint16_t> vec(BIAS::kNumChannels, uint16_t(256+512*fCalibStep));
     1014        vec[272] = 0;
     1015        Dim::SendCommandNB("BIAS_CONTROL/SET_ALL_CHANNELS_DAC", vec);
     1016
     1017        //Dim::SendCommandNB("BIAS_CONTROL/SET_GLOBAL_DAC", uint16_t(256+512*fCalibStep));
    9991018
    10001019        return Feedback::State::kCalibrating;
Note: See TracChangeset for help on using the changeset viewer.