Changeset 19923 for trunk/FACT++/src
- Timestamp:
- 01/15/20 17:54:56 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fscctrl.cc
r19585 r19923 35 35 uint16_t fTempMin; 36 36 uint16_t fTempMax; 37 38 uint16_t fTempExceeded55; 37 39 38 40 size_t fNumConsecutiveErrors; // Number of consecutive messages with errors … … 259 261 //1300=76 260 262 //DD 2019/09/01: changed from 970 to 980 as sensor 19 had values slighly larger than -7.6 263 // Note that these values are not only the temperature sensors in the compartment 264 // but also all other tempereture sensors in the electronics! 261 265 262 266 const auto min = GetTempPT1000(fTempMin); 263 267 268 bool tempgt50 = false; 264 269 for (int *pt=mapt; *pt>=0; pt++) 265 270 { 266 271 const bool valid = resist[*pt]>=fTempMin && resist[*pt]<=fTempMax; 267 272 temperatures.push_back(valid ? GetTempPT1000(resist[*pt]) : 0); 273 274 if (temperatures.back()>55) 275 { 276 Warn("Temperature sensor "+to_string(temperatures.size()-1)+" exceeds 55 degC!"); 277 tempgt50 = true; 278 } 268 279 269 280 if (valid && temperatures.back()<min+1) 270 281 Warn(Tools::Form("Temperature sensor %2d has reading (%d=%.2f degC) closer than 1K to lower limit (%d=%.2f degC)", 271 282 temperatures.size()-1, resist[*pt], temperatures.back(), fTempMin, min)); 272 283 } 284 285 if (tempgt50) 286 fTempExceeded55++; 287 else 288 fTempExceeded55 = 0; 289 290 if (fTempExceeded55==3) 291 { 292 Error("EMERGENCY: This is the third time in a row that any of the tempereture sensors exceeds 50 degC."); 293 Dim::SendCommandNB("BIAS_CONTROL/VOLTAGE_OFF"); 294 Error("Sending 'BIAS_CONTROL/VOLTAGE_OFF'."); 295 296 Dim::SendCommandNB("PWR_CONTROL/CAMERA_POWER", uint8_t(0)); 297 Error("Sending 'PWR_CONTROL/CAMERA_POWER off'."); 298 299 Dim::SendCommandNB("AGILENT_CONTROL_50V/SET_POWER", uint8_t(0)); 300 Error("Sending 'AGILENT_CONTROL_50V/SET_POWER off'."); 301 302 Dim::SendCommandNB("AGILENT_CONTROL_80V/SET_POWER", uint8_t(0)); 303 Error("Sending 'AGILENT_CONTROL_80V/SET_POWER off'."); 273 304 } 274 305 … … 575 606 public: 576 607 ConnectionFSC(ba::io_service& ioservice, MessageImp &imp) : Connection(ioservice, imp()), 577 fIsVerbose(false), fIsAutoReconnect(false), fTempMin(0), fTempMax(65535), fReconnectTimeout(ioservice) 608 fIsVerbose(false), fIsAutoReconnect(false), 609 fTempMin(0), fTempMax(65535), fTempExceeded55(0), 610 fReconnectTimeout(ioservice) 578 611 { 579 612 SetLogStream(&imp);
Note:
See TracChangeset
for help on using the changeset viewer.