aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-10-09 10:33:57 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-10-09 10:33:57 +0300
commit67ca14bb9524cf610cc4c638f132cfca84bacbee (patch)
tree9fcc8140ab07822fb01136f8435b8a3904789b53 /Software/Embedded_SW/Embedded
parentf46208a0f7ec63f5435842a8023a7d3e4e0730f7 (diff)
downloadTango-67ca14bb9524cf610cc4c638f132cfca84bacbee.tar.gz
Tango-67ca14bb9524cf610cc4c638f132cfca84bacbee.zip
Heaters PID
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/process.c20
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c24
3 files changed, 24 insertions, 22 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c b/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c
index 702ecafcc..2ffb3977f 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Flash_Memory/Flash_Memory.c
@@ -403,7 +403,7 @@ int Init_Ext_Flash()
SYSCTL_CFG_VCO_480), 120000000);
// Display the setup on the console.
- writeLine("SSI3 To DK-TM4C129 FLASH TRANSFER");
+ //writeLine("SSI3 To DK-TM4C129 FLASH TRANSFER");
// The SSI3 peripheral must be enabled for use.
SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI3);
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));
}