diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-13 10:41:45 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-13 10:41:45 +0200 |
| commit | 8d4920307ed4bbb6760245728934b91e249fe6c4 (patch) | |
| tree | a19daf5bfc8e585841a63ef2b5ff349ef641e50e /Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new | |
| parent | 6bf9ac4eca2a4b9616a1a62ba89707651c410562 (diff) | |
| download | Tango-8d4920307ed4bbb6760245728934b91e249fe6c4.tar.gz Tango-8d4920307ed4bbb6760245728934b91e249fe6c4.zip | |
prevent sending diagnostics message if the prev one did not run. improve winding
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new index f33a134e1..537d27775 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new @@ -177,14 +177,14 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction) float screw_horizontal_speed = 0; float RotationsPerSecond; - if (Counter%InternalWinderCfg.spoolbackingrate == 0) + if (Counter%InternalWinderCfg.spoolbackingrate == 1) { NumberOfSteps -= (Counter/InternalWinderCfg.spoolbackingrate); REPORT_MSG(ScrewNumberOfSteps, "Head Backing ScrewNumberOfSteps"); ScrewNumberOfSteps--; screw_horizontal_speed = ScrewNumberOfSteps / InternalWinderCfg.NumberOfRotationPerPassage; // calculation input#2: number of rotations per second - (basically: speed/winder perimeter. later - according to winder actual speed - calculate according to winder position accumulation in the last second. - RotationsPerSecond = CurrentControlledSpeed[WINDER_MOTOR] / MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_WINDER].pulseperround; + RotationsPerSecond = OriginalMotorSpd_2PPS[WINDER_MOTOR] / MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_WINDER].pulseperround; // calculation input#3: speed = rotation per second * traverse per rotation = traverse per second. speed set: traverse per second (mm) * pulses per mm. ScrewSpeed = screw_horizontal_speed*RotationsPerSecond; @@ -194,7 +194,7 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction) CurrentControlledSpeed[SCREW_MOTOR] = ScrewSpeed; } - if ((Counter%InternalWinderCfg.SpoolBottomBackingRate == 0)||(Counter%InternalWinderCfg.SpoolBottomBackingRate == 0)) + if ((Counter%InternalWinderCfg.SpoolBottomBackingRate == 0)||(Counter%InternalWinderCfg.SpoolBottomBackingRate == 1)) { if (direction != MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize) { |
