aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-09-02 12:38:57 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-09-02 12:38:57 +0300
commitbb8b2a7fac772ceb2a163aecb9c854f4fa9013c7 (patch)
treed90f0744473d0f5448845863aeb5039e641afa41 /Software/Embedded_SW/Embedded/Modules
parente00a27ea56222395a08eaaf3256237de9a8c81ee (diff)
downloadTango-bb8b2a7fac772ceb2a163aecb9c854f4fa9013c7.tar.gz
Tango-bb8b2a7fac772ceb2a163aecb9c854f4fa9013c7.zip
thread load: handle safety alarm on head cover better, prevent RTFU arm raising on final jog
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index 84cc5cf20..eb422875f 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
@@ -346,14 +346,6 @@
//HARDWARE_MOTOR_TYPE__MOTO_DH_LID = 2,
//HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID = 4,
//DeActivateHeadMagnet();
- if (Head_Type != HEAD_TYPE_ARC)
- {
- CallbackCounter++;
- if (MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DH_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_LID].directionthreadwize, 300, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DH_LID], Thread_Load_HomingCallback,20000)==ERROR)
- {
- Thread_Load_HomingCallback(HARDWARE_MOTOR_TYPE__MOTO_DH_LID,NO_LIMIT);
- }
- }
CallbackCounter++;
//MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID].directionthreadwize, 200, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000);
int direction;
@@ -366,6 +358,14 @@
direction = DRIER_LID_OPEN;
}
MotorGotoWithCallback(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID, direction, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LID], Thread_Load_HomingCallback,10000);
+ if (Head_Type != HEAD_TYPE_ARC)
+ {
+ CallbackCounter++;
+ if (MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_DH_LID,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DH_LID].directionthreadwize, 300, Motor_Id_to_LS_IdUp[HARDWARE_MOTOR_TYPE__MOTO_DH_LID], Thread_Load_HomingCallback,20000)==ERROR)
+ {
+ Thread_Load_HomingCallback(HARDWARE_MOTOR_TYPE__MOTO_DH_LID,NO_LIMIT);
+ }
+ }
if (Head_Type == HEAD_TYPE_FLAT)
{
Report("Thread_Load_Lift_actuators",__FILE__,__LINE__,LOW,RpMessage,false,0);
@@ -754,6 +754,7 @@
numberOfSteps-800, Thread_Load_Dryer_Loading_Callback, 10000);
return OK;
}
+ double keepfeedertension = 0;
uint32_t Thread_Load_Jog_ThreadStop(uint32_t index, uint32_t ReadValue)
{
REPORT_MSG(LoadStages, "Thread Load State Machine step Thread_Load_Jog_ThreadStop");
@@ -761,6 +762,7 @@
LoadingControlId = 0xFF;
ThreadAbortJoggingFunc();
LoadStages++;
+ ProcessParametersKeep.feedertension = keepfeedertension;
ThreadLoadStateMachine(LoadStages);
return OK;
}
@@ -768,6 +770,8 @@
//Jog Thread Shortly To Make Sure Spool Is Running. Report End Of Loading
{
REPORT_MSG(LoadStages, "Thread Load State Machine step Thread_Load_Jog_Thread");
+ keepfeedertension = feedertension;
+ ProcessParametersKeep.feedertension = 0.0;
ThreadJoggingFunc(20);
LoadingControlId = AddControlCallback("Load jog",Thread_Load_Jog_ThreadStop, eOneSecond*25,Control_Read_Dancer_Position,(IfTypeThread*0x100+FEEDER_MOTOR),FEEDER_DANCER,FEEDER_MOTOR);
return OK;