DAS
3.1.6 - 18/09/2017
|
DAS Temperatures management. More...
#include <windows.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "mgui.h"
#include "DAS_Spatram.h"
#include "dcl.h"
#include "dxl.h"
Go to the source code of this file.
Macros | |
#define | CONTROLED_BAND 15 |
#define | D_GAIN 0.9 |
#define | I_COUNT_DEC 4 |
#define | I_COUNT_MAX 2 |
#define | I_GAIN 0.5 |
#define | I_VALUE_MAX 40 |
#define | MAX_TEMP (50 * 2) |
#define | P_GAIN 0.9 |
Functions | |
float | Calculate (float TARGET, float CURRENT, float POWER) |
int | D_readtemp (void) |
void | OMU_AssignPow (int pow) |
void | OMU_ChooseDir (int mod) |
int | OMU_ColdOnly (void) |
void | OMU_DoPeltPow (int mod, int pow) |
int | OMU_HC (void) |
int | OMU_HeatOnly (void) |
int | OMU_TemperatureHandle (void) |
int | PID_Calc (int mod, int pow) |
void | Task_AMSH (TIMEOUT_ID id, void *data) |
AMS Home Task. Refresh the temperatures during DAS execution. More... | |
void | Task_CCD_Temp (TIMEOUT_ID id, void *data) |
CCD Temperature Task. Provide the thermoregulation of the CCD sensor during DAS execution. More... | |
void | Task_LIS_Temp (TIMEOUT_ID id, void *data) |
OMU Thermoregulation Task. Provide the thermoregulation of the Optical Mechanical Unit In addition allows the CCD sensor temperature to be driven by the SZA . More... | |
void | Task_REFRESH_Temp (TIMEOUT_ID id, void *data) |
Temperatures Task. Refresh the temperatures during DAS execution. More... | |
Variables | |
adtester | ADTESTER |
das | DAS |
unsigned int | FirstTimeP = 0 |
unsigned char | I_Counter |
unsigned char | Intergral = 0 |
omuthr | OMUTHR |
DAS Temperatures management.
Definition in file Chktemp.c.
#define CONTROLED_BAND 15 |
Definition at line 56 of file Chktemp.c.
Referenced by Calculate().
#define D_GAIN 0.9 |
Definition at line 31 of file Chktemp.c.
Referenced by Calculate().
#define I_COUNT_DEC 4 |
Definition at line 51 of file Chktemp.c.
Referenced by Calculate().
#define I_COUNT_MAX 2 |
Definition at line 50 of file Chktemp.c.
Referenced by Calculate().
#define I_GAIN 0.5 |
Definition at line 32 of file Chktemp.c.
Referenced by Calculate().
#define I_VALUE_MAX 40 |
Definition at line 52 of file Chktemp.c.
Referenced by Calculate().
#define MAX_TEMP (50 * 2) |
Definition at line 59 of file Chktemp.c.
Referenced by Calculate().
#define P_GAIN 0.9 |
Definition at line 30 of file Chktemp.c.
Referenced by Calculate().
float Calculate | ( | float | TARGET, |
float | CURRENT, | ||
float | POWER | ||
) |
Definition at line 267 of file Chktemp.c.
References CONTROLED_BAND, D_GAIN, FLAG, I_COUNT_DEC, I_COUNT_MAX, I_Counter, I_GAIN, I_VALUE_MAX, Intergral, MAX_TEMP, flag::OMU_TempReached, and P_GAIN.
int D_readtemp | ( | void | ) |
Definition at line 1284 of file Chktemp.c.
References flag::ADPC104, flag::ADTempTest, omuthr::ADVolt, controlpanel::Albl_LS, controlpanel::Albl_LT, gui::ContrPanel, D_rt(), das::DOption, paramini::EqType, FLAG, GASCODNG4, das::Gui, Incr_Read_Temp, adtester::lblADvalue, LIS_, MObjectSetText(), adtester::OutputMode, das::Paramini, optionini::refertemp, SPATRAM3, omuthr::Temperature, omuthr::Temptemp, and paramini::TPelt.
Referenced by Task_LIS_Temp(), and Task_REFRESH_Temp().
void OMU_AssignPow | ( | int | pow | ) |
Definition at line 425 of file Chktemp.c.
References controlpanel::Albl_LS, AMS2, AMS_PWM(), gui::ContrPanel, omuthr::CoolCnt, das::Gui, LIM_PELTPOW, LISTEMP_TASK_TIME, MAX_PELTPOW, MObjectSetText(), and PeltFlg.
Referenced by OMU_DoPeltPow(), and Task_LIS_Temp().
void OMU_ChooseDir | ( | int | mod | ) |
Definition at line 328 of file Chktemp.c.
References gui::ContrPanel, paramini::EqType, FANFlg, FANPeltier(), das::Gui, controlpanel::ledpelt, MPixmapSetImageFile(), das::Paramini, PeltFlg, Peltier(), and SPATRAM2.
Referenced by OMU_DoPeltPow(), and Task_LIS_Temp().
int OMU_ColdOnly | ( | void | ) |
Definition at line 513 of file Chktemp.c.
References omuthr::CoolPT, omuthr::CoolTmp, omuthr::CoolTT, LIM_PELTPOW, OMU_DoPeltPow(), omuthr::PCPower, PID_Calc(), and omuthr::PID_On.
Referenced by OMU_TemperatureHandle().
void OMU_DoPeltPow | ( | int | mod, |
int | pow | ||
) |
Definition at line 470 of file Chktemp.c.
References AMS2, AMS_PWM_OFF(), AMS_PWM_Zero(), paramini::EqType, OMU_AssignPow(), OMU_ChooseDir(), p, das::Paramini, and SPATRAM2.
Referenced by OMU_ColdOnly(), OMU_HC(), and OMU_HeatOnly().
int OMU_HC | ( | void | ) |
Definition at line 597 of file Chktemp.c.
References omuthr::CoolTmp, omuthr::CoolTT, LIM_PELTPOW, OMU_DoPeltPow(), omuthr::PCPower, omuthr::PHPower, and PID_Calc().
Referenced by OMU_TemperatureHandle(), and SZA_FirstCalc().
int OMU_HeatOnly | ( | void | ) |
Definition at line 562 of file Chktemp.c.
References omuthr::CoolPT, omuthr::CoolTmp, omuthr::CoolTT, LIM_PELTPOW, OMU_DoPeltPow(), omuthr::PCPower, and omuthr::PHPower.
Referenced by OMU_TemperatureHandle().
int OMU_TemperatureHandle | ( | void | ) |
Definition at line 773 of file Chktemp.c.
References omuthr::CoolAT, omuthr::CoolCnt, omuthr::CoolPT, omuthr::CoolSts, omuthr::CoolTmp, omuthr::CoolTT, das::DOption, OMU_ColdOnly(), OMU_HC(), OMU_HeatOnly(), omuthr::ReachTemp, optionini::refertemp, TRTBOTH, TRTCOOL, TRTHEAT, and omuthr::TRType.
Referenced by Task_LIS_Temp().
int PID_Calc | ( | int | mod, |
int | pow | ||
) |
Definition at line 78 of file Chktemp.c.
References omuthr::CoolAT, omuthr::CoolTT, delta, LISTEMP_TASK_TIME, omuthr::PID_kd, omuthr::PID_ki, omuthr::PID_kp, and Status().
Referenced by OMU_ColdOnly(), and OMU_HC().
void Task_AMSH | ( | TIMEOUT_ID | id, |
void * | data | ||
) |
AMS Home Task.
Refresh the temperatures during DAS execution.
Definition at line 1047 of file Chktemp.c.
References AMS1, AMS_chkbitsts(), flag::AMS_H, AMS_TrackOff(), AMSH_TASK_TIME, FLAG, MAddTimeout(), and Task_AMSH().
Referenced by Task_AMSH().
void Task_CCD_Temp | ( | TIMEOUT_ID | id, |
void * | data | ||
) |
CCD Temperature Task.
Provide the thermoregulation of the CCD sensor during DAS execution.
Definition at line 1068 of file Chktemp.c.
References controlpanel::Albl_CS, marconi::CCDTemp, CCDTEMP_TASK_TIME, CELSIUS, gui::ContrPanel, paramini::CoolPw, D_FixSZA(), DB_InitCamera(), DC_CoolerStatus(), DC_GetPower(), DC_GetTemp(), DC_SetPower(), DC_SetTemp(), flag::DeltaSZA, flag::exec, flag::ExeDSZA, FLAG, das::Flag, FlgSM_Stop, das::Gui, paramini::ITemp, dsza::LastMSZA, MAddTimeout(), das::Marconi, MObjectSetText(), das::Paramini, omuthr::ReachTemp, flag::REINITCCD, S_zenetr, Status(), SZADelta, Task_CCD_Temp(), and flag::UPS_Battery.
Referenced by LaunchBackTask(), and Task_CCD_Temp().
void Task_LIS_Temp | ( | TIMEOUT_ID | id, |
void * | data | ||
) |
OMU Thermoregulation Task.
Provide the thermoregulation of the Optical Mechanical Unit
In addition allows the CCD sensor temperature to be driven by the SZA
.
Definition at line 873 of file Chktemp.c.
References _MAX_PATH, flag::ADPC104, flag::ADTempTest, controlpanel::Albl_LS, CELSIUS, gui::ContrPanel, omuthr::CoolAT, omuthr::CoolCnt, paramini::CoolPw, omuthr::CoolTT, D_readtemp(), DC_SetPower(), DC_SetTemp(), DeltaTPrec, das::DOption, paramini::EqType, FANECU(), FirstTime, FirstTimeP, FLAG, FlgSM_Stop, das::Gui, Incr_Read_Temp, controlpanel::lbl_Par, LIS_, LISTEMP_TASK_TIME, MAddTimeout(), Master, MObjectSetText(), OMU_AssignPow(), OMU_ChooseDir(), OMU_TemperatureHandle(), das::Paramini, omuthr::PCPower, omuthr::PHPower, PrgFile, optionini::refertemp, S_zenetr, flag::settemp070, flag::settemp7080, flag::settemp8095, flag::settempvar, Task_LIS_Temp(), omuthr::Temperature, and paramini::TPelt.
Referenced by ADTesterCB(), CloseConfigCB(), LaunchBackTask(), and Task_LIS_Temp().
void Task_REFRESH_Temp | ( | TIMEOUT_ID | id, |
void * | data | ||
) |
Temperatures Task.
Refresh the temperatures during DAS execution.
Definition at line 1579 of file Chktemp.c.
References flag::AMS_H, D_readtemp(), FLAG, MAddTimeout(), REFRESHTEMP_TASK_TIME, and Task_REFRESH_Temp().
Referenced by LaunchBackTask(), and Task_REFRESH_Temp().
adtester ADTESTER |
Definition at line 20 of file Chktemp.c.
Referenced by InitFlags().
das DAS |
Definition at line 26 of file Chktemp.c.
Referenced by DAS_Error(), DB_Save(), DE_StepMotor(), DT_ColFormat(), MDCreateSh_PWD(), and WriteColumn().
unsigned int FirstTimeP = 0 |
Definition at line 64 of file Chktemp.c.
Referenced by Task_LIS_Temp().
unsigned char I_Counter |
Definition at line 63 of file Chktemp.c.
Referenced by Calculate().
unsigned char Intergral = 0 |
Definition at line 62 of file Chktemp.c.
Referenced by Calculate().