aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-17 14:38:45 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-17 14:38:45 +0300
commitf3a7578c8c53e50c95ed62eba4dcab80e4408b12 (patch)
tree3e8db8f2305a83169536786916df855a85d75900 /Software/Embedded_SW/Embedded/Modules/Thread
parentf937e17452d6e89b67a675cd7139d84cbd7b0ee3 (diff)
downloadTango-f3a7578c8c53e50c95ed62eba4dcab80e4408b12.tar.gz
Tango-f3a7578c8c53e50c95ed62eba4dcab80e4408b12.zip
version 1.3.8.51: bug fix in winder; many fixes in heaters
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index 0b19d835a..70f32ce6d 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -111,12 +111,12 @@ uint32_t Winder_Prepare(void)
}*/
if (FPGA_Read_limit_Switches(GPI_LS_SCREW_RIGHT)==LIMIT)
{
- REPORT_MSG(LIMIT, "Winder_Prepare at limit");
+ //REPORT_MSG(LIMIT, "Winder_Prepare at limit");
Winder_PrepareStage2(0,0);
}
else
{
- REPORT_MSG(ScrewSpeed, "Winder_Prepare");
+ //REPORT_MSG(ScrewSpeed, "Winder_Prepare");
Winder_ScrewHoming = true;
//REPORT_MSG(MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, "Winder_Prepare move to limit");
status = MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, ScrewSpeed, GPI_LS_SCREW_RIGHT, Winder_PrepareStage2,2000);
@@ -322,7 +322,9 @@ uint32_t Winder_Presegment(void *SegmentDetails, uint32_t SegmentId)
// * calculate
// * 1. calculate speed according to JobTicket->processparameters->dyeingspeed
// * calculation input: traverse length in milimeters/pulses, number of rotations per traverse ==> length of traverse per rotation.
- screw_horizontal_speed = InternalWinderCfg.segmentoffsetpulses / InternalWinderCfg.NumberOfRotationPerPassage;
+ ScrewNumberOfSteps = InternalWinderCfg.segmentoffsetpulses;//*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].microstep;
+ ScrewNumberOfSteps -= 100;
+ 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 = dyeingspeed / (MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_WINDER].pulleyradius * PI);
RotationsPerSecond = OriginalMotorSpd_2PPS[WINDER_MOTOR] / MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_WINDER].pulseperround;
@@ -343,10 +345,8 @@ uint32_t Winder_Presegment(void *SegmentDetails, uint32_t SegmentId)
// * 3. calculate cart travel length from winding parameters
// * 4. start move of travel length
// * 5. register motor nBusy callback. this callback will flip between move(traverse length, hardstop) and goto(0), with handline og the coneshape and adjusting maxspeed
- ScrewNumberOfSteps = InternalWinderCfg.segmentoffsetpulses;//*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].microstep;
- ScrewNumberOfSteps -= 100;
temp = SYS_CLK_FREQ;
- temp *= InternalWinderCfg.segmentoffsetpulses;
+ temp *= ScrewNumberOfSteps;
temp /= ScrewSpeed;
ScrewRunningTime = temp;//(SYS_CLK_FREQ*InternalWinderCfg.segmentoffsetpulses)/ScrewSpeed;
REPORT_MSG(ScrewNumberOfSteps,"Winder pre segment - ScrewNumberOfSteps");