aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-06-07 16:28:45 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-06-07 16:28:45 +0300
commit22eaa079a4bd20c81d221b2fa623756fc338e168 (patch)
treeb1158f5d125f4b1cdc9b1c180200148377bbad9e /Software/Embedded_SW/Embedded/Modules/Thread
parent4ae18ae6866056b9cb385b97f65a40e336402e18 (diff)
downloadTango-22eaa079a4bd20c81d221b2fa623756fc338e168.tar.gz
Tango-22eaa079a4bd20c81d221b2fa623756fc338e168.zip
thread loading messages 1
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
index a91781ce4..61ceb0813 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/ThreadLoad.c
@@ -50,20 +50,20 @@
//#include <stdint.h>
//#include <stdbool.h>
static char* LoadStagesStr[15] = {
- /*00*/ "INIT",
- /*01*/ "REDUCE_HEAT",
- /*02*/ "LIFT_ROCKERS",
- /*03*/ "SET_LOAD_ARM",
- /*04*/ "OPEN_COVERS",
- /*05*/ "LIFT_DANCERS",
- /*06*/ "INITIAL_TENSION",
- /*07*/ "CLOSE_ROCKERS",
- /*08*/ "CLOSE_DANCERS",
- /*09*/ "CLOSE_LIDS",
- /*10*/ "JOG_FEEDER",
- /*11*/ "DRYER_LOADING",
- /*12*/ "RESUME_HEATING",
- /*13*/ "JOG_THREAD" ,
+ /*00*/ "Initialization",
+ /*01*/ "heating stop",
+ /*02*/ "Rockers opening",
+ /*03*/ "Drier unloading",
+ /*04*/ "Lids opening",
+ /*05*/ "Dancers opening",
+ /*06*/ "Initial tension building",
+ /*07*/ "Rockers closing",
+ /*08*/ "Dancers closing",
+ /*09*/ "Lids closing",
+ /*10*/ "Feeder jogging",
+ /*11*/ "Drier loading",
+ /*12*/ "Heating resuming",
+ /*13*/ "Thread jogging" ,
/*14*/ "END"};
/* typedef enum
@@ -284,7 +284,7 @@
{
TimeoutsCounter = 0;
load.color = fastBILNK;
- usnprintf(LoadErrorMsg, 100, "Load sequence timeout %s motor %d",LoadStagesStr[LoadStages], MotorId);
+ usnprintf(LoadErrorMsg, 100, "Stage %s - motor %s timeout",LoadStagesStr[LoadStages], MotorStr[MotorId]);
Report(LoadErrorMsg,__FILE__,__LINE__,LoadStages,RpWarning,TimeoutsCounter,0);
LoadStatus = ERROR;
@@ -493,7 +493,7 @@
if (HandleProcessParameters(&ProcessParametersRecover,false)!= OK)
{
- usnprintf(LoadErrorMsg, 100, "Load sequence error %d",LoadStagesStr[LoadStages]);
+ usnprintf(LoadErrorMsg, 100, "Stage %s error",LoadStagesStr[LoadStages]);
Report(LoadErrorMsg,__FILE__,__LINE__,LoadStages,RpWarning,TimeoutsCounter,0);
}
else
@@ -617,8 +617,9 @@
Report("Store Number of cycles in drier - halted",__FILE__,__LINE__,numberOfCycles,RpMessage,LoadArmRounds,0);
MCU_E2PromProgram(EEPROM_STORAGE_DRYER_CYCLES,numberOfCycles);
TimeoutsCounter = 0;
+ CallbackCounter = 0;
load.color = fastBILNK;
- usnprintf(LoadErrorMsg, 100, "Load sequence timeout %s motor %d",LoadStagesStr[LoadStages], HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM);
+ usnprintf(LoadErrorMsg, 100, "Stage %s - Drier load arm timeout",LoadStagesStr[LoadStages]);
Report(LoadErrorMsg,__FILE__,__LINE__,LoadStages,RpWarning,TimeoutsCounter,0);
LoadStatus = ERROR;
MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM, 200);
@@ -834,7 +835,7 @@
MotorStop(HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING,Hard_Hiz);
MotorStop(HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM,Hard_Stop);
load.color = fastBILNK;
- usnprintf(LoadErrorMsg, 100, "Load sequence timeout %s motor %d",LoadStagesStr[LoadStages], HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM);
+ usnprintf(LoadErrorMsg, 100, "Stage %s - Drier load arm timeout",LoadStagesStr[LoadStages]);
Report(LoadErrorMsg,__FILE__,__LINE__,LoadStages,RpWarning,TimeoutsCounter,0);
Report("Drier unloading timeout(1) or no movement",__FILE__,temp,DrierPrevLocation,RpWarning,ReadValue,0);
LoadStatus = ERROR;
@@ -950,6 +951,8 @@
{
REPORT_MSG(ReadValue,"ThreadLoadStateMachine");
ThreadLoaded();
+ ThreadLoadingReport();
+
if (LoadStages!=ReadValue)
LoadStages = ReadValue;
switch (ReadValue)
@@ -1038,6 +1041,7 @@
LOG_ERROR(LoadStages,"ERROR IN LOAD STATE MACHINE");
break;
}
+
return OK;
}
uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue)
@@ -1054,6 +1058,7 @@ uint32_t ThreadLoadButton(THREAD_LOAD_STAGES_ENUM ReadValue)
}
Report("ThreadLoadButton",__FILE__,__LINE__,LoadStages,RpMessage,ReadValue,0);
Report("ThreadLoadButton params",__FILE__,LoadStatus,TryAgain,RpMessage,SecondTry,0);
+ ThreadLoadingReport();
if (LoadStatus == ERROR)
{
if ((SecondTry == false)&&(TryAgain == true))