aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index 73eb6ea30..bbb05e727 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -21,6 +21,9 @@
#include "drivers/FPGA/FPGA_SPI_Comm.h"
#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h"
+#include <PMR/Diagnostics/EventType.pb-c.h>
+#include "Modules/AlarmHandling/AlarmHandling.h"
+
#include <driverlib/timer.h>
#include <inc/hw_ints.h>
#include <inc/hw_memmap.h>
@@ -96,6 +99,15 @@ uint32_t Winder_Prepare(void)
* 2. move back x steps - according to thehw specifications and bobine definitions in the job. move for a predefined number of steps. get a callback when done
* report ready to the job STM
*/
+
+ if (FPGA_Read_limit_Switches(GPI_SW_SPOOL_EXISTS)==LIMIT)
+ {
+ REPORT_MSG(LIMIT, "No cone in winder");
+ PrepareReady(Module_Winder,ModuleFail);
+ AlarmHandlingSetAlarm(EVENT_TYPE__WINDER_CONE_DOES_NOT_EXIST,true);
+ return ERROR;
+ //Winder_PrepareStage2(0,0);
+ }
if (FPGA_Read_limit_Switches(GPI_LS_SCREW_RIGHT)==LIMIT)
{
//REPORT_MSG(LIMIT, "Winder_Prepare at limit");
@@ -179,7 +191,7 @@ double WinderReferenceSpeed=0;
int32_t TotalWinderSpeed=0;
uint32_t Screw100msecDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
{
- uint32_t Steps;
+ //uint32_t Steps;
double temp,tempScrewSpeed;
double screw_horizontal_speed = 0;
double RotationsPerSecond;