aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-04-10 20:34:55 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-04-10 20:34:55 +0300
commitbb2090f2156464ad5a075666e69ec27e23dad23a (patch)
treedc44363f10b3dfacf46e2736b9597e91b9ca8276 /Software
parent10a60c85181ba12f7cc1d84f23f6d6771faaae3d (diff)
parent6223b9f25fac9512a80337421cc3f039ed4895ba (diff)
downloadTango-bb2090f2156464ad5a075666e69ec27e23dad23a.tar.gz
Tango-bb2090f2156464ad5a075666e69ec27e23dad23a.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software')
-rw-r--r--Software/Embedded_SW/Embedded/Communication/Container.c5
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h86
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c17
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h4
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c2
-rw-r--r--Software/Embedded_SW/Embedded/Main.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c5
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c11
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c9
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c90
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS.h2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c5
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c117
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c11
-rw-r--r--Software/Stubs Collection/stubs/embeddedparametersbuild.cs16
16 files changed, 237 insertions, 147 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c
index b0c063a5e..70f910efb 100644
--- a/Software/Embedded_SW/Embedded/Communication/Container.c
+++ b/Software/Embedded_SW/Embedded/Communication/Container.c
@@ -132,14 +132,15 @@ void receive_callback(char* buffer, size_t length)
return;
// HeatingTestSendResonse(0, false,true,true, /*OriginalMotorSpd_2PPS[index]*/length,requestContainer->type,0,0, "Container");
if (requestContainer->type != MESSAGE_TYPE__KeepAliveRequest) //user action resets the idle counter
+ {
resetIdleCounter();
-
+ REPORT_MSG(requestContainer->type,"Message received");
+ }
msgId[index] = requestContainer->type;
Length[index] = length;
DataLength[index] = requestContainer->data.len;
if (index++>=MAX_CONT_LOG)
index = 0;
- //REPORT_MSG(requestContainer->type,"Message received");
switch(requestContainer->type)
{
case MESSAGE_TYPE__CalculateRequest:
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h
index 614f2affa..367dc0373 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_Comm.h
@@ -1135,7 +1135,7 @@ typedef union
{
bool F1_GPO_WASTECH_PUMP2 : 1; //0
bool F1_GPO_WHS_WTANKPUMP2 : 1; //1
- bool F1_GPO_DILUTORPUMP_SSR10_CTRL : 1; //2
+ bool F1_GPO_DYEINGH_SSR10_CTRL : 1; //2 F1_GPO_DILUTORPUMP_SSR10_CTRL
bool DRYER_FAN_TORQUE_PWM : 1; //3 F1_GPO_EXTWINDER_3
bool DRYER_FAN_DIRECT : 1; //4 F1_GPO_EXTWINDER_2
bool DRYER_FAN_ON : 1; //5 F1_GPO_EXTWINDER_1
@@ -1279,23 +1279,43 @@ typedef union
*/
//------------------------------------ SSR ----------------------------------------
+/* updated 10-04-2019
+
+ # SSR TYPE USE
+ -----------------------------------------
+ 1 SSR1 AC Dryer Heater Zone-1
+ 2 SSR2 AC Dryer Heaters Zone-2
+ 3 SSR3 DC Cleaner Pump (Ready for field upgrade)
+ 4 SSR4 DC Mixer Chip Heater
+ 5 SSR5 DC Dye Head Heaters Zone-4
+ 6 SSR6 DC Dye Head Heaters Zone-3
+ 7 SSR7 DC Dye Head Heaters Zone-2
+ 8 SSR8 DC Dye Head Heaters Zone-1
+ 9 SSR9 DC WHS DX Cooler
+ 10 SSR10 DC Dye Head Heaters Zone-5
+ 11 SSR11 DC Dye Head Heaters Zone-6
+ 12 SSR12 DC ------------
+ 13 SSR13 DC Dye Head Electromagnet
+
+*/
+
//F2_CTRL
-#define SPARE_SSR13_CTRL BIT0
-#define SPARE_SSR12_CTRL BIT1
-#define CHILLER_SSR9_CTRL BIT2
-#define DYEINGH_SSR8_CTRL BIT3
-#define DYEINGH_SSR7_CTRL BIT4
-#define DYEINGH_SSR6_CTRL BIT5
-#define DYEINGH_SSR5_CTRL BIT6
-#define MIXCHIP_SSR4_CTRL BIT7
-#define DRYER_SSR3_CTRL BIT8
-#define DRYER_SSR2_CTRL BIT9
-#define DRYER_SSR1_CTRL BIT10
-#define PDOWN_RL1_CTRL BIT11
-#define RESERVE_BIT12 BIT12
-#define RESERVE_BIT13 BIT13
-#define RESERVE_BIT14 BIT14
-#define RESERVE_BIT15 BIT15
+#define SPARE_SSR13_CTRL BIT0
+#define SPARE_SSR12_CTRL BIT1
+#define CHILLER_SSR9_CTRL BIT2
+#define DYEINGH_SSR8_CTRL BIT3
+#define DYEINGH_SSR7_CTRL BIT4
+#define DYEINGH_SSR6_CTRL BIT5
+#define DYEINGH_SSR5_CTRL BIT6
+#define MIXCHIP_SSR4_CTRL BIT7
+#define CLEANER_PUMP_SSR3_CTRL BIT8 //DRYER_SSR3_CTRL
+#define DRYER_SSR2_CTRL BIT9
+#define DRYER_SSR1_CTRL BIT10
+#define PDOWN_RL1_CTRL BIT11
+#define RESERVE_BIT12 BIT12
+#define RESERVE_BIT13 BIT13
+#define RESERVE_BIT14 BIT14
+#define RESERVE_BIT15 BIT15
//F1_gpo_01
#define DYEINGH_SSR10_CTRL BIT2 //HeadHeaterZ5
@@ -1310,22 +1330,22 @@ typedef union
{
struct
{
- bool F2_GPO_SPARE_SSR13_CTRL : 1; //0
- bool F2_GPO_SPARE_SSR12_CTRL : 1; //1
- bool F2_GPO_CHILLER_SSR9_CTRL : 1; //2
- bool F2_GPO_DYEINGH_SSR8_CTRL : 1; //3
- bool F2_GPO_DYEINGH_SSR7_CTRL : 1; //4
- bool F2_GPO_DYEINGH_SSR6_CTRL : 1; //5
- bool F2_GPO_DYEINGH_SSR5_CTRL : 1; //6
- bool F2_GPO_MIXCHIP_SSR4_CTRL : 1; //7
- bool F2_GPO_DRYER_SSR3_CTRL : 1; //8
- bool F2_GPO_DRYER_SSR2_CTRL : 1; //9
- bool F2_GPO_DRYER_SSR1_CTRL : 1; //10
- bool F2_GPO_PDOWN_RL1_CTRL : 1; //11
- bool F2_GPO_RESERVE_BIT12 : 1; //12
- bool F2_GPO_RESERVE_BIT13 : 1; //13
- bool F2_GPO_RESERVE_BIT14 : 1; //14
- bool F2_GPO_RESERVE_BIT15 : 1; //15
+ bool F2_GPO_SPARE_SSR13_CTRL : 1; //0
+ bool F2_GPO_SPARE_SSR12_CTRL : 1; //1
+ bool F2_GPO_CHILLER_SSR9_CTRL : 1; //2
+ bool F2_GPO_DYEINGH_SSR8_CTRL : 1; //3
+ bool F2_GPO_DYEINGH_SSR7_CTRL : 1; //4
+ bool F2_GPO_DYEINGH_SSR6_CTRL : 1; //5
+ bool F2_GPO_DYEINGH_SSR5_CTRL : 1; //6
+ bool F2_GPO_MIXCHIP_SSR4_CTRL : 1; //7
+ bool F2_GPO_CLEANER_PUMP_SSR3_CTRL : 1; //8 F2_GPO_DRYER_SSR3_CTRL
+ bool F2_GPO_DRYER_SSR2_CTRL : 1; //9
+ bool F2_GPO_DRYER_SSR1_CTRL : 1; //10
+ bool F2_GPO_PDOWN_RL1_CTRL : 1; //11
+ bool F2_GPO_RESERVE_BIT12 : 1; //12
+ bool F2_GPO_RESERVE_BIT13 : 1; //13
+ bool F2_GPO_RESERVE_BIT14 : 1; //14
+ bool F2_GPO_RESERVE_BIT15 : 1; //15
}bits;
unsigned short ushort;
}F2_CTRL_REG;
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
index a268ad0d5..f88438bd0 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.c
@@ -429,17 +429,17 @@ bool FPGA_Read_limit_Switches(FPGA_GPI_ENUM Limit_Switch)
//-----------------------------------------------------------------------------------------------
-uint32_t ActivateDilutorPump()
+uint32_t ActivateCleanerPump()
{
- F2_CTRL_Reg.ushort |= CHILLER_SSR9_CTRL;
+ F2_CTRL_Reg.ushort |= CLEANER_PUMP_SSR3_CTRL;
F2_CTRL = F2_CTRL_Reg.ushort;
return OK;
}
-uint32_t DeActivateDilutorPump()
+uint32_t DeActivateCleanerPump()
{
- F2_CTRL_Reg.ushort &= ~CHILLER_SSR9_CTRL;
+ F2_CTRL_Reg.ushort &= ~CLEANER_PUMP_SSR3_CTRL;
F2_CTRL = F2_CTRL_Reg.ushort;
return OK;
}
@@ -460,16 +460,16 @@ void Power_Reset()// Resets the MCU
//--------------------------------------
-uint32_t ActivateChiller()
+uint32_t ActivateChiller() //WHS Cooler / WHS DX Cooler
{
- F2_CTRL_Reg.ushort |= SPARE_SSR12_CTRL;
+ F2_CTRL_Reg.ushort |= CHILLER_SSR9_CTRL;
F2_CTRL = F2_CTRL_Reg.ushort;
return OK;
}
-uint32_t DeActivateChiller()
+uint32_t DeActivateChiller() //WHS Cooler / WHS DX Cooler
{
- F2_CTRL_Reg.ushort &= ~SPARE_SSR12_CTRL;
+ F2_CTRL_Reg.ushort &= ~CHILLER_SSR9_CTRL;
F2_CTRL = F2_CTRL_Reg.ushort;
return OK;
}
@@ -500,6 +500,7 @@ uint32_t DeActivateAllSSR()
{
F2_CTRL_Reg.ushort = 0;
F2_CTRL = F2_CTRL_Reg.ushort;
+ //TODO add SSR10 - 11
return OK;
}
diff --git a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h
index 409f75418..b7327f0e3 100644
--- a/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h
+++ b/Software/Embedded_SW/Embedded/Drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h
@@ -183,8 +183,8 @@ void Read_FPGA_GPI_Rgisters();
bool FPGA_Read_limit_Switches(FPGA_GPI_ENUM Limit_Switch);
void FPGA_Read_LS_Safty_Ind_Reg();
-uint32_t ActivateDilutorPump();
-uint32_t DeActivateDilutorPump();
+uint32_t ActivateCleanerPump();
+uint32_t DeActivateCleanerPump();
void Power_Off();
void Power_Reset();
//uint8_t Buttons_LEDS(BUTTON Button, OPERATION_MODE LED_Mode);
diff --git a/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c b/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c
index 14c548f2a..89b9be968 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Heater/Heater.c
@@ -44,7 +44,7 @@ extern F3_GPO_01_REG F3_GPO_01_Reg;
static GPIOIntPortMap portMap[MAX_HEATERS_NUM] =
{
- {DRYER_SSR3_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature **** Not connected ****
+ {SPARE_SSR12_CTRL, false}, // Spare
{DRYER_SSR1_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain
{DRYER_SSR2_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary
{DYEINGH_SSR8_CTRL, false}, // HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1 - Head Heater #1 - rightmost
diff --git a/Software/Embedded_SW/Embedded/Main.c b/Software/Embedded_SW/Embedded/Main.c
index 046f8291e..ba2f049ad 100644
--- a/Software/Embedded_SW/Embedded/Main.c
+++ b/Software/Embedded_SW/Embedded/Main.c
@@ -185,7 +185,7 @@ int main(void)
#ifndef EVALUATION_BOARD
//Turn_the_Blower_On();//Turn on with the Default_Voltage
- ActivateChiller();//SSR12
+ ActivateChiller();//WHS Cooler SSR9
//ActivateHeadMagnet();
#endif
diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
index c19dea78f..13f0515f9 100644
--- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
+++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c
@@ -685,9 +685,12 @@ void AlarmHandlingInternalSetAlarm(uint32_t AlarmId, bool value)
else
{
Report("Alarm OFF ", __FILE__,__LINE__,AlarmItem[Alarm_i].EventType, RpMessage, value, Alarm_i);
- AlarmState[Alarm_i].Status = value;
if (AlarmState[Alarm_i].EventPtr)
+ {
my_free(AlarmState[Alarm_i].EventPtr);
+ AlarmState[Alarm_i].EventPtr = NULL;
+ }
+ AlarmState[Alarm_i].Status = value;
}
}
break;
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c
index 425894857..c9bbe2df6 100644
--- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c
+++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/DiagnosticActions.c
@@ -120,16 +120,11 @@ uint32_t SetDigitalOutRequestRequestFunc(MessageContainer* requestContainer)
Valve_Set(IDS_Id_to_CartrideValve[portId], request->value ); //Atm_MidTank_OFF/ON
break;
case INTERFACE_IOS__GPO_DRYER_SSR3_CTRL:
-#ifdef DEMO_TEMPERATURE
- HeaterTestActive[0] = false;
-#endif
+ //CLEANER_PUMP_SSR3_CTRL
if (request->value == true)
- ActivateHeater(0);
+ ActivateCleanerPump();
else
- DeActivateHeater(0);
-#ifdef DEMO_TEMPERATURE
- HeaterTestActive[0] = true;
-#endif
+ DeActivateCleanerPump();
break;
case INTERFACE_IOS__GPO_DRYER_SSR1_CTRL:
#ifdef DEMO_TEMPERATURE
diff --git a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
index a5f36d6a1..d39c97621 100644
--- a/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
+++ b/Software/Embedded_SW/Embedded/Modules/Diagnostics/Diagnostics.c
@@ -45,6 +45,10 @@
#include "StateMachines/Printing/PrintingSTM.h"
+#include <drivers/FPGA/FPGA_Comm.h>
+
+extern F2_CTRL_REG F2_CTRL_Reg;
+
char DiagnosticsToken[36+1] = {0};
bool DiagnosticsActive = false;
@@ -209,7 +213,10 @@ void DiagnosticLoadMotor(int MotorId, int frequency)
void DiagnosticsLoadDigitalValues(void)
{
DigitalOutputState[0].interfaceio = INTERFACE_IOS__GPO_DRYER_SSR3_CTRL;
- DigitalOutputState[0].value = GetHeaterState(0);
+ if(F2_CTRL_Reg.ushort & CLEANER_PUMP_SSR3_CTRL)
+ DigitalOutputState[0].value = true;
+ else
+ DigitalOutputState[0].value = false;
DigitalOutputState[1].interfaceio = INTERFACE_IOS__GPO_DRYER_SSR1_CTRL;
DigitalOutputState[1].value = GetHeaterState(1);
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
index fd4d2b39b..9f90289df 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
@@ -82,7 +82,7 @@ uint32_t OverHeatCounter [MAX_HEATERS_NUM] = {0,0,0,0,0,0,0,0,0,0};
uint32_t UnderHeatCounter [MAX_HEATERS_NUM] = {0,0,0,0,0,0,0,0,0,0};
uint32_t MainDryerHeaterMaxTempControl = 0xFF;
uint32_t SecondDryerHeaterMaxTempControl = 0xFF;
-
+uint32_t DisasterControlId = 0xFF;
#define DRYER_AIR_PT100 TEMP_SENSE_ANALOG_DRYER_TEMP1
#define DRYER_MAIN_PT100 TEMP_SENSE_ANALOG_DRYER_TEMP2
#define DRYER_SECONDARY_PT100 TEMP_SENSE_ANALOG_DRYER_TEMP3
@@ -123,11 +123,16 @@ EventType HeaterUnderEventType_B[MAX_HEATERS_NUM] = {EVENT_TYPE__DRYER_ZONE_1_UN
EVENT_TYPE__DYEING_HEAD_ZONE_3_UNDERTEMPERATURE_B,EVENT_TYPE__DYEING_HEAD_ZONE_4_UNDERTEMPERATURE_B,EVENT_TYPE__DYEING_HEAD_ZONE_5_UNDERTEMPERATURE_B,EVENT_TYPE__DYEING_HEAD_ZONE_6_UNDERTEMPERATURE_B,
EVENT_TYPE__MIXER_UNDERTEMPERATURE_B};
+int HeaterDisasterCounter[HARDWARE_PID_CONTROL_TYPE__MixerHeater+1] = {0,0,0,0,0,0,0,0,0,0};
+#define DISASTER_COUNTER_LIMIT 10
+
/******************** FUNCTIONS ********************************************/
uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue);
uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue);
uint32_t HeaterControlCBFunction(uint32_t deviceID, uint32_t readValue);
uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue);
+uint32_t HeatersDisasterControl(uint32_t x,uint32_t y);
+
uint32_t PrepareHeater(int HeaterId, uint32_t SetTemperatue);
void HeatersStartControlTimer (void);
@@ -478,6 +483,9 @@ void PrepareACHeater(int HeaterId,uint32_t Frequency, uint32_t SetTemperatue)
*/
int PrepareDCHeater(int HeaterId, uint32_t Frequency, uint32_t SetTemperatue)
{
+ if (DisasterControlId == 0xFF)
+ DisasterControlId = AddControlCallback( HeatersDisasterControl, eOneSecond,TemplateDataReadCBFunction,0,0, 0);
+
if (ControlIdtoHeaterId [HeaterId] == 0xFF)
ControlIdtoHeaterId [HeaterId] = AddControlCallback( DCHeaterControlCBFunction, Frequency/*eOneSecond*/,MillisecGetTemperatures,(IfTypeHeaters*0x100+HeaterId),HeaterId2PT100Id[HeaterId],0);
//HeaterPIDConfig[HeaterId].m_params.dt *=10;
@@ -702,7 +710,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue)
if(OverHeatCounter[index]++ >=Overheat_Count_Limit)
{
OverHeatCounter[index] = Overheat_Count_Limit;
- HeaterReady[index] = false;
+ //?????HeaterReady[index] = false;
if (JobIsActive()&&(HeaterReady[index]==true))
{
JobEndReason = JOB_TEMPERATURE_ALARM;
@@ -725,7 +733,7 @@ uint32_t DcHeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue)
if(UnderHeatCounter[index]++ >=Underheat_Count_Limit)
{
UnderHeatCounter[index] = Underheat_Count_Limit;
- HeaterReady[index] = false;
+ //???HeaterReady[index] = false;
if (JobIsActive()&&(HeaterReady[index]==true))
{
JobEndReason = JOB_TEMPERATURE_ALARM;
@@ -808,6 +816,15 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
}
return ERROR;
}
+ if (HeaterDisasterCounter[index] >= DISASTER_COUNTER_LIMIT)
+ {
+ Report("AC Temperature disaster",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index);
+ DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary);
+ DeActivateHeater(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain);
+ HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,0);
+ HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary,0);
+ return ERROR;
+ }
HeaterPreviousRead[index] = readValue;
// check if the read value is within the proportional band
@@ -936,9 +953,15 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
DeActivateHeater(index);
HeaterRecalculateHeaterParams(index, 0);
}
- return ERROR;
}
HeaterPreviousRead[index] = readValue;
+ if (HeaterDisasterCounter[index] >= DISASTER_COUNTER_LIMIT)
+ {
+ Report("DC Temperature disaster",__FILE__,index,HeaterPreviousRead[index],RpWarning,readValue, index);
+ DeActivateHeater (index);
+ return ERROR;
+ }
+
// check if the read value is within the proportional band
if (HeaterReady[index]==false)
{
@@ -1052,28 +1075,60 @@ void EightMilliSecondHeatersInterrupt(UArg arg0)
}
int HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__MixerHeater+1] = {28000,28000,28000,17000,17000,17000,17000,17000,17000,11000};
+//int HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__MixerHeater+1] = {8100,8100,8200,8100,8100,8100,8100,8100,8100,8100};
+uint32_t HeatersDisasterControl(uint32_t x,uint32_t y)
+{
+ int HeaterId,temperature;
+
+ for ( HeaterId = HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature; HeaterId<= HARDWARE_PID_CONTROL_TYPE__MixerHeater;HeaterId++)
+ {
+ temperature = MillisecGetTemperatures(HeaterId2PT100Id[HeaterId]);
+ if (temperature>=HeaterDisasterTemp[HeaterId])
+ {
+ Report("Disaster Temperature ",__FILE__,HeaterId,temperature,RpWarning,HeaterDisasterTemp[HeaterId], 0);
+ if (HeaterDisasterCounter[HeaterId]++ >= DISASTER_COUNTER_LIMIT)
+ HeaterDisasterCounter[HeaterId] = DISASTER_COUNTER_LIMIT;
+ }
+ else if (temperature<0)
+ {
+ if (HeaterDisasterCounter[HeaterId]++ <= 0)
+ HeaterDisasterCounter[HeaterId] = 0;
+ }
+ else
+ {
+ if (HeaterDisasterCounter[HeaterId]-- <= 0)
+ HeaterDisasterCounter[HeaterId] = 0;
+ }
+
+ }
+ return OK;
+}
uint32_t HeatersControlLoop(uint32_t tick)
{
//char str[100];
//uint8_t len = 0;
int DcHeaterId;
+ bool AcHeaterDisaster = false;
+
/*len = usnprintf(str, 100, "\r\n EightMilliSecondHeatersInterrupt SliceCounter %d Owner %d H1000 %d H2000 %d"
,SliceCounter,TimeSliceAllocation[SliceCounter],HeatersRestart,NumberOFSlicesInUse);
Report(str, __FILE__,__LINE__,0, RpMessage, SliceCounter, TimeSliceAllocation[SliceCounter]);
*/
- /*static bool first = true;
- if (first == true)
+ if (HeaterDisasterCounter[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain] >= DISASTER_COUNTER_LIMIT)
{
- first = false;
- }*/
- if ((MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain])>HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain])|
- (MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary])>HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary]))
+ DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain);
+ DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary);
+ AcHeaterDisaster = true;
+ }
+ if (HeaterDisasterCounter[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary] >= DISASTER_COUNTER_LIMIT)
{
- Report("AC Disaster Temperature ",__FILE__,HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain,MillisecGetTemperatures(HeaterId2PT100Id[HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain]),RpWarning,HeaterDisasterTemp[HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary], 0);
DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain);
DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeaterSecondary);
+ AcHeaterDisaster = true;
}
- else
+
+
+ if (AcHeaterDisaster == false)
{
if (HeaterReady[HARDWARE_PID_CONTROL_TYPE__DryerAirTemperature] == true)
{
@@ -1110,17 +1165,8 @@ uint32_t HeatersControlLoop(uint32_t tick)
}
for ( DcHeaterId = HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1; DcHeaterId<= HARDWARE_PID_CONTROL_TYPE__MixerHeater;DcHeaterId++)
{
- if (MillisecGetTemperatures(HeaterId2PT100Id[DcHeaterId])>HeaterDisasterTemp[DcHeaterId])
- {
- if (HeaterCmd[DcHeaterId].targettemperatue)
- Report("DC Disaster Temperature ",__FILE__,DcHeaterId,MillisecGetTemperatures(HeaterId2PT100Id[DcHeaterId]),RpWarning,HeaterDisasterTemp[DcHeaterId], DcHeaterId);
- DeActivateHeater (DcHeaterId);
- continue;
- }
- if ( MillisecGetTemperatures(HeaterId2PT100Id[DcHeaterId]<MINIMUM_HEATER_READ))
+ if (HeaterDisasterCounter[DcHeaterId] >= DISASTER_COUNTER_LIMIT)
{
- if (HeaterCmd[DcHeaterId].targettemperatue)
- Report("DC negative Temperature ",__FILE__,DcHeaterId,MillisecGetTemperatures(HeaterId2PT100Id[DcHeaterId]),RpWarning,HeaterDisasterTemp[DcHeaterId], DcHeaterId);
DeActivateHeater (DcHeaterId);
continue;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h
index 80a55d63e..3d2bcf9ff 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS.h
@@ -5,7 +5,7 @@
#include "drivers/motors/motor.h"
#include "ids_ex.h"
-extern uint32_t CurrentDispenserSpeed[MAX_SYSTEM_DISPENSERS];
+extern int32_t CurrentDispenserSpeed[MAX_SYSTEM_DISPENSERS];
extern uint32_t DispenserIdToMotorId[MAX_SYSTEM_DISPENSERS];
extern float DispenserPressure[MAX_SYSTEM_DISPENSERS];
uint32_t DispenserConfigMessage(HardwareDispenser * request);
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
index b33b531a3..868ddca9c 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_dispenser.c
@@ -33,7 +33,8 @@ double DispenserPreparePressure = DISPENSER_BUILD_PRESSURE_LIMIT;
uint32_t DispenserPrepareTimeout = DISPENSER_BUILD_PRESSURE_TIMEOUT;
uint32_t DispenserPrepareTimeLag = DISPENSER_BUILD_PRESSURE_LAG;
uint32_t DispenserPrepareTime[MAX_SYSTEM_DISPENSERS] = {0,0,0,0,0,0,0,0};
-uint32_t CurrentDispenserSpeed[MAX_SYSTEM_DISPENSERS] = {0, 0, 0, 0, 0, 0, 0, 0,};
+
+int32_t CurrentDispenserSpeed[MAX_SYSTEM_DISPENSERS] = {0, 0, 0, 0, 0, 0, 0, 0,};
callback_fptr DispenserCallback[MAX_SYSTEM_DISPENSERS] = {0, 0, 0, 0, 0, 0, 0, 0,};
uint32_t DispenserControlId[MAX_SYSTEM_DISPENSERS] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
@@ -55,7 +56,7 @@ void IDS_Dispenser_SetTimeOutValues(uint32_t CloseTimeout, uint32_t OpenTimeout)
}
//********************************************************************************************************************
-uint32_t IdsGetMotorSpeed(uint32_t DispenserId)
+int32_t IdsGetMotorSpeed(uint32_t DispenserId)
{
return CurrentDispenserSpeed[DispenserId];
}
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
index 9b2442698..350e553b6 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_ex.h
@@ -75,6 +75,6 @@ uint32_t IDS_MapDispenserUsedinFileJob(void *JobDetails);
float CalculateDispenserPressure (int DispenserId);
float GetDispenserPressure(int DispenserId);
-uint32_t IdsGetMotorSpeed(uint32_t DispenserId);
+int32_t IdsGetMotorSpeed(uint32_t DispenserId);
#endif /* MODULES_IDS_IDS_EX_H_ */
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
index 1bdf15b29..215fab544 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_maint.c
@@ -78,13 +78,14 @@ void IDS_Dispenser_SetBackLashValues(double initialdispenserpressure, uint32
Report("IDS_Dispenser_SetBackLashValues ",__FILE__,InitialDispenserPressure,InitialDispenserTimeout,RpWarning,(int)InitialDispenserTimeLag,0);
}
-uint32_t IDS_HomeDispenserBackMoveCallback(uint32_t deviceID, uint32_t ReadValue)
+uint32_t IDS_HomeDispenserBackMoveCallback(uint32_t motorId, uint32_t ReadValue)
{
- uint8_t DispenserId = deviceID-HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
+ uint8_t DispenserId = motorId-HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
if ((GetDispenserPressure(DispenserId)>=InitialDispenserPressure)||(DispenserHomingTime[DispenserId]>InitialDispenserTimeout))
{
- MotorStop(deviceID,Hard_Hiz);
- MotorSetMicroStep(deviceID, MotorsCfg[deviceID].microstep);
+ MotorStop(motorId,Hard_Hiz);
+ CurrentDispenserSpeed[DispenserId] = 0;
+ MotorSetMicroStep(motorId, MotorsCfg[motorId].microstep);
HomingActive[DispenserId]= false;
Report("End backlash",__FILE__,millisecondCounter,(int)DispenserId,RpWarning,(int)DispenserHomingTime[DispenserId],0);
if (SafeRemoveControlCallback(DispenserHomingControlId[DispenserId], IDS_HomeDispenserBackMoveCallback )==OK)
@@ -99,15 +100,15 @@ uint32_t IDS_HomeDispenserBackMoveCallback(uint32_t deviceID, uint32_t ReadValue
}
return OK;
}
-uint32_t IDS_HomeDispenserCallback(uint32_t deviceID, uint32_t ReadValue)
+uint32_t IDS_HomeDispenserCallback(uint32_t motorId, uint32_t ReadValue)
{
- uint8_t DispenserId = deviceID-HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
+ uint8_t DispenserId = motorId-HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
Read_MidTank_Pressure_Sensor(DispenserId);
//close dry air valve in the dispenser
Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_OFF);
Disable_MidTank_Pressure_Reading(DispenserId);
- //MotorSetMicroStep(deviceID, MotorsCfg[deviceID].microstep);
+ //MotorSetMicroStep(motorId, MotorsCfg[motorId].microstep);
if (HomingRequestCallback[DispenserId])
{
HomingRequestCallback[DispenserId](DispenserId,0);
@@ -115,11 +116,12 @@ uint32_t IDS_HomeDispenserCallback(uint32_t deviceID, uint32_t ReadValue)
}
// HomingActive[DispenserId]= false;
Report("Start backlash",__FILE__,millisecondCounter,(int)DispenserId,RpWarning,(int)DispenserHomingTime[DispenserId],0);
- DispenserHomingControlId[DispenserId] = AddControlCallback( IDS_HomeDispenserBackMoveCallback, InitialDispenserTimeLag, GetDispenserPressure,deviceID, deviceID, 0 );
+ DispenserHomingControlId[DispenserId] = AddControlCallback( IDS_HomeDispenserBackMoveCallback, InitialDispenserTimeLag, GetDispenserPressure,motorId, motorId, 0 );
- MotorSetDirection(deviceID,MotorsCfg[deviceID].directionthreadwize);
+ MotorSetDirection(motorId,MotorsCfg[motorId].directionthreadwize);
- MotorSetSpeed(deviceID, 1000);
+ MotorSetSpeed(motorId, 1000);
+ CurrentDispenserSpeed[DispenserId] = 1000;
IDS_Dispenser_RefillEnded ( DispenserId);
@@ -127,74 +129,84 @@ return OK;
}
-uint32_t IDS_HomeDispenser (uint32_t deviceID, uint32_t speed , callback_fptr callback)
+uint32_t IDS_HomeDispenser (uint32_t DispenserId, uint32_t speed , callback_fptr callback)
{
- assert(deviceID < MAX_SYSTEM_DISPENSERS);
+ assert(DispenserId < MAX_SYSTEM_DISPENSERS);
- //if (DispensersAlarmState[deviceID] == true)
+ //if (DispensersAlarmState[DispenserId] == true)
// return ERROR;
- if (HomingActive[deviceID] == true)
+ if (HomingActive[DispenserId] == true)
+ {
+ LOG_ERROR (DispenserId,"Homing already active");
return ERROR;
+ }
else
- HomingActive[deviceID] = true;
+ HomingActive[DispenserId] = true;
- HomingRequestCallback[deviceID] = callback;
+ HomingRequestCallback[DispenserId] = callback;
- TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + deviceID;
- if ( Dispenser_Id_to_LS_Id[deviceID] != MAX_GPI)
+ TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + DispenserId;
+ if ( Dispenser_Id_to_LS_Id[DispenserId] != MAX_GPI)
{
//open dispenser valve dispenser to midtank direction
- Control3WayValvesWithCallback ((Valves_t)deviceID, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer
+ Control3WayValvesWithCallback ((Valves_t)DispenserId, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer
//Valve_Set((Valves_t) request->index, MidTank_Dispenser);
MotorSetMicroStep(MotorId, 1);
SysCtlDelay(180000);
//open dry air valve in the dispenser
- Valve_Set(IDS_Id_to_AirValve[deviceID], Atm_MidTank_ON);
+ Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_ON);
- IDS_Dispenser_RefillStarted(deviceID);
- MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Dispenser_Id_to_LS_Id[deviceID], IDS_HomeDispenserCallback,0);
+ IDS_Dispenser_RefillStarted(DispenserId);
+ MotorMovetoLimitSwitch (MotorId,1-MotorsCfg[MotorId].directionthreadwize, speed, Dispenser_Id_to_LS_Id[DispenserId], IDS_HomeDispenserCallback,0);
+ CurrentDispenserSpeed[DispenserId] = (-1*speed);
return OK;
}
return ERROR;
}
-uint32_t IDS_Dispenser_Alarm_On (uint8_t deviceID)
+uint32_t IDS_Dispenser_Alarm_On (uint8_t DispenserId)
{
uint32_t status = OK;
- DispensersAlarmState[deviceID] = true;
- TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + deviceID;
+ DispensersAlarmState[DispenserId] = true;
+ TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + DispenserId;
status |= MotorAbortMovetoLimitSwitch(MotorId);
- Valve_Set(IDS_Id_to_AirValve[deviceID], Atm_MidTank_OFF);
- Enable_MidTank_Pressure_Reading(deviceID);
- status |= MotorSetMicroStep(deviceID, MotorsCfg[deviceID].microstep);
- status |= MotorStop(deviceID, Hard_Hiz);
+ Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_OFF);
+ Enable_MidTank_Pressure_Reading(DispenserId);
+ status |= MotorSetMicroStep(DispenserId, MotorsCfg[DispenserId].microstep);
+ status |= MotorStop(DispenserId, Hard_Hiz);
+ CurrentDispenserSpeed[DispenserId] = 0;
JobEndReason = JOB_OUT_OF_DYE;
return status;
}
-uint32_t IDS_Dispenser_Alarm_Off (uint8_t deviceID)
+uint32_t IDS_Dispenser_Alarm_Off (uint8_t DispenserId)
{
uint32_t status = OK;
- DispensersAlarmState[deviceID] = false;
+ DispensersAlarmState[DispenserId] = false;
return status;
}
-uint32_t IDS_StopHomeDispenser (uint32_t deviceID)
+uint32_t IDS_StopHomeDispenser (uint32_t DispenserId)
{
- assert(deviceID < MAX_SYSTEM_DISPENSERS);
+ assert(DispenserId < MAX_SYSTEM_DISPENSERS);
- if (HomingActive[deviceID] != true)
+ Report("IDS_StopHomeDispenser",__FILE__,millisecondCounter,(int)DispenserId,RpWarning,(int)HomingActive[DispenserId],0);
+ if (HomingActive[DispenserId] != true)
+ {
+ LOG_ERROR (DispenserId,"Homing not active");
return ERROR;
+ }
else
- HomingActive[deviceID] = false;
+ HomingActive[DispenserId] = false;
- TimerMotors_t MotorId = (deviceID)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
+ TimerMotors_t MotorId = (DispenserId)+HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1;
MotorAbortMovetoLimitSwitch(MotorId);
//close dry air valve in the dispenser
- Disable_MidTank_Pressure_Reading(deviceID);
- Valve_Set(IDS_Id_to_AirValve[deviceID], Atm_MidTank_OFF);
- Control3WayValvesWithCallback ((Valves_t)deviceID, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer
+ Disable_MidTank_Pressure_Reading(DispenserId);
+ Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_OFF);
+ Control3WayValvesWithCallback ((Valves_t)DispenserId, MidTank_Dispenser, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer
MotorSetMicroStep(MotorId, MotorsCfg[MotorId].microstep);
+ CurrentDispenserSpeed[DispenserId] = 0;
return OK;
}
@@ -215,34 +227,35 @@ uint32_t IDS_CheckDispenserLimitSwitch (LimitSwitchAlarms LS_Id)
return FPGA_Read_limit_Switches(Dispenser_Id_to_Alarm_LS_Id[LS_Id]);
}
-uint32_t IDS_EmptyDispenser (uint32_t deviceID, uint32_t speed , callback_fptr callback)
+uint32_t IDS_EmptyDispenser (uint32_t DispenserId, uint32_t speed , callback_fptr callback)
{
- assert(deviceID < MAX_SYSTEM_DISPENSERS);
+ assert(DispenserId < MAX_SYSTEM_DISPENSERS);
- //if (DispensersAlarmState[deviceID] == true)
+ //if (DispensersAlarmState[DispenserId] == true)
// return ERROR;
- if (HomingActive[deviceID] == true)
+ if (HomingActive[DispenserId] == true)
return ERROR;
else
- HomingActive[deviceID] = true;
- HomingRequestCallback[deviceID] = callback;
+ HomingActive[DispenserId] = true;
+ HomingRequestCallback[DispenserId] = callback;
- TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + deviceID;
- if ( Dispenser_Id_to_LS_Empty_Id[deviceID] != MAX_GPI)
+ TimerMotors_t MotorId = HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1 + DispenserId;
+ if ( Dispenser_Id_to_LS_Empty_Id[DispenserId] != MAX_GPI)
{
//open dispenser valve dispenser to midtank direction
- Control3WayValvesWithCallback ((Valves_t)deviceID, Dispenser_Mixer, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer
+ Control3WayValvesWithCallback ((Valves_t)DispenserId, Dispenser_Mixer, NULL); //direction: MidTank_Dispenser or Dispenser_Mixer
//Valve_Set((Valves_t) request->index, Dispenser_Mixer);
MotorSetMicroStep(MotorId, 1);
SysCtlDelay(180000);
//open dry air valve in the dispenser
- //Valve_Set(IDS_Id_to_AirValve[deviceID], Atm_MidTank_ON);
- IDS_Dispenser_RefillStarted(deviceID);
- IDS_Dispenser_MovingDirection(deviceID,UP);
+ //Valve_Set(IDS_Id_to_AirValve[DispenserId], Atm_MidTank_ON);
+ IDS_Dispenser_RefillStarted(DispenserId);
+ IDS_Dispenser_MovingDirection(DispenserId,UP);
- MotorMovetoLimitSwitch (MotorId,MotorsCfg[MotorId].directionthreadwize, speed, Dispenser_Id_to_LS_Empty_Id[deviceID], IDS_HomeDispenserCallback,0);
+ MotorMovetoLimitSwitch (MotorId,MotorsCfg[MotorId].directionthreadwize, speed, Dispenser_Id_to_LS_Empty_Id[DispenserId], IDS_HomeDispenserCallback,0);
+ CurrentDispenserSpeed[DispenserId] = speed;
return OK;
}
return ERROR;
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index 2a8cac415..9d3a85ad0 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -781,10 +781,13 @@ uint32_t IDSPreSegmentState(void *SegmentDetails, int SegmentId)
{
MotorSetMicroStep(HW_Motor_Id, MotorsCfg[HW_Motor_Id].microstep);
}
- MotorStop(HW_Motor_Id,Hard_Hiz); //26/03/19 test without valves
- CurrentDispenserSpeed[DispenserId] = 0;
+ if ((EnableIntersegment == true)&&(IntersegmentLength>0))
+ {
+ MotorStop(HW_Motor_Id,Hard_Hiz); //26/03/19 test without valves
+ CurrentDispenserSpeed[DispenserId] = 0;
+ REPORT_MSG(DispenserId,"Dispenser stopped pre Segment");
+ }
IDS_Valve_PresegmentReady(DispenserId,0); //27/03/19 to be removed when the presegment handler will be added
- //REPORT_MSG(DispenserId,"Dispenser stopped pre Segment");
}
}
@@ -1012,7 +1015,7 @@ uint32_t IDSSegmentState(void *SegmentDetails, int SegmentId)
//TimerMotors_t HW_Motor_Id = DispenserIdToMotorId[deviceID];
//REPORT_MSG(deviceID,"Dispenser End called");
//MotorStop(HW_Motor_Id,Hard_Hiz);
- IDS_HomeDispenser (deviceID, 1000 , NULL);
+ IDS_HomeDispenser (deviceID, 800 , NULL);
return OK;
}
diff --git a/Software/Stubs Collection/stubs/embeddedparametersbuild.cs b/Software/Stubs Collection/stubs/embeddedparametersbuild.cs
index f23dd380f..3ad7c1da8 100644
--- a/Software/Stubs Collection/stubs/embeddedparametersbuild.cs
+++ b/Software/Stubs Collection/stubs/embeddedparametersbuild.cs
@@ -33,8 +33,8 @@ configurationParameters.CloseValveTimeout = 252;
configurationParameters.OpenValveTimeout = 252;
//backlash after filling -
-configurationParameters.InitialDispenserPressure = 0.5;
-configurationParameters.InitialDispenserTimeout = 20000; //20 seconds
+configurationParameters.InitialDispenserPressure = 1.5;
+configurationParameters.InitialDispenserTimeout = 60000; //20 seconds
configurationParameters.InitialDispenserTimeLag = 100;
//job prepare - build pressure in dispensers
@@ -50,24 +50,24 @@ configurationParameters.ACHeatersUpperOperationLimit = 1005;
configurationParameters.DCHeatersLowerOperationLimit = 978;
configurationParameters.DCHeatersUpperOperationLimit = 1005;
-configurationParameters.MidTankPressureCorrection = 0.5;
+configurationParameters.MidTankPressureCorrection = 0.2;
-File.WriteAllBytes("C:/temp/EmbParam.msg",configurationParameters.ToBytes());
+File.WriteAllBytes("C:/temp/EmbParam.cfg",configurationParameters.ToBytes());
-byte[] fileBytes = File.ReadAllBytes("C:/temp/EmbParam.msg");
+byte[] fileBytes = File.ReadAllBytes("C:/temp/EmbParam.cfg");
DeleteRequest deleteRequest = new DeleteRequest();
-deleteRequest.Path = "0://SysInfo//EmbParam.msg";
+deleteRequest.Path = "0://SysInfo//EmbParam.cfg";
var response5 = stubManager.Run<DeleteResponse>(deleteRequest);
FileUploadRequest fileUploadRequest = new FileUploadRequest();
-fileUploadRequest.Path = "0://SysInfo//EmbParam.msg";
+fileUploadRequest.Path = "0://SysInfo//EmbParam.cfg";
fileUploadRequest.Length = (int)fileBytes.Length;
FileUploadResponse response2 = stubManager.Run<FileUploadResponse>(fileUploadRequest);
long chunk_size = response2.MaxChunkLength;
-FileStream fs = new FileStream("C:/temp/EmbParam.msg",FileMode.Open);
+FileStream fs = new FileStream("C:/temp/EmbParam.cfg",FileMode.Open);
while (fs.Position < fs.Length)
{