- Timestamp:
- 05/26/19 12:04:11 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Main.js
r19514 r19517 816 816 console.out(" IRQ: "+cmd); 817 817 console.out(" Time: "+time); 818 console.out(" User: "+user); 818 if (user) 819 console.out(" User: "+user); 819 820 820 821 if (cmd.toUpperCase()=="RELOADSOURCES") … … 829 830 // This will end a run in progress as if it where correctly stopped 830 831 if (dim.state("MCP").name=="TakingData") 831 dim.send("MCP/STOP"); 832 { 833 if (irq.toUpperCase()=="PREPARE") 834 { 835 // Avoid stopping the trigger preparing for a ToO 836 // this would result in the FEEDBACK going from InProgress to Connected 837 // and thus the threshold settings cannot be reused 838 if (dim.state("FAD_CONTROL").name=="RunInProgress") 839 dim.send("FAD_CONTROL/CLOSE_OPEN_FILES"); 840 } 841 else 842 dim.send("MCP/STOP"); 843 } 844 845 if (irq.toUpperCase()=="PREPARE") 846 { 847 triggerReloadSources = true; 848 dim.send("DRIVE_CONTROL/STOP"); 849 irq = undefined; 850 } 851 852 /* 853 if (fDimFTM.state()==FTM::State::kTriggerOn) 854 { 855 Message("Stopping FTM"); 856 Dim::SendCommandNB("FTM_CONTROL/STOP_TRIGGER"); 857 } 858 859 // FIXME: Do step 2 only when FTM is stopped 860 if (fDimFAD.state()==FAD::State::kConnected || fDimFAD.state()==FAD::State::kRunInProgress) 861 { 862 if (fDimFAD.state()==FAD::State::kRunInProgress) 863 Dim::SendCommandNB("FAD_CONTROL/CLOSE_OPEN_FILES"); 864 } 865 866 return GetCurrentState(); 867 */ 832 868 833 869 // This will stop a rate scan in progress … … 879 915 return false; 880 916 917 while (irq.toUpperCase()=="PREPARE") 918 v8.sleep(10); 919 881 920 if (irq.toUpperCase()=="RESCHEDULE") 882 921 { … … 903 942 { 904 943 Shutdown(); 905 return true;906 }907 908 if (irq.toUpperCase()=="PREPARE")909 {910 dim.log("Preparing for ToO observation.");911 dim.send("DRIVE_CONTROL/STOP");912 dim.wait("DRIVE_CONTROL", "Initialized", 15000);913 944 return true; 914 945 } … … 1594 1625 // Now we are 'OnTrack', so we can ramp to nominal voltage 1595 1626 // and wait for the feedback to get stable 1596 service_feedback.voltageOn(); 1627 //if (!obs[sub].grb || dim.state("FEEDBACK").name!="InProgress") 1628 service_feedback.voltageOn(); 1597 1629 if (!obs[sub].grb) 1598 1630 service_feedback.waitForVoltageOn(); … … 1617 1649 if (dim.state("LID_CONTROL").name!="Open") 1618 1650 { 1651 dim.log("Waiting for an open lid."); 1619 1652 dim.wait("LID_CONTROL", "Open", 30000); 1620 1653 service_feedback.waitForVoltageOn();
Note:
See TracChangeset
for help on using the changeset viewer.