diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-01-09 10:42:14 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-01-09 10:42:14 +0200 |
| commit | d50d729a2b7d45ca4b22df7ff0d8823825c479b6 (patch) | |
| tree | b6ac5a0813c4b76d43ad3af1d56ac8a44361dd7f /Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | |
| parent | aeebb8d47e1d78b50d9ae5afd9df6eaf9765ed87 (diff) | |
| download | Tango-d50d729a2b7d45ca4b22df7ff0d8823825c479b6.tar.gz Tango-d50d729a2b7d45ca4b22df7ff0d8823825c479b6.zip | |
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.
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |
