diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-24 18:27:19 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-11-24 18:27:19 +0200 |
| commit | f95ad012ba68f1b025654925ca17d199d653a41c (patch) | |
| tree | 5a64e7ba0544738586abd86c86874f2fb6e8085c /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 7c02160e97932c8707d82f90c39c3994d22c6ef1 (diff) | |
| download | Tango-f95ad012ba68f1b025654925ca17d199d653a41c.tar.gz Tango-f95ad012ba68f1b025654925ca17d199d653a41c.zip | |
fix error in winder (job start with screw at limit), RFID tracing. RFID init from main (not in task). FIX A BAD BUG IN ALARM HANDLING
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; } /* |
