From 0ab9e00c3593340713276a7132eb58410d9b2d3d Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Mon, 29 Apr 2019 15:22:24 +0300 Subject: Add brackets to defines with calculation --- Software/Embedded_SW/Embedded/Modules/Thread/Thread.h | 4 ++-- Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h index 3e2a6aa40..97f3811c7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread.h @@ -41,8 +41,8 @@ typedef struct }MotorControlConfig_t; -#define MAX_THREAD_FEED_MOTORS WINDER_MOTOR+1 -#define MAX_SYSTEM_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1 +#define MAX_THREAD_FEED_MOTORS (WINDER_MOTOR+1) +#define MAX_SYSTEM_DANCERS (HARDWARE_DANCER_TYPE__RightDancer+1) extern TimerMotors_t ThreadMotorIdToMotorId[MAX_THREAD_MOTORS_NUM]; extern HardwareDancerType ThreadMotorIdToDancerId[MAX_THREAD_MOTORS_NUM]; diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index d7ce917c0..91eedeb6b 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -9,7 +9,7 @@ #define WINDER_DANCER HARDWARE_DANCER_TYPE__LeftDancer #define POOLER_DANCER HARDWARE_DANCER_TYPE__MiddleDancer #define FEEDER_DANCER HARDWARE_DANCER_TYPE__RightDancer -#define NUM_OF_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1 +#define NUM_OF_DANCERS (HARDWARE_DANCER_TYPE__RightDancer+1) //} DANCER_ENUM; typedef enum threadMotorsEnum { -- cgit v1.3.1 From f8cd5085cc7fcd85e694d026dfd656ff54ab91d3 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 2 May 2019 11:18:08 +0300 Subject: job progress and winder logs --- Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 4 ++-- Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 6 +++--- Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 30ad7d857..f2bae768c 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -755,7 +755,7 @@ uint32_t IDS_Cleaning_Stop_Cleaning_Solution (callback_fptr callback); (int) segmentfirst_speed); //REPORT_MSG(segmentfirst_speed,IdsMessage); Report(IdsMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); - SendJobProgress(0.0, 0, false, IdsMessage); + //SendJobProgress(0.0, 0, false, IdsMessage); } } } @@ -952,7 +952,7 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) (int) segmentfirst_speed); //REPORT_MSG(segmentfirst_speed,IdsMessage); Report(IdsMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); - SendJobProgress(0.0, 0, false, IdsMessage); + //SendJobProgress(0.0, 0, false, IdsMessage); } else { diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 70f32ce6d..d65156066 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -242,7 +242,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) if ((CalculationDirectionChangeCounter/2)%InternalWinderCfg.spoolbackingrate == 0) { ScrewNumberOfSteps--; - //REPORT_MSG(ScrewNumberOfSteps, "Head Backing ScrewNumberOfSteps"); + REPORT_MSG(ScrewNumberOfSteps, "Head Backing ScrewNumberOfSteps"); } } @@ -251,7 +251,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) if ((CalculationDirectionChangeCounter/2)%InternalWinderCfg.SpoolBottomBackingRate == 0) { ScrewNumberOfSteps++; - //REPORT_MSG(ScrewNumberOfSteps, "Bottom Backing ScrewNumberOfSteps"); + REPORT_MSG(ScrewNumberOfSteps, "Bottom Backing ScrewNumberOfSteps"); } } if (WinderMotorSpeedRollOver) @@ -288,7 +288,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) //Report(TempScrewStr,__FILE__,__LINE__,0,RpWarning,0, 0); //Report(ScrewStr,__FILE__,__LINE__,ScrewCurrentDirection,RpWarning,CalculationDirectionChangeCounter, 0); //REPORT_MSG(temp , "new winder speed"); -// Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); + Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); } /********************************************************************************/ diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index a4208ad25..c292f7dcd 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -842,8 +842,8 @@ char Endstr[150]; Report(Endstr,__FILE__,__LINE__,(int)TotalProcessedLength,RpWarning,(int)PoolerTotalProcessedLength,0); ThreadUpdateProcessLength (0.0,(void *)NULL); - TotalProcessedLength = 0.0; - SetOriginMotorSpeed(0); + //TotalProcessedLength = 0.0; + SetOriginMotorSpeed(0); #ifdef HUNDRED_MICROSECONDS_DANCER_READ MillisecLogClose(); #endif -- cgit v1.3.1 From 25011c65a3081d256a6ae4672f737d51bc3c7464 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 2 May 2019 14:40:11 +0300 Subject: fix job length bug. read screw encoder. better logging in IDS --- .../Embedded_SW/Embedded/Common/SW_Info/SW_Info.c | 2 +- Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c | 2 +- .../Embedded/Drivers/USB_Communication/USBCDCD.c | 4 ++- .../Embedded/Modules/General/GeneralHardware.c | 2 +- .../Embedded/Modules/Heaters/Heaters_print.c | 1 + .../Embedded_SW/Embedded/Modules/IDS/IDS_print.c | 7 ++--- .../Embedded/Modules/Thread/Thread_Winder.c | 35 +++++++++++++++++----- .../Initialization/PowerOffSequence.c | 2 +- .../Embedded/StateMachines/Printing/JobSTM.c | 1 + .../Embedded/StateMachines/Printing/PrintingSTM.c | 2 +- 10 files changed, 40 insertions(+), 18 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c index 07175ae50..e4d325e71 100644 --- a/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c +++ b/Software/Embedded_SW/Embedded/Common/SW_Info/SW_Info.c @@ -20,7 +20,7 @@ typedef struct } TangoVersion_t; -TangoVersion_t _gTangoVersion = {1,3,9,5}; +TangoVersion_t _gTangoVersion = {1,3,9,6}; #define BUILD_DATE __DATE__ char Dat[50] = BUILD_DATE; char _gTangoName [MAX_STRING_LEN] = "Tango01 ";//d diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c index 41a28b4c1..66370491d 100644 --- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c +++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA.c @@ -443,8 +443,8 @@ typedef union { struct { - uint16_t M; uint16_t L; + uint16_t M; }Word; uint32_t Position; }SCREW_POS; diff --git a/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c b/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c index b3ab21f0a..2476e6ef3 100644 --- a/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c +++ b/Software/Embedded_SW/Embedded/Drivers/USB_Communication/USBCDCD.c @@ -482,6 +482,7 @@ uint16_t Usbindex = 0; // \return The return value is event-specific. // //***************************************************************************** +uint32_t USBConn = 0; USBDisc = 0; uint32_t ControlHandler(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgValue, void *pvMsgData) { @@ -505,6 +506,7 @@ uint32_t ControlHandler(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgValu HWREGBITW(&g_ui32Flags, FLAG_USB_CONFIGURED) = 1; SetCommunicationPath(isUSB); + USBConn++; // // Flush our buffers. // @@ -532,7 +534,7 @@ uint32_t ControlHandler(void *pvCBData, uint32_t ui32Event, uint32_t ui32MsgValu HWREGBITW(&g_ui32Flags, FLAG_USB_CONFIGURED) = 0; //TODO: Notify disconnection! - + USBDisc++; // // Set the command status update flag. // diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c index f0ce7397c..b12064915 100644 --- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c +++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c @@ -118,7 +118,7 @@ void LoadConfigurationParameters(ConfigurationParameters *Params) EmbeddedParameters.has_breaksensorlimit = true; EmbeddedParameters.breaksensorlimit = 10; EmbeddedParameters.has_diagnosticcollectionlimit = true; - EmbeddedParameters.diagnosticcollectionlimit = 1; + EmbeddedParameters.diagnosticcollectionlimit = 2; EmbeddedParameters.has_overheatcountlimit = true; EmbeddedParameters.overheatcountlimit = 3; EmbeddedParameters.has_underheatcountlimit = true; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index 5e61010dd..3a9ce53d8 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -953,6 +953,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) // Report(logmsg[index],__FILE__,__LINE__,index,RpWarning,index, Counter[index]); // #warning PID is now only proportional (above) // Report(ACheatstr,__FILE__,__LINE__,index,RpWarning,readValue, HeaterPIDConfig[index].m_calculatedError); + //Report("AC PID",__FILE__,__LINE__,HeaterPIDConfig[index].m_calculatedError/100,RpWarning,readValue, index); HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, (int)(HeaterPIDConfig[index].m_calculatedError/100)); } } diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c index 71aa161dd..668ab9dcd 100644 --- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c +++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c @@ -919,8 +919,7 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) //(Speed*uStep*PPR)/((2*PI*Dispenser_Radius) segmentfirst_speed = Dispensers[Dispenser_i]->nanolitterpersecond / Dispensers[Dispenser_i]->nanoliterperpulse; - if (Dispensers[Dispenser_i]->dispenserstepdivision - != DISPENSER_STEP_DIVISION__Auto) + if (Dispensers[Dispenser_i]->dispenserstepdivision != DISPENSER_STEP_DIVISION__Auto) { //MotorSetMicroStep(HW_Motor_Id, Dispensers[Dispenser_i]->dispenserstepdivision); segmentfirst_speed /= @@ -948,11 +947,11 @@ void IDS_StartBrushStop(int n_dispensers, JobDispenser** Dispensers) MotorSetSpeed(HW_Motor_Id, segmentfirst_speed); CurrentDispenserSpeed[DispenserId] = segmentfirst_speed; usnprintf(IdsMessage, 80, - "Dispenser %d nl/sec %d nl/pulse %d speed %d", + "Dispenser %d nl/sec %d nl/pulse %d speed %d steps %d/%d", DispenserId, (int) Dispensers[Dispenser_i]->nanolitterpersecond, (int) Dispensers[Dispenser_i]->nanoliterperpulse, - (int) segmentfirst_speed); + (int) segmentfirst_speed,Dispensers[Dispenser_i]->dispenserstepdivision,MotorsCfg[HW_Motor_Id].microstep); //REPORT_MSG(segmentfirst_speed,IdsMessage); Report(IdsMessage, __FILE__, __LINE__, Dispenser_i, RpWarning, segmentfirst_speed, 0); //SendJobProgress(0.0, 0, false, IdsMessage); diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index d65156066..937ae63b7 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -54,6 +54,9 @@ uint32_t ScrewControlId = 0xFF; InternalWinderConfigStruc InternalWinderCfg = {0}; +uint32_t ScrewLocationLimitSwitch = 0,ScrewLocationStart = 0; +uint32_t ScrewLocationRun[3]; + uint32_t Winder_Init(void) { ScrewTimerInterruptInit(); @@ -109,6 +112,10 @@ uint32_t Winder_Prepare(void) AlarmHandlingSetAlarm(EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST,true); return ERROR; }*/ + + ScrewLocationRun[0] = 0; + ScrewLocationRun[1] = 0; + if (FPGA_Read_limit_Switches(GPI_LS_SCREW_RIGHT)==LIMIT) { //REPORT_MSG(LIMIT, "Winder_Prepare at limit"); @@ -136,6 +143,11 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,InternalWinderCfg.segmentoffsetpulses); //REPORT_MSG(numOfSteps, "Winder_PrepareStage2"); + Read_Screw_Encoder(); + ScrewLocationLimitSwitch = Screw_RotEnc.Position; + REPORT_MSG(ScrewLocationLimitSwitch, "Winder_PrepareStage2 Encoder Location"); + + REPORT_MSG(millisecondCounter/*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].maxfrequency*/, "Winder_PrepareStage2"); if (ReadValue != LIMIT) { @@ -157,7 +169,13 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag) //SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_SCREW); //set this point as the spool home //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,temp_MaxFrequency); + Read_Screw_Encoder(); + ScrewLocationStart = Screw_RotEnc.Position; + + REPORT_MSG(ScrewLocationStart, "Winder_ScrewAtOffsetCallback Encoder Location"); + ScrewCurrentDirection = false; + ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; ScrewSpeed = 0; ScrewControlId = 0xFF; ScrewNumberOfSteps = 0; @@ -230,6 +248,10 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) ScrewCurrentDirection = 1-ScrewCurrentDirection; CalculationDirectionChangeCounter++; + //REPORT_MSG(ScrewLocationRun[1] - ScrewLocationRun[0], "Screw Run NumberOfSteps"); + usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0])); + //usnprintf(ScrewStr, 100, "Winder Encoder: 0 %d 1 %d diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],ScrewLocationRun[1] - ScrewLocationRun[0]); + Report(ScrewStr,__FILE__,__LINE__,ScrewLocationLimitSwitch,RpWarning,ScrewLocationStart, 0); if (ScrewCurrentDirection == 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize) //next time going out { @@ -288,7 +310,7 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) //Report(TempScrewStr,__FILE__,__LINE__,0,RpWarning,0, 0); //Report(ScrewStr,__FILE__,__LINE__,ScrewCurrentDirection,RpWarning,CalculationDirectionChangeCounter, 0); //REPORT_MSG(temp , "new winder speed"); - Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); + //Report("new winder speed",__FILE__,ScrewNumberOfSteps,temp,RpWarning,ScrewSpeed,0); } /********************************************************************************/ @@ -440,6 +462,9 @@ void ScrewTimerInterrupt(int ARG0) ROM_TimerIntClear(Screw_timerBase, TIMER_TIMA_TIMEOUT); // Clear the timer interrupt ROM_IntMasterDisable(); + Read_Screw_Encoder(); + ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; + if (SCREW_TimerActivated == true) { ROM_TimerLoadSet(Screw_timerBase, TIMER_A,(int)ScrewRunningTime); @@ -455,13 +480,7 @@ void ScrewTimerInterrupt(int ARG0) } ROM_IntMasterEnable(); Rotations+=0.03; - /*random++; - if (random >= 2) - random = -1;*/ - //Report("ScrewTimerInterrupt dir, duration, speed", __FILE__,ScrewCurrentDirection,ScrewRunningTime, RpMessage, ScrewSpeed, 0); - // - // Enable all interrupts. - // + return ; } diff --git a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c index d19be0f29..e50286290 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Initialization/PowerOffSequence.c @@ -232,7 +232,7 @@ uint32_t PowerOffWaitForTemperatureCallback(uint32_t IfIndex, uint32_t BusyFlag) MaxTemp = readTemp; - if ((MaxTemp>PowerOffTemperatureThreshold)&&(WaitForProcessCounter++<3500)) + if ((MaxTemp>PowerOffTemperatureThreshold)&&(WaitForProcessCounter++<3600)) { Report("On going cooling down, wait for end of cooling",__FILE__,__LINE__,(int)MaxTemp,RpWarning,(int)WaitForProcessCounter,0); resetIdleCounter(); diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c index 1bd07c06e..f1892f15b 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c @@ -628,6 +628,7 @@ void JobRequestFunc(MessageContainer* requestContainer) } status = PASSED; JobEndReason = JOB_OK; + TotalProcessedLength = 0.0; JobAlarmReason = AlarmHandlingPrepareJob(CurrentJob); if (JobAlarmReason ==OK) { diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c index c52ed8b4c..d238d2f82 100644 --- a/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c +++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/PrintingSTM.c @@ -222,7 +222,7 @@ JobDescriptionFileBrushStop *GetNextBrushStopFromJobFile() LOG_ERROR (0, "f_read error brush stop size error"); status = ERROR; } - REPORT_MSG(BrushStop->index,"BrushStop file Read Index"); + //REPORT_MSG(BrushStop->index,"BrushStop file Read Index"); return BrushStop; } -- cgit v1.3.1 From d42d96fdb1656ed45abedf181ffbe9dd3f2f481e Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Thu, 2 May 2019 15:06:14 +0300 Subject: hide screw encoder reading --- .../Embedded/Modules/Thread/Thread_Winder.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 937ae63b7..df88db3f9 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -143,9 +143,9 @@ uint32_t Winder_PrepareStage2(uint32_t deviceID, uint32_t ReadValue) //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,InternalWinderCfg.segmentoffsetpulses); //REPORT_MSG(numOfSteps, "Winder_PrepareStage2"); - Read_Screw_Encoder(); - ScrewLocationLimitSwitch = Screw_RotEnc.Position; - REPORT_MSG(ScrewLocationLimitSwitch, "Winder_PrepareStage2 Encoder Location"); + //Read_Screw_Encoder(); + //ScrewLocationLimitSwitch = Screw_RotEnc.Position; + //REPORT_MSG(ScrewLocationLimitSwitch, "Winder_PrepareStage2 Encoder Location"); REPORT_MSG(millisecondCounter/*MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].maxfrequency*/, "Winder_PrepareStage2"); @@ -169,8 +169,8 @@ uint32_t Winder_ScrewAtOffsetCallback(uint32_t deviceID, uint32_t BusyFlag) //SetMotHome(HARDWARE_MOTOR_TYPE__MOTO_SCREW); //set this point as the spool home //MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,temp_MaxFrequency); - Read_Screw_Encoder(); - ScrewLocationStart = Screw_RotEnc.Position; + //Read_Screw_Encoder(); + //ScrewLocationStart = Screw_RotEnc.Position; REPORT_MSG(ScrewLocationStart, "Winder_ScrewAtOffsetCallback Encoder Location"); @@ -249,9 +249,9 @@ uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag) ScrewCurrentDirection = 1-ScrewCurrentDirection; CalculationDirectionChangeCounter++; //REPORT_MSG(ScrewLocationRun[1] - ScrewLocationRun[0], "Screw Run NumberOfSteps"); - usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0])); + //usnprintf(ScrewStr, 100, "Winder Encoder: 0 0x%x 1 0x%x diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],abs(ScrewLocationRun[1] - ScrewLocationRun[0])); //usnprintf(ScrewStr, 100, "Winder Encoder: 0 %d 1 %d diff %d ",ScrewLocationRun[0],ScrewLocationRun[1],ScrewLocationRun[1] - ScrewLocationRun[0]); - Report(ScrewStr,__FILE__,__LINE__,ScrewLocationLimitSwitch,RpWarning,ScrewLocationStart, 0); + //Report(ScrewStr,__FILE__,__LINE__,ScrewLocationLimitSwitch,RpWarning,ScrewLocationStart, 0); if (ScrewCurrentDirection == 1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize) //next time going out { @@ -462,8 +462,8 @@ void ScrewTimerInterrupt(int ARG0) ROM_TimerIntClear(Screw_timerBase, TIMER_TIMA_TIMEOUT); // Clear the timer interrupt ROM_IntMasterDisable(); - Read_Screw_Encoder(); - ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; + //Read_Screw_Encoder(); + //ScrewLocationRun[ScrewCurrentDirection] = Screw_RotEnc.Position; if (SCREW_TimerActivated == true) { -- cgit v1.3.1