diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-06-28 17:02:53 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-06-28 17:02:53 +0300 |
| commit | 4d3782e72e3bc9db6aab280abe7dd8c9cc2b5dbe (patch) | |
| tree | d84d5be0167fa282bcd09c703fd547133aff7753 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | d057362f6b686794534eace6f6f738ef4393f6ae (diff) | |
| parent | 3d6d6436378270961c571602d84bff870162b3af (diff) | |
| download | Tango-4d3782e72e3bc9db6aab280abe7dd8c9cc2b5dbe.tar.gz Tango-4d3782e72e3bc9db6aab280abe7dd8c9cc2b5dbe.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h | 1 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 5c9b360f6..4081b53f2 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -23,6 +23,7 @@ typedef enum threadMotorsEnum extern double TotalProcessedLength; extern double PoolerTotalProcessedLength; +extern int SecondFeederCorrection; void ThreadSetBreakSensorLimit(int limit); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 21211481e..8a4960433 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -846,15 +846,22 @@ uint32_t Release_Right_TFU_Tension() return status; } +int SecondFeederCorrection = 4; uint32_t Adjust_Right_TFU_Tension_2nd_Callback(uint32_t MotorId, uint32_t ReadValue) { - Report("Adjust_Right_TFU_Tension_2ndCallback 4 more steps",__FILE__,__LINE__,MotorId,RpMessage,0,0); + MotorStop (HARDWARE_MOTOR_TYPE__MOTO_RDANCER,Soft_Stop); //per L6470 errata between mov and run commands + Report("Adjust_Right_TFU_Tension_2ndCallback x more steps",__FILE__,__LINE__,MotorId,RpMessage,SecondFeederCorrection,0); + if (JobIsActive()==false) + { + Report("release tension - job aborted",__FILE__,__LINE__,MotorId,RpMessage,0,0); + Release_Right_TFU_Tension(); + } return OK; } uint32_t Adjust_Right_TFU_Tension_Callback(uint32_t MotorId, uint32_t ReadValue) { Report("Adjust_Right_TFU_Tension_Callback",__FILE__,__LINE__,MotorId,RpMessage,0,0); - MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RDANCER, 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize,4* MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].microstep, Release_Right_TFU_TensionCallback,1000); + MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_RDANCER, 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize,SecondFeederCorrection* MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].microstep, Adjust_Right_TFU_Tension_2nd_Callback,1000); RTFU_Up = true; return OK; } |
