heat control
r71
|
Go to the source code of this file.
Macros | |
#define | DELTA_TEMP 200 |
#define | IV_HCREC 3 |
#define | ENG_CTRL_DUR 5 |
#define | OUT_TMP_SHDN_TH 20500 |
#define | SHTDN_DUR 3 |
#define | NOM_IN_TMP 20100 |
#define | NM_TIN 'I' |
#define | NM_TOUT 'O' |
#define | NM_TFOR 'F' |
#define | NM_TNOM 'S' |
#define | NM_TDINNOM 'D' |
#define | NM_OPMODE 'M' |
#define | NM_CNT 'C' |
#define | NM_TIME 'T' |
#define | NM_VOLT 'V' |
#define | NM_MXP 'P' |
#define | NM_MSRFULL 'E' |
#define | DEL_FOR_TEMP 500 |
#define | MIN_FOR_TEMP 18000 |
#define | MAX_FOR_TEMP 0xFFFE |
#define | OFF_IN_TEMP 0 |
Functions | |
int | main (void) |
main controlling task More... | |
MEASSET * | DoControl (INT inTemp, INT outTemp, UINT forTemp, UCHAR learning, UINT min, UCHAR sec) |
realizes the main heater controlling algorithm the value of inner temperature distinguishes between the controlling strategy: leading the inner temperature if not equal to INVALID_VAL_I16, leading the forerun otherwise More... | |
void | DoRecord (UCHAR *recCnt, MEASSET *set) |
void | ControlEngine (ENG_MODE em) |
takes care of the heating curve recording in eeprom records only if outer temp value does not exist (specific hysteresis respected) More... | |
void | PrintMeasValues (MEASSET *ms, OP_MODE opm, UCHAR msrFull) |
puts the measurement values on screen More... | |
void | PrintValue (DATTYPE dt, UCHAR col, UCHAR row, UCHAR name, void *value) |
put a specific value on screen More... | |
void | DoEngineTest (BTN_CODE bc) |
do engine testing dependent on button request, simply drives the mixer engine unconditionally More... | |
UINT | FindForeRun (INT *outTemp, const UCHAR range, UINT const delLim) |
gets the forerun temperature of the closest outer temperature which was recorded in learning phase a predefined hysteresis supports a proper hit More... | |
UCHAR | CalcPrevIndex (UCHAR curIdx, UCHAR delIdx) |
#define DEL_FOR_TEMP 500 |
#define DELTA_TEMP 200 |
#define ENG_CTRL_DUR 5 |
#define IV_HCREC 3 |
#define MAX_FOR_TEMP 0xFFFE |
#define MIN_FOR_TEMP 18000 |
#define NM_CNT 'C' |
#define NM_MSRFULL 'E' |
name to use for all temperatures if MEASSET recording memory is full
Definition at line 88 of file hc.h.
Referenced by PrintMeasValues().
#define NM_OPMODE 'M' |
#define NM_TDINNOM 'D' |
#define NM_TFOR 'F' |
name of forerun temperature measurement value
Definition at line 56 of file hc.h.
Referenced by main(), and PrintMeasValues().
#define NM_TIME 'T' |
#define NM_TIN 'I' |
name of inner temperature measurement value
Definition at line 48 of file hc.h.
Referenced by main(), and PrintMeasValues().
#define NM_TOUT 'O' |
name of outer temperature measurement value
Definition at line 52 of file hc.h.
Referenced by main(), and PrintMeasValues().
#define OUT_TMP_SHDN_TH 20500 |
#define SHTDN_DUR 3 |
void ControlEngine | ( | ENG_MODE | em | ) |
takes care of the heating curve recording in eeprom
records only if outer temp value does not exist (specific hysteresis respected)
recCnt | record counter for list indexing |
set | current valid measurement set takes care of the mixer engine controlling (output pin switching) |
em | current engine mode |
mxp | mixer engine's step position |
Definition at line 432 of file hc.c.
References EM_CCW, EM_CW, EM_STOP, ENG_RUN_CCW, ENG_RUN_CW, ENG_STOP_CCW, and ENG_STOP_CW.
Referenced by DoControl(), and DoEngineTest().
realizes the main heater controlling algorithm
the value of inner temperature distinguishes between the controlling strategy:
leading the inner temperature if not equal to INVALID_VAL_I16, leading the forerun otherwise
inTemp | inner temperature |
outTemp | outer temperature |
forTemp | temperature of forerun |
learning | specifies whether in learning mode -> TRUE, or forerun controlling required -> FALSE |
min | minute value |
sec | second value |
Definition at line 279 of file hc.c.
References ENG_TIMER::allow, CM_DENY, CM_FOR, CM_MEAS, CM_REC, CM_SHDN, ENG_TIMER::cnt, ControlEngine(), DEL_FOR_TEMP, ENG_TIMER::em, EM_CCW, EM_CW, EM_STOP, FindForeRun(), MEASSET::forTemp, g_ctm, INT, MEASSET::inTemp, INVALID_VAL_U16, MAX_DEL_OUTER_TEMP, MAX_FOR_TEMP, MIN_FOR_TEMP, NUM_HR, old_min, MEASSET::outTemp, TRUE, UCHAR, and UINT.
Referenced by main().
void DoEngineTest | ( | BTN_CODE | bc | ) |
do engine testing dependent on button request, simply drives the mixer engine unconditionally
bc | button code of request |
Definition at line 495 of file hc.c.
References BC_DN, BC_DNUP, BC_NONE, BC_UP, ControlEngine(), EM_CCW, EM_CW, and EM_STOP.
Referenced by main().
gets the forerun temperature of the closest outer temperature which was recorded in learning phase
a predefined hysteresis supports a proper hit
outTemp | outer temperature as a parameter to find a proper close forerun temperature, will be updated on a hit by the value from eep |
range | delimits the number of entries in eeprom being searched - depends on the number of recorded entries (the recording state) |
delLim | the delta limit against which to check the calculated difference of the outer temperature |
Definition at line 387 of file hc.c.
References HCREC::forTemp, ge_hcRec, INT, INVALID_VAL_U16, HCREC::outTemp, and UCHAR.
Referenced by DoControl().
int main | ( | void | ) |
main controlling task
nominal temperature from setup
inner temp for controlling
outer temp for controlling
supply voltege of temperature sender
forerun temp for controlling
trace whether the context runs in the very first controlling cycle
offset value of button action for payload changes
counter for indexing the heating curve recording sets in e_hcRec of eeprom
indexer for measurement sets in ram, its value is an indicator of the time stamp when a set was captured - depending on the measurement interval
operation mode during controlling
button code for capturing
remember the previous seconds value
remember a time span of 5 seconds for meas value visualization
delta seconds
common time stamp for capturing
running tenth of a second
running seconds
running minutes
temporary measurement set in ram
previous control mode, indicator to write again
name of control mode in hrf
Definition at line 52 of file hc.c.
References ADC_TMP_INNER_ID, ADC_TMP_OUTER_ID, BC_DNUP, BC_NONE, CalcAdcTemp(), CalcSupplyVoltage(), CHAR, CM_DENY, DecodeButton(), DIR_UP, DoControl(), DoEngineTest(), DoSetup(), DT_INT, DT_TIME, DT_UCHAR, DT_UINT, FALSE, MEASSET::forTemp, g_ctm, g_min, g_sec, ge_hcrCnt, ge_msRec, GetCtrlMode(), GetSenderValues(), gMov(), Init(), INVALID_VAL_I16, INVALID_VAL_U16, NM_CNT, NM_OPMODE, NM_TFOR, NM_TIME, NM_TIN, NM_TOUT, NM_VOLT, NUM_HR, NUM_MS, NUM_MSR, old_min, OM_CONTI, OM_ENGTEST, OM_SENDER, OM_SETUP, OM_SHMEAS, OM_TMPCTRL, OP_MODES, OVM_MSR, PrintMeasValues(), PrintValue(), SetLimitValue(), sMov(), TRUE, UCHAR, UINT, and WriteCtrlMode().
puts the measurement values on screen
ms | current measurement set |
opm | current operation mode |
Definition at line 455 of file hc.c.
References DT_INT, DT_UINT, MEASSET::forTemp, MEASSET::inTemp, NM_MSRFULL, NM_TFOR, NM_TIN, NM_TOUT, OM_SETUP, OM_SHMEAS, MEASSET::outTemp, and PrintValue().
Referenced by main().
put a specific value on screen
dt | value's data type |
col | starting column of the output |
row | starting row of the output |
name | of value |
value | to put on screen |
Definition at line 480 of file hc.c.
References LCD_POS::col, MEASVAL::dt, MEASVAL::name, MEASVAL::pos, LCD_POS::row, MEASVAL::value, and WriteMeasVal().
Referenced by main(), and PrintMeasValues().