aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-06-05 14:20:39 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-06-05 14:20:39 +0300
commitc48a2de9e1ab6d9cd51b821680bd7f2690a020af (patch)
treecf79dc5bbe4b28d63b611da84eb195e1355312a5 /Software/Embedded_SW/Embedded/Modules/Thread
parent807feae308b71f0a676ce2c8b3f3469b927a55a8 (diff)
parent44c2abcbc60357ed282cae20c8476de2b50cbe25 (diff)
downloadTango-c48a2de9e1ab6d9cd51b821680bd7f2690a020af.tar.gz
Tango-c48a2de9e1ab6d9cd51b821680bd7f2690a020af.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index 82f96c497..2bbc93523 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -270,10 +270,10 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
//double calcsteps = (ScrewRunningTime/SYS_CLK_FREQ)*ScrewSpeed;
//REPORT_MSG((abs(ScrewLocationRun[1] - ScrewLocationRun[0]), "Screw Run NumberOfSteps");
// usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d intent %d rot %d",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0]),ScrewNumberOfSteps,Rotations*10);
- usnprintf(ScrewStr, 150, "Winder Encoder:id, diff, intended, winderspeed, rotation, speed, time, mot speed {, %d, %d, %d, %d, %d, %d, %d, %d, }",CalculationDirectionChangeCounter,
- abs(ScrewLocationRun[1] - ScrewLocationRun[0]),ScrewNumberOfSteps,(int)(WinderReferenceSpeed),(int)(Rotations*10),(int)ScrewSpeed,(int)ScrewRunningTime,(int)speedf);
+ //usnprintf(ScrewStr, 150, "Winder Encoder:id, diff, intended, winderspeed, rotation, speed, time, mot speed {, %d, %d, %d, %d, %d, %d, %d, %d, }",CalculationDirectionChangeCounter,
+ // abs(ScrewLocationRun[1] - ScrewLocationRun[0]),ScrewNumberOfSteps,(int)(WinderReferenceSpeed),(int)(Rotations*10),(int)ScrewSpeed,(int)ScrewRunningTime,(int)speedf);
//usnprintf(ScrewStr, 100, "Winder Encoder: 0 %d 1 %d diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],ScrewLocationRun[1] - ScrewLocationRun[0]);
- Report(ScrewStr,__FILE__,__LINE__,CalculationDirectionChangeCounter,RpWarning,ScrewLocationStart, 0);
+ //Report(ScrewStr,__FILE__,__LINE__,CalculationDirectionChangeCounter,RpWarning,ScrewLocationStart, 0);
if (ScrewCurrentDirection == 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize) //next time going out
{
@@ -438,6 +438,10 @@ uint32_t Winder_Presegment(void *SegmentDetails, uint32_t SegmentId)
return OK;
}
uint32_t ScrewDTSControlId = 0xFF;
+uint32_t WinderDistanceToSpoolEnded(uint32_t deviceID, uint32_t ReadValue)
+{
+ REPORT_MSG ((int)msec_millisecondCounter,"WinderDistanceToSpoolEnded called");
+}
uint32_t ScrewDTSCallback(uint32_t deviceID, uint32_t BusyFlag)
{
REPORT_MSG ((int)msec_millisecondCounter,"ScrewDTSCallback called");
@@ -453,7 +457,7 @@ uint32_t ScrewDTSCallback(uint32_t deviceID, uint32_t BusyFlag)
//move the cart to the edge so the spool can be easily replaced
//MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, 1000, GPI_LS_SCREW_RIGHT, NULL,0);
MotorStop(HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz);
- MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, ScrewSpeed, GPI_LS_SCREW_RIGHT, Winder_PrepareStage2,2000);
+ MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, ScrewSpeed, GPI_LS_SCREW_RIGHT, WinderDistanceToSpoolEnded,2000);
return OK;
@@ -463,7 +467,7 @@ uint32_t WinderDistanceToSpoolState(void )
double DTS_Time = ((dryerbufferlength*100)/dyeingspeed)*1000;//distance to spool time in milliseconds
REPORT_MSG ((int)DTS_Time,"WinderDistanceToSpoolState");
- ScrewDTSControlId = AddControlCallback(ScrewDTSCallback, DTS_Time-500,TemplateDataReadCBFunction,0,0,0);
+ ScrewDTSControlId = AddControlCallback(ScrewDTSCallback, DTS_Time-800,TemplateDataReadCBFunction,0,0,0);
REPORT_MSG ((int)msec_millisecondCounter,"ScrewDTSCallback start");
return OK;