diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-06-28 18:25:11 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-06-28 18:25:11 +0300 |
| commit | eff63ca3c731160af00f8385771fbdbdeed0ceaf (patch) | |
| tree | 1de7c4b74c962456b0b49b38c07bca0bb75aa38e /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | c587838a72f27d2b21584a782b58f03137e42391 (diff) | |
| parent | 4d3782e72e3bc9db6aab280abe7dd8c9cc2b5dbe (diff) | |
| download | Tango-eff63ca3c731160af00f8385771fbdbdeed0ceaf.tar.gz Tango-eff63ca3c731160af00f8385771fbdbdeed0ceaf.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_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; } |
