From 18f3d2c3d8504303029ffd15cc9ce68383498a86 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Mon, 25 Jun 2018 18:41:07 +0300 Subject: alarm handling and heaters corrections --- .../Embedded/Modules/AlarmHandling/AlarmHandling.c | 100 +++++++++++++- .../Embedded_SW/Embedded/Modules/Heaters/Heaters.h | 1 - .../Embedded/Modules/Heaters/Heaters_init.c | 6 +- .../Embedded/Modules/Heaters/Heaters_print.c | 148 ++++++++++++--------- 4 files changed, 185 insertions(+), 70 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules') diff --git a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c index 23560bd06..cfcae2da6 100644 --- a/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c +++ b/Software/Embedded_SW/Embedded/Modules/AlarmHandling/AlarmHandling.c @@ -20,7 +20,9 @@ #include "drivers/Danser_SSI/SSI_Comm.h" #include "drivers/Heater/TemperatureSensor.h" #include "drivers/FPGA/FPGA_SPI_Comm.h" +#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" #include "drivers/FPGA/FPGA.h" +#include "PMR/Hardware/HardwareDancerType.pb-c.h" #include "modules/thread/thread_ex.h" #include @@ -222,13 +224,105 @@ uint32_t AlarmHandlingLoop(uint32_t tick) void SendDiagnostics(void) { MessageContainer responseContainer; - + int i; StartDiagnosticsResponse response = START_DIAGNOSTICS_RESPONSE__INIT; - + DiagnosticsMonitors DiagnosticsMonitor; if (DiagnosticsActive == false) return; - + DiagnosticsMonitor.n_dancer1angle = 1; + DiagnosticsMonitor.n_dancer2angle = 1; + DiagnosticsMonitor.n_dancer3angle = 1; + DiagnosticsMonitor.n_feedermotorfrequency = 1; + DiagnosticsMonitor.n_dryermotor = 1; + DiagnosticsMonitor.n_pollermotor = 1; + DiagnosticsMonitor.n_windermotor = 1; + DiagnosticsMonitor.n_screwmotor = 1; + DiagnosticsMonitor.n_mixertemperature = 1; + DiagnosticsMonitor.n_headzone1temperature = 1; + DiagnosticsMonitor.n_headzone2temperature = 1; + DiagnosticsMonitor.n_headzone3temperature = 1; + DiagnosticsMonitor.n_dryerzone1temperature = 1; + DiagnosticsMonitor.n_dryerzone2temperature = 1; + DiagnosticsMonitor.n_dryerzone3temperature = 1; +/* + DiagnosticsMonitor.dancer1angle = Control_Read_Dancer_Position(WINDER_DANCER, 0,0); + DiagnosticsMonitor.dancer2angle = Control_Read_Dancer_Position(POOLER_DANCER, 0,0); + DiagnosticsMonitor.dancer3angle = Control_Read_Dancer_Position(FEEDER_DANCER, 0,0); + + DiagnosticsMonitor.feedermotorfrequency = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_RDRIVING); + DiagnosticsMonitor.dryermotor = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_DRYER_DRIVING); + DiagnosticsMonitor.pollermotor = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_LDRIVING); + DiagnosticsMonitor.windermotor = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_WINDER); + DiagnosticsMonitor.screwmotor = MotorGetSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW); + DiagnosticsMonitor.mixertemperature = TemperatureSensorRead(TEMP_SENSE_ANALOG_MIXCHIP_TEMP); + DiagnosticsMonitor.headzone1temperature = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP1); + DiagnosticsMonitor.headzone2temperature = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP2); + DiagnosticsMonitor.headzone3temperature = TemperatureSensorRead(TEMP_SENSE_ANALOG_DYEINGH_TEMP3); + DiagnosticsMonitor.dryerzone1temperature = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP1); + DiagnosticsMonitor.dryerzone2temperature = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP2); + DiagnosticsMonitor.dryerzone3temperature = TemperatureSensorRead(TEMP_SENSE_ANALOG_DRYER_TEMP3); + + DiagnosticsMonitor.n_dispenser1motorfrequency = 1; + DiagnosticsMonitor.n_dispenser2motorfrequency = 1; + DiagnosticsMonitor.n_dispenser3motorfrequency = 1; + DiagnosticsMonitor.n_dispenser4motorfrequency = 1; + DiagnosticsMonitor.n_dispenser5motorfrequency = 1; + DiagnosticsMonitor.n_dispenser6motorfrequency = 1; + DiagnosticsMonitor.n_dispenser7motorfrequency = 1; + DiagnosticsMonitor.n_dispenser8motorfrequency = 1; + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_1); + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_2); + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_3); + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_4); + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_5); + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_6); + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_7); + DiagnosticsMonitor.dispenser1motorfrequency = MotorGetSpeed(HARDWARE_MOTOR_TYPE__MOTO_DISPENSER_8); +*/ + DigitalPin DigitalPinArray[MAX_GPI]; + for (i=0;iNumberOFSlicesInUse) +#warning temporary disable time slice control as we are working with one heater in run time +/* if ((Heater1000Slices + Heater200aSlices +2)>NumberOFSlicesInUse) { LOG_ERROR (NumberOFSlicesInUse, "proportional time slices too high too high"); return ERROR;//NumberOFSlicesInUse = MAX_TIMESLICES; } - +*/ //mark the time slices for heaters operation as empty / Heater1000 / Heater 200 memset (TimeSliceAllocation,0xFF,sizeof(TimeSliceAllocation)); for (Slice_i = 0; Slice_i < Heater1000Slices;Slice_i++ ) TimeSliceAllocation[Slice_i] = HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w; diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c index eb5736c1d..110d1918d 100644 --- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c @@ -45,10 +45,14 @@ typedef struct HeatersControlMessage{ HeaterCommand HeaterCmd[MAX_HEATERS_NUM]; uint32_t ControlIdtoHeaterId [MAX_HEATERS_NUM] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; uint32_t DryerHeaterMaxTempControl = 0xFF; -uint32_t DryerInternalPT100Id = ANALOG_DRYER_TEMP2; - +#warning the PT100 id for the dryer control is number2 - dryer internal ambient sensor +uint32_t HeaterId2PT100Id[MAX_HEATERS_NUM] = {TEMP_SENSE_ANALOG_DRYER_TEMP1,TEMP_SENSE_ANALOG_DRYER_TEMP2,TEMP_SENSE_ANALOG_DRYER_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,TEMP_SENSE_ANALOG_MIXCHIP_TEMP}; +uint32_t DryerInternalPT100Id = TEMP_SENSE_ANALOG_DRYER_TEMP1; bool HeatersRestart = false; +bool HeaterMaxTempFlag[MAX_HEATERS_NUM] = {false,false,false,false,false,false,false,false}; +bool HeaterControlFlag[MAX_HEATERS_NUM] = {true,true,true,true,true,true,true,true}; + uint32_t OutputProportionalSingleStep = 0; //A/C Heaters step size from one decision point to another - in cpu clocks. 120000 = 1 millisecod uint32_t Heater_timerBase = TIMER2_BASE; //Timer handle uint32_t OutputProportionalCycleTime = 0; //A/C Heaters Cycle time in milliseconds - one for all heaters @@ -236,7 +240,7 @@ uint32_t PrepareHeater(int HeaterId, uint32_t SetTemperatue) //start thread control for all motors HeaterPIDConfig[HeaterId].m_params.MAX = HeaterControl[HeaterId].outputproportionalpowerlimit; - HeaterPIDConfig[HeaterId].m_params.MIN = .0; + HeaterPIDConfig[HeaterId].m_params.MIN = 0.0; HeaterPIDConfig[HeaterId].m_params.Kd = HeaterControl[HeaterId].kd; HeaterPIDConfig[HeaterId].m_params.Kp = HeaterControl[HeaterId].kp; HeaterPIDConfig[HeaterId].m_params.Ki = HeaterControl[HeaterId].ki; @@ -299,19 +303,30 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) LOG_ERROR (IfIndex, "Wrong Interface "); return 0xFFFFFFFF; } - if (readValue >= HeaterControl[index].sensormaxvalue) + static int ttt=0; + ttt++; + if (ttt >=21) + { + HeatingTestSendResonse(0,false,GetHeaterState(index), InitialHeating,index, readValue,HeaterControl[index].sensormaxvalue*100, + HeaterControl[index].sensorminvalue*100,"AC MaxTemp"); + ttt=0; + } + if ((readValue/100) >= HeaterControl[index].sensormaxvalue) { LOG_ERROR (readValue, "Heater Over the max temperature, turned off"); DeActivateHeater(index); + HeaterMaxTempFlag[index] = true; return OK; } - if (readValue <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) + if ((readValue/100) <= (HeaterControl[index].sensormaxvalue-HeaterControl[index].sensorminvalue)) { if (HeaterControl[index].sensorminvalue > 0) { - ActivateHeater(index); + HeaterMaxTempFlag[index] = false; + if (HeaterControlFlag[index] == true) + ActivateHeater(index); } - LOG_ERROR (readValue, "Heater Cooled Off max temperature, turned on"); + LOG_ERROR ((readValue/100), "Heater Cooled Off max temperature, turned on"); return OK; } return ERROR; @@ -319,6 +334,7 @@ uint32_t HeaterMaxTempCBFunction(uint32_t IfIndex, uint32_t readValue) uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) { int index=MAX_HEATERS_NUM; + double temperror = 0.0, correction = 0.0; /*char str[100]; uint8_t len = 0;*/ if (IfIndex>>8 != IfTypeHeaters) @@ -344,11 +360,20 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) Temperature[0],Temperature[1], HeaterPIDConfig[HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w].m_calculatedError, HeaterPIDConfig[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1].m_calculatedError,"Standard"); */ + static int tt=0; + tt++; + if (tt >=21) + { + HeatingTestSendResonse(0,false,GetHeaterState(index), InitialHeating,index, readValue,correction, + HeaterPIDConfig[index].m_calculatedError,"Standard AC"); + tt=0; + } // check if the read value is within the proportional band if (InitialHeating) { if (readValue > ((HeaterCmd[index].targettemperatue * (100+HeaterControl[index].outputproportionalband))/100)) { + HeaterControlFlag[index] = false; DeActivateHeater(index); //Heaters OFF until coming into the proportional band /* @@ -385,20 +410,18 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) HeaterPIDConfig[index].m_mesuredParam = readValue; if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) //below proportional band { - HeaterPIDConfig[index].m_calculatedError = 1.0; - HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100)); + HeaterRecalculateSharedHeatersParams(index, 100); } else if (readValue > ((HeaterCmd[index].targettemperatue * (100+HeaterControl[index].outputproportionalband))/100)) { - HeaterPIDConfig[index].m_calculatedError = 0.0; - HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100)); + HeaterRecalculateSharedHeatersParams(index, 0); } //check only for the proportional band limits -// HeaterPIDConfig[index].m_calculatedError = PIDAlgorithmCalculation(HeaterPIDConfig[index].m_SetParam , HeaterPIDConfig[index].m_mesuredParam, -// &HeaterPIDConfig[index].m_params, &HeaterPIDConfig[index].m_preError, &HeaterPIDConfig[index].m_integral); -// HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100)); - - //SetMotorFreq (index, HeaterControl[index].m_calculatedError); + temperror = (double)readValue/10000; + HeaterPIDConfig[index].m_mesuredParam = temperror; + HeaterPIDConfig[index].m_calculatedError = PIDAlgorithmCalculation(HeaterPIDConfig[index].m_SetParam , HeaterPIDConfig[index].m_mesuredParam, + &HeaterPIDConfig[index].m_params, &HeaterPIDConfig[index].m_preError, &HeaterPIDConfig[index].m_integral); + correction = HeaterPIDConfig[index].m_calculatedError; } @@ -413,6 +436,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) { int index=MAX_HEATERS_NUM; + double temperror = 0.0, correction = 0.0; /*char str[100]; uint8_t len = 0;*/ if (IfIndex>>8 != IfTypeHeaters) @@ -431,32 +455,14 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue) LOG_ERROR (0, "unconfigured"); return ERROR; } - /*static uint32_t Temperature[2] = {0}; - if (index<2) - Temperature[index] = readValue; +/* HeatingTestSendResonse(0, false,GetHeaterState(HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w),GetHeaterState(HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1), Temperature[0],Temperature[1], HeaterPIDConfig[HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w].m_calculatedError, HeaterPIDConfig[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1].m_calculatedError,"Standard"); */ -/* - Data, 189, 2730, 0, False, True, 50, 0, Standard DC -{ -Data, 428, 80, 2641, False, False, 3, 4000, Standard DC -{ - "HeaterGroupId": 0, - "Zone1Temp": 80, - "Zone2Temp": 2641, - "Heater1Active": false, - "Heater2Active": false, - "Heater1Percentage": 3, - "Heater2Percentage": 4000, - "InfoMessage": "Standard DC" -} void HeatingTestSendResonse(uint32_t status, bool last,bool heater1Active,bool heater2Active, int temperature1, int temperature2,int Heater1Percentage,int Heater2Percentage, char* Message) - -}*/ static int t=0; t++; - if (t >=11) + if (t >=22) { HeatingTestSendResonse(0,false,GetHeaterState(index), DCInitialHeating[index],index, readValue,DCTimeSliceAllocation[index], HeaterPIDConfig[index].m_calculatedError,"Standard DC"); @@ -468,6 +474,7 @@ Data, 428, 80, 2641, False, False, 3, 4000, Standard DC //int temp = ((HeaterCmd[index].targettemperatue * (100+HeaterControl[index].outputproportionalband))/100); if (readValue > ((HeaterCmd[index].targettemperatue * (100+HeaterControl[index].outputproportionalband))/100)) { + HeaterControlFlag[index] = false; DeActivateHeater(index); //Heaters OFF until coming into the proportional band return OK; @@ -489,23 +496,22 @@ Data, 428, 80, 2641, False, False, 3, 4000, Standard DC } if(HeaterPIDConfig[index].m_isEnabled && (HeaterPIDConfig[index].m_SetParam != 0)) { - HeaterPIDConfig[index].m_mesuredParam = readValue; if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) //below proportional band { - HeaterPIDConfig[index].m_calculatedError = 1.0; - HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100)); + HeaterRecalculateHeaterParams(index, 100); } else if (readValue > ((HeaterCmd[index].targettemperatue * (100+HeaterControl[index].outputproportionalband))/100)) { - HeaterPIDConfig[index].m_calculatedError = 0.0; - HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100)); + HeaterRecalculateHeaterParams(index, 0); } + //check only for the proportional band limits -// HeaterPIDConfig[index].m_calculatedError = PIDAlgorithmCalculation(HeaterPIDConfig[index].m_SetParam , HeaterPIDConfig[index].m_mesuredParam, -// &HeaterPIDConfig[index].m_params, &HeaterPIDConfig[index].m_preError, &HeaterPIDConfig[index].m_integral); + temperror = (double)readValue/10000; + HeaterPIDConfig[index].m_mesuredParam = temperror; + HeaterPIDConfig[index].m_calculatedError = PIDAlgorithmCalculation(HeaterPIDConfig[index].m_SetParam , HeaterPIDConfig[index].m_mesuredParam, + &HeaterPIDConfig[index].m_params, &HeaterPIDConfig[index].m_preError, &HeaterPIDConfig[index].m_integral); + correction = HeaterPIDConfig[index].m_calculatedError; // HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100)); - - //SetMotorFreq (index, HeaterControl[index].m_calculatedError); } @@ -567,29 +573,35 @@ uint32_t HeatersControlLoop(uint32_t tick) } if (TimeSliceAllocation[SliceCounter] == HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w) { - //If HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w should be active - //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w - ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w); - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1); - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2); + if (HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w] == false) + { + //If HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w should be active + //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w + ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w); + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1); + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2); + } } else if (TimeSliceAllocation[SliceCounter] == HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1) { - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w); - //If HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 should be active - //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 - ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1); - ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2); + if (HeaterMaxTempFlag[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1] == false) + { + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w); + //If HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 should be active + //Activate HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 + ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1); + ActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2); + } } else { - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w); - //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1); - DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2); + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w); + //DeActivate HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1 + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1); + DeActivateHeater (HARDWARE_PID_CONTROL_TYPE__DryerHeater200w2); } for ( DcHeaterId = HARDWARE_PID_CONTROL_TYPE__HeadHeaterZ1; DcHeaterId<= HARDWARE_PID_CONTROL_TYPE__MixerHeater;DcHeaterId++) @@ -599,12 +611,22 @@ uint32_t HeatersControlLoop(uint32_t tick) if (DCTimeSliceAllocation[DcHeaterId] > 0) //heater active { if (SliceCounter == 0) - ActivateHeater (DcHeaterId); + if (HeaterMaxTempFlag[DcHeaterId] == false) + { + HeaterControlFlag[DcHeaterId] = true; + ActivateHeater (DcHeaterId); + } else if (SliceCounter >= DCTimeSliceAllocation[DcHeaterId]) //turn off + { + HeaterControlFlag[DcHeaterId] = false; DeActivateHeater (DcHeaterId); + } } else + { + HeaterControlFlag[DcHeaterId] = false; DeActivateHeater (DcHeaterId); + } } //handle the time sharing module SliceCounter++; -- cgit v1.3.1