aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-09-02 16:40:47 +0300
committerAvi Levkovich <avi@twine-s.com>2020-09-02 16:40:47 +0300
commit8f0eace3025247902ae61ccf5cb5c38944745f84 (patch)
treeb8f82475fbc8ed719f3725f3a71227bbdec7e97e /Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
parent7390afe73ac4844291632ae89b5ab1fbe7ab9271 (diff)
parent665d43a1b557e61d94ef194cfb99ef1b4686b2e0 (diff)
downloadTango-8f0eace3025247902ae61ccf5cb5c38944745f84.tar.gz
Tango-8f0eace3025247902ae61ccf5cb5c38944745f84.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index e986c1756..bc240cd0f 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);
@@ -722,7 +722,7 @@
MotorControlConfig[FEEDER_MOTOR].m_params.MIN = MotorsControl[FEEDER_MOTOR].outputproportionalpowerlimit*-1;
MotorControlConfig[FEEDER_MOTOR].m_params.Kd = MotorsControl[FEEDER_MOTOR].derivativetime;
MotorControlConfig[FEEDER_MOTOR].m_params.Kp = MotorsControl[FEEDER_MOTOR].proportionalgain;
- MotorControlConfig[FEEDER_MOTOR].m_params.Ki = MotorsControl[FEEDER_MOTOR].integraltime;
+ MotorControlConfig[FEEDER_MOTOR].m_params.Ki = 0;//MotorsControl[FEEDER_MOTOR].integraltime;
MotorControlConfig[FEEDER_MOTOR].m_params.IntegralErrorMultiplier = MotorsControl[FEEDER_MOTOR].setpointramprateorsoftstartramp;
MotorControlConfig[FEEDER_MOTOR].m_params.ProportionalErrorMultiplier = MotorsControl[FEEDER_MOTOR].outputonoffhysteresisvalue;
MotorControlConfig[FEEDER_MOTOR].m_params.epsilon = MotorsControl[FEEDER_MOTOR].epsilon;
@@ -759,6 +759,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");
@@ -766,6 +767,7 @@
LoadingControlId = 0xFF;
ThreadAbortJoggingFunc();
LoadStages++;
+ ProcessParametersKeep.feedertension = keepfeedertension;
ThreadLoadStateMachine(LoadStages);
return OK;
}
@@ -773,6 +775,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;