aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-08-10 12:30:50 +0300
committerShlomo Hecht <shlomo@twine-s.com>2020-08-10 12:30:50 +0300
commit71b6596e53b93e9c55195b3edcf2d35e80bb7242 (patch)
treeb9de7190e8641260c453118afde2c713c38af89c /Software/Embedded_SW/Embedded
parent41f960a47a79f13a2a741f30cfa9441ad2392872 (diff)
downloadTango-71b6596e53b93e9c55195b3edcf2d35e80bb7242.tar.gz
Tango-71b6596e53b93e9c55195b3edcf2d35e80bb7242.zip
fix TFU tension handling. small fix in waste handling
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c2
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c20
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c8
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/Safety.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c22
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c2
6 files changed, 35 insertions, 23 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
index 1045fe792..06a4ed090 100644
--- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
+++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c
@@ -20,7 +20,7 @@ typedef struct
} TangoVersion_t;
-TangoVersion_t _gTangoVersion = {1,4,6,39};
+TangoVersion_t _gTangoVersion = {1,4,6,40};
#define BUILD_DATE __DATE__
char Dat[50] = BUILD_DATE;
char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//e
diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c
index 6e0deec97..419c34985 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Motors/MotorActions.c
@@ -447,14 +447,24 @@ uint32_t MotorMoveCallBackFunction(uint32_t IfIndex, uint32_t BusyFlag) //TODO
MotorId = IfIndex;
CallbackCalls++;
- if (CallbackCalls%200 == 0)
+ if (MotorId ==HARDWARE_MOTOR_TYPE__MOTO_DRYER_LOADARM)
{
- Read_Dryer_ENC_Position();
+ if (CallbackCalls%200 == 0)
+ {
+ Read_Dryer_ENC_Position();
+ }
+ if (CallbackCalls%200 == 1)
+ {
+ MotorId = Read_Dryer_ENC_Position(0,0);
+ Report("MotorMoveCallBackFunction",__FILE__,__LINE__,DrierZeroPosition,RpWarning,MotorId,0);
+ }
}
- if (CallbackCalls%200 == 1)
+ else
{
- MotorId = Read_Dryer_ENC_Position(0,0);
- Report("MotorMoveCallBackFunction",__FILE__,__LINE__,DrierZeroPosition,RpWarning,MotorId,0);
+ if (CallbackCalls%100 == 1)
+ {
+ Report("MotorMoveCallBackFunction",__FILE__,MotorId,MotorTimeout[MotorId],RpWarning,MotorTimeLimit[MotorId],0);
+ }
}
MotorTimeout[MotorId]+=MotorTimeLag[MotorId];
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 242bdc3ce..327b5d19b 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -804,10 +804,10 @@ uint32_t MillisecLowLoop(uint32_t tick)
}
if (TenMinutes_Tick)
{
- if (WHS_Type == WHS_TYPE_NEW)
+ /*if (WHS_Type == WHS_TYPE_NEW)
{
waste_seq_step1();// include 1Sec delay <- to open !!!!
- }
+ }*/
}
if (OneHourTick)
{
@@ -819,10 +819,10 @@ uint32_t MillisecLowLoop(uint32_t tick)
PumpCounter = 0;
}
MidTankReading();
- /*if (WHS_Type == WHS_TYPE_NEW)
+ if (WHS_Type == WHS_TYPE_NEW)
{
waste_seq_step1();// include 1Sec delay <- to open !!!!
- }*/
+ }
//Trigger_WHS_MAX11614_Read_Gas_Sensor();
}
//ROM_IntMasterEnable();
diff --git a/Software/Embedded_SW/Embedded/Modules/General/Safety.c b/Software/Embedded_SW/Embedded/Modules/General/Safety.c
index 099ac1769..422b4745f 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/Safety.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/Safety.c
@@ -234,12 +234,12 @@ uint32_t Safety_Main_State(uint32_t IfIndex, uint32_t BusyFlag)
AlarmHandlingSetAlarm(EVENT_TYPE__AIR_FILTER_NOT_INSTALLED, false);
AirFilterAlarmState = mAirFilterAlarmState;
}
- if ((mWasteOverflowAlarmState != WasteOverflowAlarmState)|| (mWasteOverflowAlarmState == false))
+ /*if ((mWasteOverflowAlarmState != WasteOverflowAlarmState)|| (mWasteOverflowAlarmState == false))
{
//alarm went off
AlarmHandlingSetAlarm(EVENT_TYPE__WASTE_CONTAINER_OVERFLOW, false);
WasteOverflowAlarmState = mWasteOverflowAlarmState;
- }
+ }*/
#ifdef CONTROL_DEBUG
tempq = HibernateRTCSSGet();
if (tempq < tempp)
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index e489f78ff..2bdf1b17f 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -892,7 +892,7 @@ uint32_t Adjust_Right_TFU_Tension(double tension)
{
PrepareWaitCount++;
MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_RDANCER,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize, 15, GPI_LS_RDANCER_UP, Adjust_Right_TFU_Tension_Callback,15000);
- Report("Adjust_Right_TFU_Tension",__FILE__,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize,HARDWARE_MOTOR_TYPE__MOTO_RDANCER,RpMessage,GPI_LS_RDANCER_UP,0);
+ Report("Adjust_Right_TFU_Tension",__FILE__,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize,HARDWARE_MOTOR_TYPE__MOTO_RDANCER,RpMessage,PrepareWaitCount,0);
}
}
@@ -947,7 +947,6 @@ uint32_t ThreadPrepare_Tension (int DancerId, double tension)
return status;
else
{
- PrepareWaitCount++;
if (current < request) //go down
{
direction = MotorsCfg[HW_Motor_Id].directionthreadwize;
@@ -958,21 +957,23 @@ uint32_t ThreadPrepare_Tension (int DancerId, double tension)
direction = 1-MotorsCfg[HW_Motor_Id].directionthreadwize;
movement = current - request;
}
- MotorSetMaxSpeed (HW_Motor_Id, 500);
+ MotorSetMaxSpeed (HW_Motor_Id, 800);
MotorMoveWithCallback (HW_Motor_Id, direction, (movement*MotorsCfg[HW_Motor_Id].microstep), ThreadPrepare_TensionCallback,20000);
+ PrepareWaitCount++;
+ ReportWithPackageFilter(ThreadFilter,"PrepareWaitCount",__FILE__,PrepareWaitCount,current,RpWarning,request,0);
status |= MCU_E2PromProgram(address,request);
}
if (DancerId == HARDWARE_DANCER_TYPE__LeftDancer)
{
- usnprintf(Lenstr, 100, "ThreadPrepare_Tension Dancer %d Request: %d Current %d movement %d dir %d motor %d address %d",
- DancerId,request,current,movement,direction,HW_Motor_Id,address);
+ usnprintf(Lenstr, 100, "ThreadPrepare_Tension Dancer %d Request: %d Current %d movement %d dir %d motor %d address %d call %d",
+ DancerId,request,current,movement,direction,HW_Motor_Id,address,PrepareWaitCount);
ReportWithPackageFilter(ThreadFilter,Lenstr,__FILE__,address,current,RpWarning,request,0);
}
else
{
- usnprintf(TMessage, 100, "ThreadPrepare_Tension Dancer %d Request: %d Current %d movement %d dir %d motor %d address %d",
- DancerId,request,current,movement,direction,HW_Motor_Id,address);
+ usnprintf(TMessage, 100, "ThreadPrepare_Tension Dancer %d Request: %d Current %d movement %d dir %d motor %d address %d call %d",
+ DancerId,request,current,movement,direction,HW_Motor_Id,address,PrepareWaitCount);
ReportWithPackageFilter(ThreadFilter,TMessage,__FILE__,address,current,RpWarning,request,0);
}
@@ -1010,12 +1011,13 @@ uint32_t ThreadPrepareState(void *JobDetails)
EnableIntersegment = JobTicket->enableintersegment;
IntersegmentLength = JobTicket->intersegmentlength;
+ PrepareWaitCount = 0;
status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__LeftDancer, windertension);
- ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension",__FILE__,HARDWARE_DANCER_TYPE__LeftDancer,status,RpFatalError,(int)windertension,0);
+ ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Winder",__FILE__,HARDWARE_DANCER_TYPE__LeftDancer,PrepareWaitCount,RpFatalError,(int)windertension,0);
status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__MiddleDancer, pullertension);
- ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension",__FILE__,HARDWARE_DANCER_TYPE__MiddleDancer,status,RpFatalError,(int)pullertension,0);
+ ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Puller",__FILE__,HARDWARE_DANCER_TYPE__MiddleDancer,PrepareWaitCount,RpFatalError,(int)pullertension,0);
status = ThreadPrepare_Tension (HARDWARE_DANCER_TYPE__RightDancer, feedertension);
- ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension",__FILE__,HARDWARE_DANCER_TYPE__RightDancer,status,RpFatalError,(int)feedertension,0);
+ ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_Tension Feeder",__FILE__,HARDWARE_DANCER_TYPE__RightDancer,PrepareWaitCount,RpFatalError,(int)feedertension,0);
FirstCalcInJob = true;
if(MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDRIVING].speedmaster == false)
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
index 30e43fe99..815b153d1 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/InitSequence.c
@@ -592,7 +592,7 @@ uint32_t InitSequenceStartHeating(void)
SetMachineReadyForHeating(true);
HeadCard_Actuators_Relocate();
//SetMachineStatus(MACHINE_STATE__Ready); //prevent job while waiting for the cooler
-
+ waste_seq_step1();
if (InitialHeating)
{
if (ProcessParamsInit() ==OK)