diff options
| author | Avi Levkovich <avi@twine-s.com> | 2019-04-02 12:01:11 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2019-04-02 12:01:11 +0300 |
| commit | a4762610872f6f7cce5f9cf7c27b914c010d5f10 (patch) | |
| tree | 3a6d70a836545c40c6849083ebeddf90d3b13395 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 2899dfcb9f61333dec6cfd12afbbdbc7df258cfe (diff) | |
| parent | 00580a4427db98910a5ea82a525656dc68c4e86f (diff) | |
| download | Tango-a4762610872f6f7cce5f9cf7c27b914c010d5f10.tar.gz Tango-a4762610872f6f7cce5f9cf7c27b914c010d5f10.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
3 files changed, 23 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index 74a07e99c..53ab0e8a2 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -200,6 +200,11 @@ } uint8_t CallbackCounter = 0; uint8_t TimeoutsCounter = 0; + uint8_t LeftMicrostepKeep = 0; + uint8_t LeftkvalKeep = 0; + uint8_t RightMicrostepKeep = 0; + uint8_t RightkvalKeep = 0; + uint32_t Thread_Load_HomingCallback(uint32_t MotorId, uint32_t ReadValue) { Report("Thread Load State Machine Callback.",__FILE__,__LINE__,LoadStages,RpMessage,NumberOfDrierLoaderCycles,0); @@ -222,6 +227,13 @@ else { LoadStages++; + if (LoadStages == THREAD_LOAD_LIFT_ROCKERS) + { + MotorSetMicroStep(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, RightMicrostepKeep); + MotorSetMicroStep(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, LeftMicrostepKeep); + //MotorSetKvalRun(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, RightkvalKeep); + //MotorSetKvalRun(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, LeftkvalKeep); + } if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this stage we should wait for user call { //ThreadLoadStateMachine(LoadStages); @@ -270,6 +282,15 @@ //Machine Is Ready. Send Message, Start Timer To Close Lids, Wait For Operator Response { REPORT_MSG(LoadStages, "Thread Load State Machine step"); + LeftMicrostepKeep = MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].microstep; + LeftkvalKeep = MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].kvalrun; + RightMicrostepKeep = MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].microstep; + RightkvalKeep = MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].kvalrun; + MotorSetMicroStep(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 1); + MotorSetMicroStep(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 1); + //MotorSetKvalRun(HARDWARE_MOTOR_TYPE__MOTO_RLOADING, 35); + //MotorSetKvalRun(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 35); + Task_sleep(10); CallbackCounter++; MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_RLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RLOADING].directionthreadwize, 300, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_RLOADING], Thread_Load_HomingCallback,12000); CallbackCounter++; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index faee55608..d8564963c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -454,7 +454,7 @@ void ScrewTimerInterrupt(int ARG0) TimerDisable(Screw_timerBase, TIMER_A); } ROM_IntMasterEnable(); - Rotations+=0.1; + Rotations+=0.03; /*random++; if (random >= 2) random = -1;*/ diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 4131fbca5..9f5ece15a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -751,7 +751,7 @@ uint32_t ThreadPreSegmentState(void *SegmentDetails, uint32_t SegmentId) //wait for all motors to get to the required speed (set the target speed for the control to check) //call the job state machine when the thread system is ready if ((InitialProcess==false) && (EnableIntersegment == true) && (IntersegmentLength >= 1.0)) //fix - avoid intersegment length 0 - { + {//add initial presegment and cleaning before first segment ThreadUpdateProcessLength (IntersegmentLength,(void *)ThreadInterSegmentEnded); REPORT_MSG (IntersegmentLength," ThreadPreSegmentState IntersegmentLength"); } |
