Changeset 13691 for trunk/FACT++/src
- Timestamp:
- 05/13/12 11:58:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/feedback.cc
r13557 r13691 182 182 fAppliedOffset += dUt; 183 183 184 vector<float> vec(2*BIAS::kNumChannels );184 vector<float> vec(2*BIAS::kNumChannels+2); 185 185 for (int i=0; i<BIAS::kNumChannels; i++) 186 186 vec[i+BIAS::kNumChannels] = fAppliedOffset; 187 188 vec[BIAS::kNumChannels*2] = dUt; 189 vec[BIAS::kNumChannels*2+1] = fBiasOffset; 187 190 188 191 double avg[2] = { 0, 0 }; … … 255 258 // Offset induced by the voltage above the calibration point 256 259 const double dI = U0/Ravg[i]; // [V/Ohm] 257 260 258 261 // Offset at the calibration point (make sure that the calibration is 259 262 // valid (Im[i]>Iavg[i]) and we operate above the calibration point) 260 const double I = Im>Iavg[i] ? Im - Iavg[i] : 0; // [ uA]263 const double I = Im>Iavg[i] ? Im - Iavg[i] : 0; // [A] 261 264 262 265 // Make sure that the averaged resistor is valid … … 590 593 */ 591 594 592 vector<float> vec(2*BIAS::kNumChannels );595 vector<float> vec(2*BIAS::kNumChannels+2); 593 596 for (int i=0; i<BIAS::kNumChannels; i++) 594 597 vec[i] = fPV[2][i]-fSP[i]; … … 725 728 726 729 vector<float> vec; 727 vec.reserve(2*nch );730 vec.reserve(2*nch+2); 728 731 vec.insert(vec.begin(), nch, fPV[2][0]-fSP[0]); 729 732 vec.insert(vec.begin()+nch, nch, correction[0]); 733 vec.push_back(0); 734 vec.push_back(0); 730 735 731 736 fDimDeviation.setQuality(fControlType); … … 928 933 fSP = valarray<double>(0., BIAS::kNumChannels); 929 934 930 vector<float> vec(2*BIAS::kNumChannels); 935 vector<float> vec(2*BIAS::kNumChannels+2); 936 vec[2*BIAS::kNumChannels+1] = fBiasOffset; 931 937 fDimDeviation.setQuality(kIdle); 932 938 fDimDeviation.Update(vec); … … 950 956 WarnState(false, true); 951 957 958 fBiasOffset = 0; 952 959 ResetData(evt.GetShort()); 953 960 … … 964 971 WarnState(false, true); 965 972 973 fBiasOffset = 0; 966 974 ResetData(evt.GetShort()); 967 975 … … 1004 1012 WarnState(true, false); 1005 1013 1014 fBiasOffset = evt.GetFloat(); 1006 1015 ResetData(0); 1007 1008 fBiasOffset = evt.GetFloat();1009 1016 fControlType = kCurrents; 1010 1017 … … 1240 1247 "Amplitude reference value(s)" 1241 1248 "Vref[mV]:Amplitude reference"), 1242 fDimDeviation("FEEDBACK/DEVIATION", "F:416;F:416 ",1249 fDimDeviation("FEEDBACK/DEVIATION", "F:416;F:416;F:1;F:1", 1243 1250 "Control loop information" 1244 1251 "|DeltaAmpl[mV]:Amplitude offset measures" 1245 "|DeltaBias[mV]:Correction value calculated"), 1252 "|DeltaBias[mV]:Correction value calculated" 1253 "|DeltaTemp[mV]:Correction calculated from temperature" 1254 "|DeltaUser[mV]:Additional offset specified by user"), 1246 1255 fDimCalibration("FEEDBACK/CALIBRATION", "F:416;F:416;F:416", 1247 1256 "Current offsets"
Note:
See TracChangeset
for help on using the changeset viewer.