aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-06-11 18:49:45 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-06-11 18:49:45 +0300
commit0cbf104a30c3f0c4e9dbbe9db47d6ad72df03655 (patch)
tree8e21d12e5d2fef4104c3a0162102ac0ffc93e401 /Software/Embedded_SW/Embedded/Modules
parent9a2594584eced597453edcad95529eb1c5f864e4 (diff)
downloadTango-0cbf104a30c3f0c4e9dbbe9db47d6ad72df03655.tar.gz
Tango-0cbf104a30c3f0c4e9dbbe9db47d6ad72df03655.zip
Embedded SW Release note - Version 1.4.0.9
============================================================= Drivers: Support for PowerStep 01 motor drivers (combined current/voltage) - initialization only Screw encoder reading (requires FPGA firmware update) Motor speeds in float - to enable small speeds. read motor speed from driver. Modules: PID - support small numbers in PID function - thread improved General -Safety alarms (not fully tested) Heaters PID fixed - use band setting for PID start of operation IDS - check that all brushstop data is read before moving to next segment. file initial reading improved. WFCF for active dispenser Thread - Thread control fixed. screw goes home on the last 800 milliseconds Procedures: JOBS units - supported in embedded, waiting for cooperation with APP
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/buttons.c16
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c34
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c4
5 files changed, 47 insertions, 10 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/buttons.c b/Software/Embedded_SW/Embedded/Modules/General/buttons.c
index cfd44a6fa..1c719d778 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/buttons.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/buttons.c
@@ -613,6 +613,22 @@ void Ink_Cart_Led()//temporary for ITMA
{
Pannel_Leds( CART_1, MODE_OFF);
}
+ if(Is_Cartridge_Present(CART_2) == true)
+ {
+ Pannel_Leds( CART_2, MODE_ON);
+ }
+ else
+ {
+ Pannel_Leds( CART_2, MODE_OFF);
+ }
+ if(Is_Cartridge_Present(CART_3) == true)
+ {
+ Pannel_Leds( CART_3, MODE_ON);
+ }
+ else
+ {
+ Pannel_Leds( CART_3, MODE_OFF);
+ }
}
void test_avi()
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 0b54658ad..826a9ff26 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -196,21 +196,25 @@ JobDescriptionFileBrushStop *GetNextBrushStopFromJobFile();
void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop);
*/
- /************************************************************************************************************************************
- uint32_t IDS_MapDispenserUsedinFileJobshort(void *JobDetails)
+ /************************************************************************************************************************************/
+ uint32_t IDS_MapDispenserUsedinFileJob(void *JobDetails)
{
JobTicket* JobTicket = JobDetails;
- JobDescriptionFileBrushStop *BrushStop;
- JobDescriptionFileSegment *Segment;
+ JobDescriptionFileBrushStop *BrushStop = NULL;
+ JobDescriptionFileSegment *Segment = NULL;
int Dispenser_i, Brush_i,DispenserId;
FRESULT Fresult = FR_OK;
uint32_t status = OK;
bool lookForLubrication = false;
+ int brushCounter = 0;
+
+ GeneralHwReady = false;
for (Dispenser_i = 0;Dispenser_i<MAX_SYSTEM_DISPENSERS;Dispenser_i++)
{
DispenserUsedInJob[Dispenser_i] = false;
}
+ n_segments = 0;
if (EnableCleaning == true)
DispenserUsedInJob[CLEANER_DISPENSER] = true;
if (JobTicket->enablelubrication == true)
@@ -225,6 +229,7 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop);
Segment = GetNextSegmentFromJobFile();
while(Segment)
{
+ n_segments++;
if ((Segment->has_brushstopscount)&&(Segment->brushstopscount))
{
for (Brush_i=0;Brush_i<Segment->brushstopscount;Brush_i++)
@@ -232,6 +237,12 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop);
BrushStop = GetNextBrushStopFromJobFile();
if (BrushStop)
{
+ if ((brushCounter % 100)==0)
+ {
+ SendJobProgress(0.0,0,false, "Processing file");
+ Control_WD(ENABLE,55); //activate heaters/dispenser watchdog, 0.5 seconds
+ }
+ brushCounter++;
if (BrushStop->n_dispensers)
{
for (Dispenser_i = 0;Dispenser_i < BrushStop->n_dispensers;Dispenser_i++)
@@ -245,6 +256,9 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop);
{
lookForLubrication = false;
lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse;
+ REPORT_MSG (BrushStop->dispensers[Dispenser_i]->nanolitterpersecond*100, "LUBRICANT nl / sec");
+ REPORT_MSG (BrushStop->dispensers[Dispenser_i]->nanoliterperpulse*100, "LUBRICANT nl / pulse");
+ REPORT_MSG (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision, "step division");
if (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision
!= DISPENSER_STEP_DIVISION__Auto)
{
@@ -281,11 +295,13 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop);
FreeSegmentFileData(Segment);
CloseJobFile();
}
+ GeneralHwReady = true;
+ REPORT_MSG (n_segments, "Finished checking the file");
return status;
}
- *************************************************************************************************************************************/
- /************************************************************************************************************************************/
+ /*************************************************************************************************************************************/
+ /************************************************************************************************************************************
uint32_t IDS_MapDispenserUsedinFileJob(void *JobDetails)
{
JobTicket* JobTicket = JobDetails;
@@ -299,7 +315,7 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop);
FIL *FileHandle = 0; //the system supports a single active file
bool lookForLubrication = false;
int brushCounter = 0;
-/*
+/`*
Parsing the job description file.
The job description file simply contains an array of segments and their brush stops.
The job description file is meant to be read brush stop by brush stop while the job is in progress.
@@ -319,7 +335,7 @@ a. Read brush stop message length.
b. Read brush stop message.
c. Go to step 2.a x Segment.BrushStopsCount.
3. Go to step 1 until end of file.
- */
+ *`/
GeneralHwReady = false;
for (Dispenser_i = 0;Dispenser_i<MAX_SYSTEM_DISPENSERS;Dispenser_i++)
{
@@ -491,7 +507,7 @@ c. Go to step 2.a x Segment.BrushStopsCount.
return status;
}
-/************************************************************************************************************************************/
+************************************************************************************************************************************/
bool IDS_MapDispenserUsedinJob(void *JobDetails)
{
JobTicket* JobTicket = JobDetails;
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index 2bbc93523..297cea44b 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -441,6 +441,7 @@ uint32_t ScrewDTSControlId = 0xFF;
uint32_t WinderDistanceToSpoolEnded(uint32_t deviceID, uint32_t ReadValue)
{
REPORT_MSG ((int)msec_millisecondCounter,"WinderDistanceToSpoolEnded called");
+ return OK;
}
uint32_t ScrewDTSCallback(uint32_t deviceID, uint32_t BusyFlag)
{
@@ -459,7 +460,6 @@ uint32_t ScrewDTSCallback(uint32_t deviceID, uint32_t BusyFlag)
MotorStop(HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz);
MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, ScrewSpeed, GPI_LS_SCREW_RIGHT, WinderDistanceToSpoolEnded,2000);
-
return OK;
}
uint32_t WinderDistanceToSpoolState(void )
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
index ead318758..9d773c1af 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
@@ -44,6 +44,7 @@ uint32_t LoadDancerConfigMessage(void);
uint32_t Winder_Init(void);
uint32_t Winder_Prepare(void);
uint32_t Winder_Presegment(void *JobDetails, uint32_t SegmentId);
+uint32_t WinderDistanceToSpoolState(void );
uint32_t Winder_End(void);
typedef enum
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
index 4743008e5..b9a28fe57 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c
@@ -939,6 +939,10 @@ char Endstr[150];
else
LOG_ERROR (ControlIdtoMotorId[Motor_i],"Remove Control failed");
}
+ }
+ Task_sleep(10);
+ for ( Motor_i = 0;Motor_i <= WINDER_MOTOR;Motor_i++)
+ {
MotorStop(ThreadMotorIdToMotorId[Motor_i],Hard_Hiz);
}
MotorStop(HARDWARE_MOTOR_TYPE__MOTO_RLOADING,Hard_Hiz);