- Timestamp:
- 02/17/12 13:53:46 (13 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/ScriptsForDimCtrl/FirstDrsCalib
r12802 r12900 13 13 FEEDBACK/ENABLE_OUTPUT 0 14 14 FEEDBACK/STOP 15 .s FEEDBACK 415 .s FEEDBACK 6 16 16 .w 500 17 17 .! echo `date -u` "calibrating bias crate current readings..." >> ~/FACT++/ScriptsForDimCtrl/DataTaking.log 18 18 FEEDBACK/CALIBRATE_CURRENTS 19 .s FEEDBACK 920 .s FEEDBACK 419 .s FEEDBACK 11 20 .s FEEDBACK 6 21 21 .w 3000 22 22 FEEDBACK/START_TEMP_CONTROL 0.00 -
trunk/FACT++/gui/FactGui.h
r12697 r12900 3084 3084 fStatusFeedbackLabel->setToolTip(s.comment.c_str()); 3085 3085 3086 if (s.index> 6) // Running3086 if (s.index>8) // Running 3087 3087 SetLedColor(fStatusFeedbackLed, kLedGreenCheck, time); 3088 if (s.index== 5 || s.index==6) // Idle3088 if (s.index==7 || s.index==8) // Idle 3089 3089 SetLedColor(fStatusFeedbackLed, kLedGreen, time); 3090 if (s.index ==4) // Connected3090 if (s.index>=4 && s.index<=6) // Connected 3091 3091 SetLedColor(fStatusFeedbackLed, kLedYellow, time); 3092 3092 if (s.index==3) // Connecting … … 3098 3098 3099 3099 fFeedbackWidget->setEnabled(s.index>=3); 3100 fFeedbackCalibrate->setEnabled(s.index==4 );3100 fFeedbackCalibrate->setEnabled(s.index==4 || s.index==6); 3101 3101 fFeedbackStop->setEnabled(s.index>4); 3102 fFeedbackTempStart->setEnabled(s.index==4 );3103 fFeedbackTempOffset->setEnabled(s.index<= 4);3104 fFeedbackOutputEnable->setEnabled(s.index<= 6);3105 fFeedbackOutputDisable->setEnabled(s.index!= 5 && s.index!=6);3106 3107 fFeedbackFrameLeft->setEnabled(s.index!= 5 && s.index!=7);3108 fFeedbackCanvLeft->setEnabled(s.index!= 5 && s.index!=7);3102 fFeedbackTempStart->setEnabled(s.index==4 || s.index==5); 3103 fFeedbackTempOffset->setEnabled(s.index<=6); 3104 fFeedbackOutputEnable->setEnabled(s.index<=8); 3105 fFeedbackOutputDisable->setEnabled(s.index!=7 && s.index!=8); 3106 3107 fFeedbackFrameLeft->setEnabled(s.index!=7 && s.index!=9); 3108 fFeedbackCanvLeft->setEnabled(s.index!=7 && s.index!=9); 3109 3109 } 3110 3110 -
trunk/FACT++/src/feedback.cc
r12899 r12900 51 51 kStateDisconnected, 52 52 kStateConnecting, 53 kStateConnectedFSC, 54 kStateConnectedFAD, 53 55 kStateConnected, 54 56 kStateTempCtrlIdle, … … 817 819 return kStateDimNetworkNA; 818 820 821 const bool bias = fStatusBias.second >= BIAS::kConnecting; 822 const bool fad = fStatusFAD.second >= FAD::kConnected; 823 const bool fsc = fStatusFSC.second >= 2; 824 819 825 // All subsystems are not connected 820 if (fStatusFAD.second<FAD::kConnected && 821 fStatusBias.second<BIAS::kConnecting && 822 fStatusFSC.second<2) 826 if (!bias && !fad && !fsc) 823 827 return kStateDisconnected; 824 828 825 // At least one subsystem is not connected 826 if (fStatusFAD.second<FAD::kConnected || 827 fStatusBias.second<BIAS::kConnected || 828 fStatusFSC.second<2) 829 // At least one subsystem apart from bias is connected 830 if (bias && !fad && !fsc) 829 831 return kStateConnecting; 830 832 … … 867 869 return kStateConnected; 868 870 } 869 */ 870 if (fControlType==kFeedback || fControlType==kFeedbackGlobal) 871 return fOutputEnabled ? kStateFeedbackCtrlRunning : kStateFeedbackCtrlIdle; 872 873 if (fControlType==kTemp) 874 { 875 if (GetCurrentState()==kStateCalibrating && fCursor<100) 876 return GetCurrentState(); 877 878 return fOutputEnabled ? kStateTempCtrlRunning : kStateTempCtrlIdle; 879 } 871 */ 872 873 // Needs connection of FAD and BIAS 874 if (bias && fad) 875 { 876 if (fControlType==kFeedback || fControlType==kFeedbackGlobal) 877 return fOutputEnabled ? kStateFeedbackCtrlRunning : kStateFeedbackCtrlIdle; 878 } 879 880 // Needs connection of FSC and BIAS 881 if (bias && fsc) 882 { 883 if (fControlType==kTemp) 884 { 885 if (GetCurrentState()==kStateCalibrating && fCursor<100) 886 return GetCurrentState(); 887 888 return fOutputEnabled ? kStateTempCtrlRunning : kStateTempCtrlIdle; 889 } 890 } 891 892 if (bias && fad && !fsc) 893 return kStateConnectedFAD; 894 895 if (bias && fsc && !fad) 896 return kStateConnectedFSC; 880 897 881 898 return kStateConnected; … … 917 934 918 935 AddStateName(kStateConnecting, "Connecting", 919 "Not all subsystems (FAD, FSC, Bias) are connected to their hardware."); 920 936 "Only biasctrl is available and connected with its hardware."); 937 938 AddStateName(kStateConnectedFSC, "ConnectedFSC", 939 "biasctrl and fscctrl are available and connected with their hardware."); 940 AddStateName(kStateConnectedFAD, "ConnectedFAD", 941 "biasctrl and fadctrl are available and connected with their hardware."); 921 942 AddStateName(kStateConnected, "Connected", 922 " All needed subsystems are connected to their hardware, no action is performed.");943 "biasctrl, fadctrl and fscctrl are available and connected with their hardware."); 923 944 924 945 AddStateName(kStateFeedbackCtrlIdle, "FeedbackIdle", … … 937 958 "Calibrating current offsets."); 938 959 939 AddEvent("START_FEEDBACK_CONTROL", kStateConnected )960 AddEvent("START_FEEDBACK_CONTROL", kStateConnectedFAD, kStateConnected) 940 961 (bind(&StateMachineFeedback::StartFeedback, this)) 941 962 ("Start the feedback control loop"); 942 963 943 AddEvent("START_GLOBAL_FEEDBACK", kStateConnected )964 AddEvent("START_GLOBAL_FEEDBACK", kStateConnectedFAD, kStateConnected) 944 965 (bind(&StateMachineFeedback::StartFeedbackGlobal, this)) 945 966 ("Start the global feedback control loop"); 946 967 947 AddEvent("START_TEMP_CONTROL", "F:1", kStateConnected )968 AddEvent("START_TEMP_CONTROL", "F:1", kStateConnectedFSC, kStateConnected) 948 969 (bind(&StateMachineFeedback::StartTempCtrl, this, placeholders::_1)) 949 970 ("Start the temperature control loop" … … 983 1004 ("Set time-constant. (-1 to use the cycle time, i.e. the time for the last average cycle, instead)"); 984 1005 985 AddEvent("CALIBRATE_CURRENTS", kStateConnected )//, kStateIdle)1006 AddEvent("CALIBRATE_CURRENTS", kStateConnectedFSC, kStateConnected)//, kStateIdle) 986 1007 (bind(&StateMachineFeedback::CalibrateCurrents, this)) 987 1008 ("");
Note:
See TracChangeset
for help on using the changeset viewer.