diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-18 08:16:57 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-11-18 08:16:57 +0200 |
| commit | 53b5ef734132b543838e1663fe96d70457d8a62b (patch) | |
| tree | fceae44c3a606a1bd8c4b514eb88e827453ca151 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new | |
| parent | 0c43f6919cf12f126f501d84fb76c940b8e9c7bb (diff) | |
| download | Tango-53b5ef734132b543838e1663fe96d70457d8a62b.tar.gz Tango-53b5ef734132b543838e1663fe96d70457d8a62b.zip | |
my pc changes. HardwareBlower with a heating voltage
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new index 537d27775..e21114603 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new @@ -177,7 +177,7 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction) float screw_horizontal_speed = 0; float RotationsPerSecond; - if (Counter%InternalWinderCfg.spoolbackingrate == 1) + if (Counter%InternalWinderCfg.spoolbackingrate == 0) { NumberOfSteps -= (Counter/InternalWinderCfg.spoolbackingrate); REPORT_MSG(ScrewNumberOfSteps, "Head Backing ScrewNumberOfSteps"); @@ -189,14 +189,14 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction) ScrewSpeed = screw_horizontal_speed*RotationsPerSecond; //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewSpeed); - REPORT_MSG(ScrewSpeed, "CalculateNumberOfSteps ScrewSpeed"); - REPORT_MSG(CurrentControlledSpeed[WINDER_MOTOR], "CalculateNumberOfSteps Winder speed"); + //REPORT_MSG(ScrewSpeed, "CalculateNumberOfSteps ScrewSpeed"); + //REPORT_MSG(CurrentControlledSpeed[WINDER_MOTOR], "CalculateNumberOfSteps Winder speed"); CurrentControlledSpeed[SCREW_MOTOR] = ScrewSpeed; } if ((Counter%InternalWinderCfg.SpoolBottomBackingRate == 0)||(Counter%InternalWinderCfg.SpoolBottomBackingRate == 1)) { - if (direction != MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize) + if (direction == MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize)//because the direction is already reversed at the interrupt { NumberOfSteps += (Counter/InternalWinderCfg.SpoolBottomBackingRate); ScrewNumberOfSteps++; @@ -391,7 +391,7 @@ void ScrewTimerInterrupt(int ARG0) { TimerDisable(Screw_timerBase, TIMER_A); } - Report("ScrewTimerInterrupt duration, speed", __FILE__,__LINE__,ScrewRunningTime, RpMessage, ScrewSpeed, 0); + //Report("ScrewTimerInterrupt duration, speed", __FILE__,__LINE__,ScrewRunningTime, RpMessage, ScrewSpeed, 0); // // Enable all interrupts. // |
