Changeset 14764 for trunk/FACT++/scripts/Main.js
- Timestamp:
- 01/09/13 09:45:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r14763 r14764 359 359 360 360 // All times are in UTC 361 // NEW SYNTAX: "date", "MODE", "SOURCENAME" 362 // STARTUP and SHUTDOWN have no sourcename, but need an empty "" 361 363 var observations = 362 364 [ 363 [ "2013-01-07 19:28", "STARTUP" ], 364 [ "2013-01-07 21:00", "Crab"], 365 [ "2013-01-08 05:00", "Mrk 421" ], 366 [ "2013-01-08 07:00", "SHUTDOWN"], 365 [ "2013-01-08 23:05", "STARTUP", "" ], 366 [ "2013-01-08 23:13", "RATESCAN_SOURCENAME", "Dark Patch 3"], 367 // [ "2013-01-08 23:32", "DATA", "Dark Patch 3"], 368 [ "2013-01-08 23:30", "DATA", "Crab" ], 369 [ "2013-01-09 04:45", "DATA", "Mrk 421" ], 370 // [ "2013-01-08 18:58", "RATESCAN_SOURCENAME", "Dark Patch 3"], 371 // [ "2013-01-08 06:00", "RATESCAN_COORDINATES", 3.1415, 3.1415 ], -- not yet implemented 372 [ "2013-01-09 07:00", "SHUTDOWN", ""], 367 373 ]; 368 374 … … 383 389 throw new Error("Start time '"+utc.toUTCString()+"' in row "+i+" exceeds start time in row "+(i-1)); 384 390 //observations[i][0] = utc; 385 observations[i] = { start:utc, source:observations[i][1], toString:function(){ return this.source+" ["+this.start+"]" } }; 391 //observations[i] = { start:utc, source:observations[i][1], toString:function(){ return this.source+" ["+this.start+"]" } }; 392 observations[i] = { start:utc, 393 source:observations[i][2], 394 mode:observations[i][1], 395 toString:function(){ return this.source+" ["+this.start+"]" } }; 386 396 } 387 397 … … 488 498 489 499 // Check (once) if startup of shutdown is scheduled 490 switch (obs. source)500 switch (obs.mode) 491 501 { 492 502 case "STARTUP": … … 519 529 continue; 520 530 521 case "RATESCAN": 522 console.out(" RATESCAN not yet implemented."); 531 case "RATESCAN_SOURCENAME": 532 console.out(" RATESCAN "); 533 534 dim.send("DRIVE_CONTROL/STOP"); 535 dim.wait("DRIVE_CONTROL", "Armed", 3000); 536 537 dim.send("DRIVE_CONTROL/TRACK_SOURCE", 0, 0, obs.source); 538 dim.wait("DRIVE_CONTROL", "OnTrack", 300000); 539 540 // Checking if system is Ready for Data Taking, which is in this case 541 // the same as Ready for RateScan. 542 // 543 // this part might be simply wrong here, since I should be able to expect 544 // the system to be able for data taking. And if not, then it is not here, 545 // to bring the system into a better state, correct? 546 dim.wait("FEEDBACK", "CurrentControl", -100); 547 dim.wait("BIAS_CONTROL", "VoltageOn", -100); 548 dim.wait("FAD_CONTROL", "Connected", -100); 549 550 dim.wait("RATE_SCAN","Connected", 5000); 551 dim.send("RATE_SCAN/START_THRESHOLD_SCAN", 50, 1000, -10); 552 553 // lets wait if the Ratescan really starts .. it should be started after 10sec max. 554 dim.wait("RATE_SCAN", "InProgress", 10000); 555 dim.wait("RATE_SCAN", "Connected", 2700000); 556 console.out("Ratescan done.") 557 523 558 continue; 524 559 }
Note:
See TracChangeset
for help on using the changeset viewer.