From d50d729a2b7d45ca4b22df7ff0d8823825c479b6 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 9 Jan 2019 10:42:14 +0200 Subject: Version 1.3.1.1 changes Communication tx traces (reports, diagnostics, alarms, job reports) File system file download support – not tested! Communication tx with pre-allocated memory (improve and add areas) Winder Screw – send messages in regular mode Preparation for motor actions timeouts Preparations for control debug Heaters: bug fix, enlarge PID start region IDS: • Dispenser time out between motor operation and valve operation (start->open. Close->stop). • Dispenser homing backlash – to pressure above limit (currently 0.1 for machines without mixer) or timeout (10 seconds). State machine – Suspend Large Messages cancelled. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 3b9311b77..73eb6ea30 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -106,7 +106,7 @@ uint32_t Winder_Prepare(void) //REPORT_MSG(ScrewSpeed, "Winder_Prepare"); Winder_ScrewHoming = true; //REPORT_MSG(MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, "Winder_Prepare move to limit"); - status = MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, ScrewSpeed, GPI_LS_SCREW_RIGHT, Winder_PrepareStage2); + status = MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, ScrewSpeed, GPI_LS_SCREW_RIGHT, Winder_PrepareStage2,2000); } return status; } @@ -125,7 +125,7 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) //REPORT_MSG(numOfSteps, "Winder_PrepareStage2"); REPORT_MSG(millisecondCounter/*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].maxfrequency*/, "Winder_PrepareStage2"); - status |= MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_SCREW, (1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize),numOfSteps, Winder_ScrewAtOffsetCallback); + status |= MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_SCREW, (1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize),numOfSteps, Winder_ScrewAtOffsetCallback,1000); //set motor location 0 here return status; @@ -225,7 +225,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) }*/ Averagewinderspeed = TotalWinderSpeed/MAX_WINDER_SPEED_CALCULATION; //REPORT_MSG(winderspeed, "WinderSpeedUpdated"); - Report("WinderSpeedUpdated",__FILE__,__LINE__,TotalWinderSpeed,RpWarning,Averagewinderspeed,0); + //Report("WinderSpeedUpdated",__FILE__,__LINE__,TotalWinderSpeed,RpWarning,Averagewinderspeed,0); WinderReferenceSpeed = Averagewinderspeed; } @@ -243,11 +243,11 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) ScrewRunningTime = temp;//(SYS_CLK_FREQ*Steps)/ScrewSpeed; //ROM_IntMasterEnable(); //usnprintf(TempScrewStr, 100, "Winder: Horizon,Rotation, PPR, RPP{ %d, %d ,%d, %d} ",(int)screw_horizontal_speed,(int)RotationsPerSecond,(int)InternalWinderCfg.NumberOfRotationPerPassage,(int)MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_WINDER].pulseperround); - usnprintf(ScrewStr, 100, "Winder: Steps,Speed, Time, WinderSpeed{ %d, %d ,%d, %d} ",(int)ScrewNumberOfSteps,(int)ScrewSpeed,(int)temp,(int)WinderReferenceSpeed); + //usnprintf(ScrewStr, 100, "Winder: Steps,Speed, Time, WinderSpeed{ %d, %d ,%d, %d} ",(int)ScrewNumberOfSteps,(int)ScrewSpeed,(int)temp,(int)WinderReferenceSpeed); // Report(logmsg[index],__FILE__,__LINE__,index,RpWarning,index, Counter[index]); // #warning PID is now only proportional (above) //Report(TempScrewStr,__FILE__,__LINE__,0,RpWarning,0, 0); - Report(ScrewStr,__FILE__,__LINE__,ScrewCurrentDirection,RpWarning,CalculationDirectionChangeCounter, 0); + //Report(ScrewStr,__FILE__,__LINE__,ScrewCurrentDirection,RpWarning,CalculationDirectionChangeCounter, 0); //REPORT_MSG(temp , "new winder speed"); //Report("new winder speed",__FILE__,__LINE__,temp,RpWarning,ScrewSpeed,0); } @@ -341,7 +341,7 @@ uint32_t Winder_End(void) CurrentControlledSpeed[SCREW_MOTOR] = 0; ScrewsStopControlTimer(); //move the cart to the edge so the spool can be easily replaced - MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, 1000, GPI_LS_SCREW_RIGHT, NULL); + MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, 1000, GPI_LS_SCREW_RIGHT, NULL,0); return OK; } -- cgit v1.3.1