diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-24 10:02:36 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-02-24 10:02:36 +0200 |
| commit | e4b6aae111fefea65835cf2a40089fb8528fe588 (patch) | |
| tree | cf498a8a00a708f30bf48790da9154bf986d3ca0 /Software/Embedded_SW | |
| parent | ffbe0df145c04bc9e39d5db162a49928ae205da3 (diff) | |
| download | Tango-e4b6aae111fefea65835cf2a40089fb8528fe588.tar.gz Tango-e4b6aae111fefea65835cf2a40089fb8528fe588.zip | |
EC PT100 upper limit lowered. fix short jog screw alarm, improve current measurement
Diffstat (limited to 'Software/Embedded_SW')
3 files changed, 16 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 5434765e1..bc0d1002b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -320,7 +320,7 @@ uint32_t HeatersTestInternalAlarmsCBFunction(uint32_t IfIndex, uint32_t readValu } readValue = MillisecGetTemperatures(InternalId2PT100Id[index]); - if((MINIMUM_HEATER_READ*100>=readValue)||(270.00*100 < readValue)) + if((MINIMUM_HEATER_READ*100>=readValue)||(200.00*100 < readValue)) { //ReportWithPackageFilter(HeatersFilter,"PT100 not working properly",__FILE__,__LINE__,HeaterId,RpError, 0,0); return ERROR; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 78092ae2b..78150e9f9 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -213,9 +213,16 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) REPORT_MSG(millisecondCounter/*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].maxfrequency*/, "Winder_PrepareStage2"); if (ReadValue != LIMIT) { - LOG_ERROR(ReadValue,"Screw failed to reach the limit switch!!"); - //returned with a timeout - Winder_ScrewAtOffsetCallback(0,0); + if (JobIsActive()==true) + { + LOG_ERROR(ReadValue,"Screw failed to reach the limit switch!!"); + //returned with a timeout + Winder_ScrewAtOffsetCallback(0,0); + } + else //short jog, etc + { + AlarmHandlingSetAlarm (EVENT_TYPE__SCREW_MOTOR_LIMIT_TIMEOUT,OFF); //on a short jog, this callback will be called without need + } } else { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c index 20780b8c1..92f22b0ac 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c @@ -222,6 +222,7 @@ double MainCurrent,SecondaryCurrent,StableCurrent; double InitDrierAcVoltage = 0.0; int InitDrierAcVoltageCount = 0; double Zone2Resistance = 0.0; +int WaitForCurrentRaise = 0;//let the heater current raise void InitCurrentReadingStable(void) { memset(Heater_Current,0,sizeof(Heater_Current)); @@ -229,8 +230,9 @@ void InitCurrentReadingStable(void) count_Heater_Current = 0; Maxcount_Heater_Current = 0; StableCurrent = 0.0; + WaitForCurrentRaise = 0; } - +#define MaxStabilization 10 bool DetectIfCurrentReadingStable(double HeaterCurrent) { bool ret = false; @@ -268,6 +270,8 @@ uint32_t PowerManagementCallBack(uint32_t IfIndex, uint32_t BusyFlag) { ReportWithPackageFilter(InitFilter,"PowerManagementCallBack", __FILE__,MainHeaterStable,(int)(SecondaryHeaterStable), RpMessage, Maxcount_Heater_Current, 0); ReportWithPackageFilter(InitFilter,"PowerManagementCallBack", __FILE__,GetHeaterState(HEATER_TYPE__DryerMainHeater),(int)(GetHeaterState(HEATER_TYPE__DryerSecondaryHeater)), RpMessage, Maxcount_Heater_Current, 0); + if (WaitForCurrentRaise++ < MaxStabilization) + return OK; if ((MainHeaterStable == false)&&(Maxcount_Heater_Current<CURRENT_READING_ERROR_UNSTABLE)) { |
