aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/process.c20
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c24
2 files changed, 23 insertions, 21 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/General/process.c b/Software/Embedded_SW/Embedded/Modules/General/process.c
index ec2d9a9fe..8fc9434cb 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/process.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/process.c
@@ -148,16 +148,16 @@ void ProcessRequestFunc(MessageContainer* requestContainer)
REPORT_MSG (ProcessParams->dryerzone1temp,"Process Params Dryer");
- if (ProcessParams->dryerzone1temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->dryerzone2temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->dryerzone3temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->mixertemp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->headzone1temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->headzone2temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->headzone3temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->headzone4temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->headzone5temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
- if (ProcessParams->headzone6temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__GENERAL_ERROR;
+ if (ProcessParams->dryerzone1temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->dryerzone2temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->dryerzone3temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->mixertemp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->headzone1temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->headzone2temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->headzone3temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->headzone4temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->headzone5temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
+ if (ProcessParams->headzone6temp > MAX_ALLOWED_TEMPERATURE) status = ERROR_CODE__INVALID_PARAMETER;
if (status == 0)
status = HandleProcessParameters(ProcessParams);
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
index 290625061..83cd02fa2 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
@@ -510,7 +510,7 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
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
+ /*if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) //below proportional band
{
HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, 100);
//REPORT_MSG (readValue,"AC HEATER Over temperature");
@@ -519,13 +519,14 @@ uint32_t HeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
{
HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, 0);
//REPORT_MSG (readValue,"AC HEATER Under temperature");
- }
+ }*/
//check only for the proportional band limits
- temperror = (double)readValue/10000;
- HeaterPIDConfig[index].m_mesuredParam = temperror;
+ //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);
+ &HeaterPIDConfig[index].m_params, &HeaterPIDConfig[index].m_preError, &HeaterPIDConfig[index].m_integral);
correction = HeaterPIDConfig[index].m_calculatedError;
+ HeaterRecalculateSharedHeatersParams(HARDWARE_PID_CONTROL_TYPE__DryerHeaterMain, (int)(HeaterPIDConfig[index].m_calculatedError*100));
}
@@ -593,22 +594,23 @@ uint32_t DCHeaterControlCBFunction(uint32_t IfIndex, uint32_t readValue)
}
if(HeaterPIDConfig[index].m_isEnabled && (HeaterPIDConfig[index].m_SetParam != 0))
{
- if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) //below proportional band
+ /*if (readValue < ((HeaterCmd[index].targettemperatue * (100-HeaterControl[index].outputproportionalband))/100)) //below proportional band
{
HeaterRecalculateHeaterParams(index, 100);
}
else if (readValue > ((HeaterCmd[index].targettemperatue * (100+HeaterControl[index].outputproportionalband))/100))
{
HeaterRecalculateHeaterParams(index, 0);
- }
+ }*/
//check only for the proportional band limits
- temperror = (double)readValue/10000;
- HeaterPIDConfig[index].m_mesuredParam = temperror;
+ HeaterPIDConfig[index].m_mesuredParam = readValue;
+ //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);
-#warning PID is now only proportional (above)
- // HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100));
+//#warning PID is now only proportional (above)
+ HeaterRecalculateHeaterParams(index, (int)(HeaterPIDConfig[index].m_calculatedError*100));
}