Changeset 18342
- Timestamp:
- 10/15/15 20:07:33 (9 years ago)
- Location:
- branches/fscctrl_safety_limits/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fscctrl_safety_limits/src/HeadersFSC.h
r18341 r18342 50 50 51 51 52 struct SecurityCurrentLimits53 {54 double ethernet_switch;55 double FFC;56 double FLP;57 double FAD_digital;58 double FAD_negative;59 double FAD_positive;60 double FPA_digital;61 double FPA_negative;62 double FPA_positive;63 };52 //struct SecurityCurrentLimits 53 //{ 54 // double ethernet_switch; 55 // double FFC; 56 // double FLP; 57 // double FAD_digital; 58 // double FAD_negative; 59 // double FAD_positive; 60 // double FPA_digital; 61 // double FPA_negative; 62 // double FPA_positive; 63 //}; 64 64 } 65 65 -
branches/fscctrl_safety_limits/src/fscctrl.cc
r18341 r18342 41 41 vector<Interpolator2D::vec> fPositionsSensors; 42 42 vector<Interpolator2D::vec> fPositionsBias; 43 FSC::SecurityCurrentLimits fSecurityCurrentLimits; 43 44 double fEthernetSwitchCurrentLimit; 45 double fFFCcurrentLimit; 46 double fFLPcurrentLimit; 47 double fFADdigitalCurrentLimit; 48 double fFADnegativeCurrentLimit; 49 double fFADpositiveCurrentLimit; 50 double fFPAdigitalCurrentLimit; 51 double fFPAnegativeCurrentLimit; 52 double fFPApositiveCurrentLimit; 53 54 44 55 bool fSecurityLimitsExceeded; 45 56 … … 628 639 629 640 const double current_limits[] = { 630 f SecurityCurrentLimits.FAD_digital,631 f SecurityCurrentLimits.FAD_positive,632 f SecurityCurrentLimits.FAD_negative,633 f SecurityCurrentLimits.FPA_digital,634 f SecurityCurrentLimits.FPA_positive,635 f SecurityCurrentLimits.FPA_negative,636 f SecurityCurrentLimits.ethernet_switch,641 fFADdigitalCurrentLimit, 642 fFADnegativeCurrentLimit, 643 fFADpositiveCurrentLimit, 644 fFPAdigitalCurrentLimit, 645 fFPAnegativeCurrentLimit, 646 fFPApositiveCurrentLimit, 647 fEthernetSwitchCurrentLimit, 637 648 INFINITY, 638 f SecurityCurrentLimits.FFC,639 f SecurityCurrentLimits.FLP,649 fFFCcurrentLimit, 650 fFLPcurrentLimit, 640 651 }; 641 652 … … 806 817 } 807 818 808 void SetSecurityCurrentLimits(const FSC::SecurityCurrentLimits &lim) 809 { 810 fSecurityCurrentLimits = lim; 819 void SetEthernetSwitchCurrentLimit(double lim) 820 { 821 fEthernetSwitchCurrentLimit = lim; 822 } 823 824 void SetFFCcurrentLimit(double lim) 825 { 826 fFFCcurrentLimit = lim; 827 } 828 829 void SetFLPcurrentLimit(double lim) 830 { 831 fFLPcurrentLimit = lim; 832 } 833 834 void SetFADdigitalCurrentLimit(double lim) 835 { 836 fFADdigitalCurrentLimit = lim; 837 } 838 839 void SetFADnegativeCurrentLimit(double lim) 840 { 841 fFADnegativeCurrentLimit = lim; 842 } 843 844 void SetFADpositiveCurrentLimit(double lim) 845 { 846 fFADpositiveCurrentLimit = lim; 847 } 848 849 void SetFPAdigitalCurrentLimit(double lim) 850 { 851 fFPAdigitalCurrentLimit = lim; 852 } 853 854 void SetFPAnegativeCurrentLimit(double lim) 855 { 856 fFPAnegativeCurrentLimit = lim; 857 } 858 859 void SetFPApositiveCurrentLimit(double lim) 860 { 861 fFPApositiveCurrentLimit = lim; 811 862 } 812 863 … … 1136 1187 fFSC.SetPositionsBias(v2); 1137 1188 1138 FSC::SecurityCurrentLimits lim; 1139 lim.ethernet_switch = conf.Get<double>("ethernet_switch"); 1140 lim.FFC = conf.Get<double>("FFC"); 1141 lim.FLP = conf.Get<double>("FLP"); 1142 lim.FAD_digital = conf.Get<double>("FAD_digital"); 1143 lim.FAD_negative = conf.Get<double>("FAD_negative"); 1144 lim.FAD_positive = conf.Get<double>("FAD_positive"); 1145 lim.FPA_digital = conf.Get<double>("FPA_digital"); 1146 lim.FPA_negative = conf.Get<double>("FPA_negative"); 1147 lim.FPA_positive = conf.Get<double>("FPA_positive"); 1148 fFSC.SetSecurityCurrentLimits(lim); 1189 fFSC.SetEthernetSwitchCurrentLimit( conf.Get<double>("ethernet_switch") ); 1190 fFSC.SetFFCcurrentLimit( conf.Get<double>("FFC") ); 1191 fFSC.SetFLPcurrentLimit( conf.Get<double>("FLP") ); 1192 fFSC.SetFADdigitalCurrentLimit( conf.Get<double>("FAD_digital") ); 1193 fFSC.SetFADnegativeCurrentLimit( conf.Get<double>("FAD_negative") ); 1194 fFSC.SetFADpositiveCurrentLimit( conf.Get<double>("FAD_positive") ); 1195 fFSC.SetFPAdigitalCurrentLimit( conf.Get<double>("FPA_digital") ); 1196 fFSC.SetFPAnegativeCurrentLimit( conf.Get<double>("FPA_negative") ); 1197 fFSC.SetFPApositiveCurrentLimit( conf.Get<double>("FPA_positive") ); 1149 1198 1150 1199 SetEndpoint(conf.Get<string>("addr"));
Note:
See TracChangeset
for help on using the changeset viewer.