diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-10-22 17:56:36 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-10-22 17:56:36 +0300 |
| commit | ffbbc56bd5935cc4cb65e635c7360735578952fe (patch) | |
| tree | 1e108f214a4a9d1eea7a7ec24efee9838161a8c6 /Software/Embedded_SW | |
| parent | 785ddbf1014bbb91892a7c3fd28eab384e387ad4 (diff) | |
| download | Tango-ffbbc56bd5935cc4cb65e635c7360735578952fe.tar.gz Tango-ffbbc56bd5935cc4cb65e635c7360735578952fe.zip | |
winder avg
Diffstat (limited to 'Software/Embedded_SW')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c | 2 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c index 0d0e3a65b..1302d262a 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c @@ -303,7 +303,7 @@ uint32_t IDS_StopHomeDispenser (uint32_t DispenserId) if ((HomingActive[DispenserId] == false)&&( PrimingActive[DispenserId] == false)) { LOG_ERROR (DispenserId,"Homing not active"); - return ERROR; + return OK; } TimerMotors_t MotorId = (DispenserId)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index bf0f361fd..9d57cd29f 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -47,6 +47,7 @@ uint32_t CalculationDirectionChangeCounter = 1; //holds the current number of ru double WinderMotorSpeed[MAX_WINDER_SPEED_CALCULATION]; uint16_t WinderMotorSpeedCounter = 0; bool WinderMotorSpeedRollOver = false; +int StartWinderCalculation = 0; #define DEFAULT_SCREW_SPEED 1200 double ScrewSpeed = DEFAULT_SCREW_SPEED; double ScrewRunningTime = 0; @@ -127,7 +128,7 @@ uint32_t Winder_Prepare(void *JobDetails) //float process_speed = JobTicket->processparameters->dyeingspeed; double ScrewSpeed = DEFAULT_SCREW_SPEED;//(process_speed*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].pulleyradius); // we will use pulley radius of the screw for this purpose, as of now WinderMotorSpeedRollOver=false; - + StartWinderCalculation = 0; //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,InternalWinderCfg.segmentoffsetpulses); //REPORT_MSG(ScrewSpeed, "Winder_Prepare"); /* @@ -299,7 +300,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) if (WinderMotorSpeedRollOver == false) { Add100 = true; - LOG_ERROR(Add100, "Add100 = true"); + //LOG_ERROR(Add100, "Add100 = true"); } // WinderMotorSpeedCounter=0; } @@ -327,7 +328,9 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) #ifdef READ_SCREW_ENCODER int WinderRun; WinderRun = abs(ScrewLocationRun[1] - ScrewLocationRun[0]); - if ((WinderRun < 30000)&&(WinderMotorSpeedRollOver == true)) + if (WinderMotorSpeedRollOver == true) + StartWinderCalculation++; + if ((WinderRun < 30000)&&(StartWinderCalculation >= 2)) { WinderRunSamples++; WinderRunSum+=WinderRun; |
