Ignore:
Timestamp:
03/12/12 12:37:32 (13 years ago)
Author:
tbretz
Message:
Set the bias create resistor to 1150 Ohm which (according to the measurements of last night) seem to be a good compromise to include also cables, etc; added some more informative output to the Info
File:
1 edited

Legend:

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

    r13070 r13071  
    166166            vec[i+416] = diff;
    167167
     168        avg = 0;
     169        num = 0;
    168170        if (fControlType==kCurrents)
    169171        {
     
    178180            for (int i=0; i<BIAS::kNumChannels; i++)
    179181            {
    180                 // 3900 Ohm/n  +  1000 Ohm  +  1100 Ohm
    181                 const double R = fMap.hv(i).group()==0 ? 3075 : 2880;
     182                // 3900 Ohm/n  +  1000 Ohm  +  1150 Ohm
     183                const double R = fMap.hv(i).group()==0 ? 3125 : 2930;
    182184                const double I = double(fCurrentsAvg[i])/fCursorCur - fCalibration[i];
    183185                vec[i+416] += R * I*conv;
     186                if (fCalibration[i]>0)
     187                {
     188                    avg += vec[i+416];
     189                    num++;
     190                }
    184191            }
     192            avg /= num;
    185193
    186194            fCurrentsAvg.assign(416, 0);
     
    194202            return;
    195203
    196         Info("Sending new absolute offset to biasctrl.");
     204        ostringstream msg;
     205        msg << setprecision(4) << "Sending new absolute offset (" << diff << "V+" << avg << "V) to biasctrl.";
     206        Info(msg);
    197207
    198208        DimClient::sendCommandNB((char*)"BIAS_CONTROL/SET_GAPD_REFERENCE_OFFSET",
Note: See TracChangeset for help on using the changeset viewer.