diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-29 15:26:11 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-04-29 15:26:11 +0300 |
| commit | 594aa33b9a0689a8b75e5b0ea87a4b6fc01a3deb (patch) | |
| tree | 9e61046bea900a9be7e60fc50a52a52051365def /Software/Embedded_SW/Embedded | |
| parent | 06caa0e07f268c2208d2c1e2d5cfd177ac33f593 (diff) | |
| download | Tango-594aa33b9a0689a8b75e5b0ea87a4b6fc01a3deb.tar.gz Tango-594aa33b9a0689a8b75e5b0ea87a4b6fc01a3deb.zip | |
lubricant - divide the motor speed acording to microsteps
Diffstat (limited to 'Software/Embedded_SW/Embedded')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 3401dbaaa..4bcdcc06a 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -246,6 +246,17 @@ void FreeBrushStopFileData(JobDescriptionFileBrushStop *BrushStop); { lookForLubrication = false; lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + if (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision + != DISPENSER_STEP_DIVISION__Auto) + { + //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); + lubricant_speed /= + BrushStop->dispensers[Dispenser_i]->dispenserstepdivision; //the dye supply is calculated based on a 1/8 microstep + } + else + { + lubricant_speed/=8;//MotorsCfg[HW_Motor_Id].microstep; //the dye supply is calculated based on a 1/8 microstep + } REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); } } @@ -383,6 +394,17 @@ c. Go to step 2.a x Segment.BrushStopsCount. { lookForLubrication = false; lubricant_speed = BrushStop->dispensers[Dispenser_i]->nanolitterpersecond/BrushStop->dispensers[Dispenser_i]->nanoliterperpulse; + if (BrushStop->dispensers[Dispenser_i]->dispenserstepdivision + != DISPENSER_STEP_DIVISION__Auto) + { + //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); + lubricant_speed /= + BrushStop->dispensers[Dispenser_i]->dispenserstepdivision; //the dye supply is calculated based on a 1/8 microstep + } + else + { + lubricant_speed/=8;//MotorsCfg[HW_Motor_Id].microstep; //the dye supply is calculated based on a 1/8 microstep + } REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); } }//for dispenser @@ -497,6 +519,17 @@ c. Go to step 2.a x Segment.BrushStopsCount. { lubricant_speed = JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanolitterpersecond/ JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->nanoliterperpulse; + if (JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->dispenserstepdivision + != DISPENSER_STEP_DIVISION__Auto) + { + //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); + lubricant_speed /= + JobTicket->segments[0]->brushstops[0]->dispensers[Dispenser_i]->dispenserstepdivision; //the dye supply is calculated based on a 1/8 microstep + } + else + { + lubricant_speed/=8;//MotorsCfg[HW_Motor_Id].microstep; //the dye supply is calculated based on a 1/8 microstep + } REPORT_MSG (lubricant_speed*100, "LUBRICANT_SPEED*100"); } |
