Changeset 17190 for trunk/FACT++/scripts
- Timestamp:
- 09/19/13 16:23:59 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r17179 r17190 221 221 return; 222 222 223 this.ok = cnt==0; 224 225 console.out(" DeltaUov=%.3f [N(>0.033V)=%d]".$(avg, cnt)); 226 } 227 228 // DN: Why is voltageOff() implemented as 229 // a method of a Subscription to a specific Service 230 // I naively would think of voltageOff() as an unbound function. 231 // I seems to me it has to be a method of a Subscription object, in order 232 // to use the update counting method. But does it have to be 233 // a Subscription to FEEDBACK/DEVIATION, or could it work with other services as well? 223 224 this.ok = cnt==0;// || (this.last!=undefined && Math.abs(this.last-avg)<0.002); 225 226 console.out(" DeltaUov=%.3f (%.3f) [N(>0.033V)=%d]".$(avg, Math.abs(this.last-avg), cnt)); 227 228 this.last = avg; 229 } 230 234 231 service_feedback.voltageOff = function() 235 232 { … … 247 244 { 248 245 dim.log("Switching voltage off."); 249 250 this.ok = undefined;251 246 252 247 // Supress the possibility that the bias control is … … 260 255 } 261 256 262 dim.wait("BIAS_CONTROL", "VoltageOff", 60000); 257 dim.wait("BIAS_CONTROL", "VoltageOff", 60000); // FIXME: 30000? 263 258 264 259 // FEEDBACK stays in CurrentCtrl when Voltage is off but output enabled … … 305 300 306 301 // Wait until voltage on 307 dim.wait("BIAS_CONTROL", "VoltageOn", 60000); 308 309 if (isOff)310 this.ok = false;302 dim.wait("BIAS_CONTROL", "VoltageOn", 60000); // FIXME: 30000? 303 304 // if (isOff) 305 // this.ok = false; 311 306 } 312 307 … … 324 319 var now = new Date(); 325 320 326 v8.timeout(60000, func, this); 321 this.last = undefined; 322 this.ok = false; 323 v8.timeout(4*60000, func, this); // FIMXE: Remove 4! 324 this.ok = undefined; 327 325 328 326 if (irq) … … 330 328 else 331 329 dim.log("Voltage stable within limits"); 332 333 this.ok = undefined;334 330 } 335 331 … … 378 374 //dim.send("FEEDBACK/STOP"); 379 375 dim.send("FTM_CONTROL/STOP_TRIGGER"); 376 377 dim.wait("FTM_CONTROL", "Valid", 3000); 378 dim.wait("FEEDBACK", "Calibrated", 3000); 379 380 380 dim.send("BIAS_CONTROL/DISCONNECT"); 381 382 dim.wait("FTM_CONTROL", "Valid", 3000);383 381 dim.wait("BIAS_CONTROL", "Disconnected", 3000); 384 dim.wait("FEEDBACK", "Calibrated", 3000);385 382 386 383 var report = sub.get(); … … 808 805 // It is unclear what comes next, so we better switch off the voltage 809 806 service_feedback.voltageOff(); 807 810 808 system_on = true; 811 809 dim.log("Task finished [STARTUP]"); … … 909 907 console.out(""); 910 908 break; // case "RATESCAN" 911 912 909 913 910 case "DATA":
Note:
See TracChangeset
for help on using the changeset viewer.