Changeset 16441
- Timestamp:
- 05/29/13 18:20:14 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r16077 r16441 195 195 return; 196 196 197 this.voltageStep = null;198 197 if (!evt.data) 199 198 return; … … 216 215 this.previous = avg; 217 216 218 console.out(" DeltaV= "+this.voltageStep);217 console.out(" DeltaV=%.3f".$(this.voltageStep)); 219 218 } 220 219 … … 253 252 254 253 // Switch voltage off 255 console.out(" Voltage on: switch off");254 console.out(" "+new Date().toUTCString()+": Voltage off: switch off"); 256 255 dim.send("BIAS_CONTROL/SET_ZERO_VOLTAGE"); 257 256 … … 303 302 if (isOff) 304 303 { 305 console.out(" Voltage on: switch on");304 console.out(" "+new Date().toUTCString()+": Voltage on: switch on"); 306 305 //console.out(JSON.stringify(dim.state("BIAS_CONTROL"))); 307 306 … … 347 346 console.out(" Feedback wait: start"); 348 347 349 function func( service)350 { 351 if (( service.cnt!=undefined && service.get().counter>service.cnt+10) ||352 ( service.voltageStep && service.voltageStep<0.02))348 function func() 349 { 350 if ((this.cnt!=undefined && this.get().counter>this.cnt+10) || 351 (this.voltageStep && this.voltageStep<0.02)) 353 352 return true; 354 353 } 355 354 356 355 var now = new Date(); 357 //v8.timeout(5*60000, func, this); 358 while ((this.cnt==undefined || this.get().counter<=this.cnt+10) && (!this.voltageStep || this.voltageStep>0.02)) 359 v8.sleep(100); 356 357 v8.timeout(4*60000, func, this); 360 358 361 359 console.out(" Feedback wait: end [dV=%.3f, cnt=%d, %.2fs]".$(this.voltageStep, this.get().counter, (new Date()-now)/1000));
Note:
See TracChangeset
for help on using the changeset viewer.