aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-07-24 14:03:35 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-07-24 14:03:35 +0300
commit1a4e2e8a731c7d4c6150de73b36b7c40d6422cd7 (patch)
treea211d3fdbe6dc8e98a14a50b4d7d2161bbc91a4f /Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
parent17a32af2a2500d6da0e59d3085ddfd43d0ee5270 (diff)
downloadTango-1a4e2e8a731c7d4c6150de73b36b7c40d6422cd7.tar.gz
Tango-1a4e2e8a731c7d4c6150de73b36b7c40d6422cd7.zip
Version 1.4.2.5 firmware upgrade works, improved thread load. (works????)
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index d2f6170cf..837221274 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
@@ -146,7 +146,7 @@
Control_Voltage_To_Blower(BlowerCfg.voltage-500);
Control_Dryer_Fan(STOP,75);//use START or STOP, 0 - 100%
LoadStages++;
- //ThreadLoadStateMachine(LoadStages);
+ ThreadLoadStateMachine(LoadStages);
}
return OK;
}
@@ -167,7 +167,7 @@
//storeLoadArmParameters();
SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM); //set this point as the spool home
LoadStages++;
- //ThreadLoadStateMachine(LoadStages);
+ ThreadLoadStateMachine(LoadStages);
}
return OK;
}
@@ -198,7 +198,7 @@
LoadStages++;
SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM); //set this point as the spool home
- //ThreadLoadStateMachine(LoadStages);
+ ThreadLoadStateMachine(LoadStages);
return OK;
}
uint32_t Thread_Load_Set_Load_Arm_To_Start_Position(void)
@@ -258,7 +258,7 @@
}
if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this stage we should wait for user call
{
- //ThreadLoadStateMachine(LoadStages);
+ ThreadLoadStateMachine(LoadStages);
}
}
}
@@ -379,7 +379,7 @@
{
Control_Dryer_Fan(START,75);//use START or STOP, 0 - 100%
LoadStages++;
- //ThreadLoadStateMachine(LoadStages);
+ ThreadLoadStateMachine(LoadStages);
}
return OK;
}
@@ -394,14 +394,7 @@
uint32_t Thread_Load_Dryer_MovetoEncoderPosition_Callback(uint32_t MotorId, uint32_t ReadValue)
{
- if(ControlId != 0xFF)
- {
- MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz);
- RemoveControlCallback(ControlId, ThreadLoadControlCBFunction );
- MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM].pulseperround);
-
- ControlId = 0xFF;
- }
+ MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, 200);
if (CallbackCounter)
{
CallbackCounter--;
@@ -410,7 +403,7 @@
LoadStages++;
if (LoadStages != THREAD_LOAD_INITIAL_TENSION) //on this satge we should wait for user call
{
- //ThreadLoadStateMachine(LoadStages);
+ ThreadLoadStateMachine(LoadStages);
}
}
}
@@ -421,6 +414,12 @@
uint32_t Thread_Load_Dryer_Loading_Callback(uint32_t MotorId, uint32_t ReadValue)
{
Report("Thread Load State Machine Callback.",__FILE__,__LINE__,LoadStages,RpMessage,NumberOfDrierLoaderCycles,0);
+ if(ControlId != 0xFF)
+ {
+ MotorStop(ThreadMotorIdToMotorId[FEEDER_MOTOR],Hard_Hiz);
+ RemoveControlCallback(ControlId, ThreadLoadControlCBFunction );
+ ControlId = 0xFF;
+ }
//REPORT_MSG(MotorId, "Thread_Load_Dryer_Loading_Callback Motor Id");
MotorMovetoEncoderPosition(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Thread_Load_Dryer_MovetoEncoderPosition_Callback,10000);
return OK;
@@ -477,7 +476,7 @@
ControlId = 0xFF;
ThreadAbortJoggingFunc();
LoadStages++;
- //ThreadLoadStateMachine(LoadStages);
+ ThreadLoadStateMachine(LoadStages);
return OK;
}
uint32_t Thread_Load_Jog_Thread(void)
@@ -632,6 +631,7 @@
Thread_Load_Jog_Thread();
break;
case THREAD_LOAD_END:
+ LoadStages = THREAD_LOAD_END;
Thread_Load_End();
break;
default: