diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-19 11:52:26 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-19 11:52:26 +0200 |
| commit | 98daf1c80688585d2a34586c30a7ac0bf67dd91b (patch) | |
| tree | 07a2855bef78de5bbc23f75e2481eb01d26b08af /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 06358c97b9fc5e20a25a3035dc4c2f0e0ec8a4c1 (diff) | |
| download | Tango-98daf1c80688585d2a34586c30a7ac0bf67dd91b.tar.gz Tango-98daf1c80688585d2a34586c30a7ac0bf67dd91b.zip | |
PreVersion 1.3.8.1 lubrication, IDS presegment improvement start. alarm handling improved, pressure buildup on init, improve centering of drier arm. NON Operative, NOT TESTED!
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
3 files changed, 17 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c index ff319918e..74a07e99c 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c @@ -357,6 +357,7 @@ { Report("Thread Load State Machine Callback.",__FILE__,__LINE__,LoadStages,RpMessage,NumberOfDrierLoaderCycles,0); REPORT_MSG(MotorId, "Thread_Load_Dryer_Loading_Callback Motor Id"); + MotorMovetoEncoderPosition(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,0,0); if(ControlId != 0xFF) { MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 0277d1daa..ddcba57bc 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -137,8 +137,16 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,InternalWinderCfg.segmentoffsetpulses); //REPORT_MSG(numOfSteps, "Winder_PrepareStage2"); REPORT_MSG(millisecondCounter/*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].maxfrequency*/, "Winder_PrepareStage2"); - - status |= MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_SCREW, (1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize),numOfSteps, Winder_ScrewAtOffsetCallback,1000); + if (ReadValue != LIMIT) + { + LOG_ERROR(ReadValue,"Screw failed to reach the limit switch!!"); + //returned with a timeout + Winder_ScrewAtOffsetCallback(0,0); + } + else + { + status |= MotorMoveWithCallback(HARDWARE_MOTOR_TYPE__MOTO_SCREW, (1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize),numOfSteps, Winder_ScrewAtOffsetCallback,1000); + } //set motor location 0 here return status; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index 6a8474438..a6ca46246 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -30,6 +30,7 @@ #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "modules/heaters/heaters.h" #include "modules/General/process.h" +#include "modules/ids/ids_ex.h" #include "Modules/AlarmHandling/AlarmHandling.h" #include "Control/MillisecTask.h" @@ -708,6 +709,10 @@ uint32_t ThreadPreSegmentState(void *JobDetails, uint32_t SegmentId) MotorSetDirection((TimerMotors_t)HARDWARE_MOTOR_TYPE__MOTO_LLOADING,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_LLOADING].directionthreadwize); MotorSetSpeed(HARDWARE_MOTOR_TYPE__MOTO_LLOADING, 1); } + if (JobTicket->enablelubrication == true) + { + IDS_StartLubrication(); + } } // activate control fr all motors //set speed for both rocker motors @@ -807,7 +812,7 @@ char Endstr[150]; } MotorStop(HARDWARE_MOTOR_TYPE__MOTO_RLOADING,Hard_Hiz); MotorStop(HARDWARE_MOTOR_TYPE__MOTO_LLOADING,Hard_Hiz); - + IDS_StopLubrication(); return OK; } |
