Changeset 18381 for trunk/FACT++/scripts
- Timestamp:
- 11/24/15 12:45:24 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r18372 r18381 409 409 410 410 // FIXME: This might not work is the drive is already close to park position 411 dim.wait("DRIVE_CONTROL", "Locked", 3000); 412 413 //unlock drive if task was sleep 414 if (type=="sleep") 415 dim.send("DRIVE_CONTROL/UNLOCK"); 416 417 var sub = new Subscription("DRIVE_CONTROL/POINTING_POSITION"); 418 sub.get(5000); // FIXME: Proper error message in case of failure 419 420 function func() 421 { 422 var report = sub.get(); 423 424 var zd = report.obj['Zd']; 425 var az = report.obj['Az']; 426 427 if (zd>100 && Math.abs(az)<1) 428 return true; 429 430 return undefined; 431 } 432 433 try { v8.timeout(150000, func); } 434 catch (e) 435 { 436 var p = sub.get(); 437 dim.log('Park position not reached? Telescope at Zd='+p.obj['Zd']+' Az='+p.obj['Az']); 438 } 411 //dim.wait("DRIVE_CONTROL", "Parking", 3000); 412 439 413 /* 440 414 // Check if DRS calibration is necessary … … 447 421 }*/ 448 422 423 //take single pe run if required 449 424 if (type=="singlepe") 450 425 { … … 459 434 while (!irq && !takeRun("single-pe", 10000)); 460 435 } 436 437 //wait until drive is in locked (after it reached park position) 438 dim.wait("DRIVE_CONTROL", "Locked", 150000); 439 440 //unlock drive if task was sleep 441 if (type=="sleep") 442 dim.send("DRIVE_CONTROL/UNLOCK"); 443 461 444 462 445 // It is unclear what comes next, so we better switch off the voltage … … 486 469 dim.wait("PWR_CONTROL", "DriveOff", 6000); 487 470 } 471 472 var sub = new Subscription("DRIVE_CONTROL/POINTING_POSITION"); 473 sub.get(5000); // FIXME: Proper error message in case of failure 488 474 489 475 var report = sub.get();
Note:
See TracChangeset
for help on using the changeset viewer.