diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-22 14:34:02 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-22 14:34:02 +0200 |
| commit | cfd5d9ffa46286f27d8523d7fd4cc524d267da8a (patch) | |
| tree | f8066dc8089a1fb0eb61f5ea3b0cc600df646d51 /Software/Embedded_SW/Embedded/Modules | |
| parent | 9a4948a47198e6b965892a5d865ab7f973d22d55 (diff) | |
| download | Tango-cfd5d9ffa46286f27d8523d7fd4cc524d267da8a.tar.gz Tango-cfd5d9ffa46286f27d8523d7fd4cc524d267da8a.zip | |
Version 1.1.4.4: waste valve handling, L6470 errate fix, and other bugs
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
5 files changed, 18 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h index 2b8779207..db2277659 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h @@ -29,7 +29,7 @@ typedef enum { LimitSwitchAlarmLow_8, //MOTO_DISPENSER_8 = 13, }LimitSwitchAlarms; -void Calculateinit (void); +void IDS_ModuleInit (void); uint32_t IDSPrepareState(void *JobDetails); uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId); diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c index b035ff97b..43984f8d1 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_init.c @@ -13,6 +13,7 @@ #include "drivers/Motors/Motor.h" #include "drivers/ADC_Sampling/adc.h" +#include "drivers/valves/valve.h" #define MAX_CONTROL_SAMPLES 10 @@ -89,4 +90,9 @@ uint32_t DispenserConfigMessage(HardwareDispenser * request) else return Dispenser_i; } +void IDS_ModuleInit(void) +{ + Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste); + Calculateinit(); +} diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 57b346513..f9c4c1bc3 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -116,6 +116,7 @@ void DispenserPrepareReady(void) int Motor_i, HW_Motor_Id, Pid_Id,i; //start IDS control for all motors IDS_Active = true; + Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste); for (Motor_i = 0;Motor_i < MAX_SYSTEM_DISPENSERS;Motor_i++) { HW_Motor_Id = DispenserIdToMotorId[Motor_i]; @@ -229,6 +230,11 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId) LOG_ERROR(JobBrushStopId,"Error JobBrushStopId"); return ERROR; } + if (( JobTicket->enableintersegment == true)&&(JobTicket->intersegmentlength>0)) + { + Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste); //if intersegment is defined throw the ink away + } + if (JobTicket->segments[SegmentId]->brushstops[JobBrushStopId]->n_dispensers) { n_dispensers = JobTicket->segments[SegmentId]->brushstops[JobBrushStopId]->n_dispensers; @@ -299,7 +305,6 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId) double segmentfirst_speed; int CurrentSegment = SegmentId; - if (CurrentSegment>=JobTicket->n_segments) { LOG_ERROR(CurrentSegment,"Error Segment"); @@ -310,6 +315,7 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId) LOG_ERROR(JobBrushStopId,"Error JobBrushStopId"); return ERROR; } + Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Head); if (JobTicket->segments[CurrentSegment]->brushstops[JobBrushStopId]->n_dispensers) { n_dispensers = JobTicket->segments[CurrentSegment]->brushstops[JobBrushStopId]->n_dispensers; @@ -393,6 +399,7 @@ uint32_t IDSPreSegmentState(void *JobDetails, int SegmentId) { int Dispenser_i; IDS_Active = false; + Valve_Set(VALVE_MIXCHIP_WASTECH, Mixer_Waste); for ( Dispenser_i = 0;Dispenser_i < MAX_SYSTEM_DISPENSERS;Dispenser_i++) { MotorStop(DispenserIdToMotorId[Dispenser_i],Hard_Hiz); diff --git a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Valve.c b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Valve.c index 759d76a43..5f087c50a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Valve.c +++ b/Software/Embedded_SW/Embedded/Modules/Stubs_Handler/Stub_Valve.c @@ -32,8 +32,9 @@ void Stub_ValveRequest(MessageContainer* requestContainer) request->inkflow request->valveon */ - Control3WayValvesWithCallback (request->valveid, request->valveon, NULL); + //Control3WayValvesWithCallback (request->valveid, request->valveon, NULL); //test_valve_3_way(request->valveid, request->valveon); + Valve_Set(request->valveid, request->valveon); StubValveResponse response = STUB_VALVE_RESPONSE__INIT; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index fd577311e..b6392249a 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -142,6 +142,7 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag) ScrewControlId = 0xFF; ScrewNumberOfSteps = 0; REPORT_MSG(BusyFlag, "Winder_ScrewAtOffsetCallback"); + MotorStop (HARDWARE_MOTOR_TYPE__MOTO_SCREW,Soft_Hiz); //per L6470 errata between mov and run commands PrepareReady(Module_Winder, ModuleDone); return OK; } |
