diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-25 00:43:57 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-25 00:43:57 +0200 |
| commit | af90e25fe8e89cdf6a19b24aefb6c2a30fd2b67a (patch) | |
| tree | 612446d21fe735316affd78ddd640fc2f6a197c9 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 24bc7677e625a6f6535cd473362e50939da532a1 (diff) | |
| parent | a4a8f6c316e4d6b2f08f7b65cecfe50930ecf019 (diff) | |
| download | Tango-af90e25fe8e89cdf6a19b24aefb6c2a30fd2b67a.tar.gz Tango-af90e25fe8e89cdf6a19b24aefb6c2a30fd2b67a.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_Winder.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 8ecb3f404..011488c49 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -221,6 +221,7 @@ uint32_t Winder_Prepare(void *JobDetails) { //REPORT_MSG(LIMIT, "Winder_Prepare at limit"); Winder_PrepareStage2(0,0); + Screw_wait_counter=1; } else { @@ -229,15 +230,42 @@ uint32_t Winder_Prepare(void *JobDetails) //REPORT_MSG(MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, "Winder_Prepare move to limit"); Screw_wait_counter=1; status = MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, ScrewSpeed, GPI_LS_SCREW_RIGHT, Winder_PrepareStage2,2000); + } #ifdef FOUR_WINDERS + if (FPGA_Read_limit_Switches(GPI_LS_SPARE2_2)==LIMIT) + { + Winder_PrepareStage2(0,0); + Screw_wait_counter++; + } + else + { + Winder_ScrewHoming = true; Screw_wait_counter++; status = MotorMovetoLimitSwitch (SCREW_2_Motor,MotorsCfg[SCREW_2_Motor].directionthreadwize, ScrewSpeed, GPI_LS_SPARE2_2, Winder_PrepareStage2,2000); + } + if (FPGA_Read_limit_Switches(GPI_LS_SPARE1_2)==LIMIT) + { + Winder_PrepareStage2(0,0); + Screw_wait_counter++; + } + else + { + Winder_ScrewHoming = true; Screw_wait_counter++; status = MotorMovetoLimitSwitch (SCREW_3_Motor,MotorsCfg[SCREW_3_Motor].directionthreadwize, ScrewSpeed, GPI_LS_SPARE1_2, Winder_PrepareStage2,2000); + } + if (FPGA_Read_limit_Switches(GPI_LS_RDANCER_UP)==LIMIT) + { + Winder_PrepareStage2(0,0); + Screw_wait_counter++; + } + else + { + Winder_ScrewHoming = true; Screw_wait_counter++; status = MotorMovetoLimitSwitch (SCREW_4_Motor,MotorsCfg[SCREW_4_Motor].directionthreadwize, ScrewSpeed, GPI_LS_RDANCER_UP, Winder_PrepareStage2,2000); -#endif } +#endif return status; } /* |
