- Timestamp:
- 03/09/13 11:07:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r14973 r14998 89 89 service_con.onchange = function(evt) 90 90 { 91 // This happens, but why? 92 if (!evt.obj['status']) 93 return; 94 91 95 this.reset = [ ]; 92 96 … … 247 251 248 252 dim.send("RATE_CONTROL/STOP"); // get out of GlobalThresholdSet 253 dim.wait("RATE_CONTROL", "Connected", 3000); 249 254 250 255 console.out(" DRS cal: end"); … … 425 430 if (!checkStates(table, 10000)) 426 431 { 427 console.out("Something unexpected has happened. Although the startup-",432 throw new Error"Something unexpected has happened. Although the startup-", 428 433 "procedure has finished, not all servers are in the state", 429 434 "in which they ought to be. Please, try to find out what", 430 435 "happened..."); 431 exit();432 436 } 433 437 … … 620 624 case "RATESCAN": 621 625 console.out(" RATESCAN "); 622 626 623 627 dim.send("DRIVE_CONTROL/STOP"); 624 dim.wait("DRIVE_CONTROL", "Armed", 3000);625 628 dim.wait("DRIVE_CONTROL", "Armed", 5000); 629 626 630 if (obs.source != undefined) 627 631 dim.send("DRIVE_CONTROL/TRACK_ON", obs.source); … … 637 641 // this part might be simply wrong here, since I should be able to expect 638 642 // the system to be able for data taking. And if not, then it is not here, 639 // to bring the system into a better state, correct? 643 // to bring the system into a better state, correct? 644 645 // [TB] Either here the system have to be brought to the correct state, or 646 // it has to be ensured that the previous code brought the system to a correct 647 // state. In this case checkStates could be used (but is a bit of obsolete) 648 // Doing non-throwing checks without checking the return value does not make 649 // sense at all. 640 650 dim.wait("FEEDBACK", "CurrentControl", -100); 641 651 dim.wait("BIAS_CONTROL", "VoltageOn", -100); … … 672 682 // ------------------------------------------------------------ 673 683 684 // Checking for 'Ramping' in the BIAS_CONTROL is not ideal, but at the moment 685 // it is not possible to distinguish between a real ramping and the short 686 // ramping which takes place whenever the feedback updated the voltages. 687 674 688 console.out(" Checking states [mainloop]"); 675 689 var table = … … 680 694 [ "SMART_FACT" ], 681 695 [ "DATA_LOGGER", [ "NightlyFileOpen", "WaitForRun", "Logging" ] ], 682 [ "FSC_CONTROL", [ "Connected" ] ],683 [ "MCP", [ "Idle" ] ],684 [ "TIME_CHECK", [ "Valid" ] ],685 [ "PWR_CONTROL", [ "SystemOn" ] ],686 [ "AGILENT_CONTROL", [ "VoltageOn" ] ],687 [ "BIAS_CONTROL", [ "VoltageOff", "VoltageOn" 688 [ "FEEDBACK", [ "CurrentCtrlIdle", "CurrentControl" ] ],689 [ "RATE_SCAN", [ "Connected" ] ],690 [ "RATE_CONTROL", [ "Connected", "InProgress" 691 [ "LID_CONTROL", [ "Open", "Closed" ] ],692 [ "DRIVE_CONTROL", [ "Armed", "Tracking", "OnTrack" ] ],693 [ "FTM_CONTROL", [ "Idle", "TriggerOn" ] ],694 [ "FAD_CONTROL", [ "Connected", "WritingData" ] ],696 [ "FSC_CONTROL", [ "Connected" ] ], 697 [ "MCP", [ "Idle" ] ], 698 [ "TIME_CHECK", [ "Valid" ] ], 699 [ "PWR_CONTROL", [ "SystemOn" ] ], 700 [ "AGILENT_CONTROL", [ "VoltageOn" ] ], 701 [ "BIAS_CONTROL", [ "VoltageOff", "VoltageOn", "Ramping" ] ], 702 [ "FEEDBACK", [ "CurrentCtrlIdle", "CurrentControl" ] ], 703 [ "RATE_SCAN", [ "Connected" ] ], 704 [ "RATE_CONTROL", [ "Connected", "InProgress" ] ], 705 [ "LID_CONTROL", [ "Open", "Closed" ] ], 706 [ "DRIVE_CONTROL", [ "Armed", "Tracking", "OnTrack" ] ], 707 [ "FTM_CONTROL", [ "Idle", "TriggerOn" ] ], 708 [ "FAD_CONTROL", [ "Connected", "WritingData" ] ], 695 709 ]; 696 710 697 711 if (!checkStates(table)) 698 712 { 699 throw new Error("Something unexpected has happened. One of the servers"+ 700 "is in a state in which it should not be. Please,"+ 713 //dim.alarm("System inconsistent"); 714 //dim.alarm(); 715 throw new Error("Something unexpected has happened. One of the servers "+ 716 "is in a state in which it should not be. Please, "+ 701 717 "try to find out what happened..."); 702 718 }
Note:
See TracChangeset
for help on using the changeset viewer.