UKSS_ICE/measure.h

137 lines
2.6 KiB
C
Raw Normal View History

// <20><><EFBFBD>
#ifndef _MEASURE
#define _MEASURE
void Init_sensors(void);
void Init_optic(void);
void Init_packMask(void);
void Temper_count(int chan);
void Current_count(int chan);
void Power_count(int chan);
typedef union
{
struct
{
unsigned int Tear :1;
unsigned int Stick :1;
unsigned int Wry :1;
unsigned int Out :1;
unsigned int Over :1;
unsigned int Hyper :1;
unsigned int Contr1 :1;
unsigned int Contr2 :1;
unsigned int Stop :1;
unsigned int Ready :1;
unsigned int res :3;
unsigned int Latch :1;
unsigned int Ignor :1;
unsigned int Bypas :1;
} bit;
unsigned int all;
} ERROR;
typedef union
{
struct
{
unsigned int Error :1;
unsigned int Alarm :1;
unsigned int OverHeat :1;
unsigned int SubHeat :1;
unsigned int OutHeat :1;
unsigned int Test_lamp :1;
} bit;
unsigned int all;
} FLAG;
#define NOER 0xE000
#define EROR 0x01FF
#define SIG_FREQ 4000 // <20><>
#define READY_FREQ 1000 // <20><>
#define BLINK_FREQ 2 // <20><>
#define ADC_FREQ 5000//3885//777//2000//20000 //777 //3885 // <20><> (777*5)
#define DAC_FREQ 50 // <20><>
#define LOAD_TIME 10 // sec
#define SENS_ERR_WAIT 10
#define maximum_bright 10
/*
#define SNOW 1720.0 //1920.0
#define BOIL 2360.0 //2561.0
#define tmp_T_0 0.0
#define tmp_T_1 200.00
#define tmp_A1_0 978.0
#define tmp_A1_1 1686.0
#define tmp_A2_0 1017.0
#define tmp_A2_1 1736.0
#define eta_A1 1002.0
#define eta_A2 1542.0
*/
#define tmp_T_0 84.31 // 68Om
#define tmp_T_1 234.19 // 100Om
#define tmp_A1_0 540.0 // <20><><EFBFBD><EFBFBD><EFBFBD> 1 68<36><38>
#define tmp_A2_0 500.0 // <20><><EFBFBD><EFBFBD><EFBFBD> 1 100<30><30>
#define tmp_A1_1 1055.0 // <20><><EFBFBD><EFBFBD><EFBFBD> 2 68<36><38>
#define tmp_A2_1 1060.0 // <20><><EFBFBD><EFBFBD><EFBFBD> 2 100<30><30>
#define ZERO 27
#define mka300 2040
#define mka400 2700
#define C100 650
#define C150 2370
#define Cooling 5 // (<28><>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define COSPi6 0.86602540378443864676372317075294
#define RADIX2 1.4142135623730950488016887242097
#define CURRENT 1 // <20><><EFBFBD>
#define VOLTAGE 2 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define POWER_380 3 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 380<38>
#define POWER_220 4 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 220<32>
#define POWER_31 5 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 31<33>
#define POWER_24 6 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 24<32>
#define VIRT_24 7 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 24<32>
#define POWER_15 8 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 15<31>
#define TERMO_AD 9 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define TERMO_RS 10 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define OPTIC 11 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
extern int MAX_TPL_CANAL;
extern FILTERBAT filter[];
extern ERROR * sens_error;
extern int * sens_hi_edge;
extern int * sens_lo_edge;
extern int adc0[],tmp0[];
#define Zero_lev (adc0+12) //((int *)&Modbus[0x74])
extern float tmpK[];
extern FLAG chk,sig;
extern int sens_type[];
extern int period_ready;
#endif //_MEASURE