![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LGstaandart by
Diff: vibro.h
- Revision:
- 208:19150d2b528f
- Parent:
- 207:d1ce992f5d17
- Child:
- 209:224e7331a061
--- a/vibro.h Fri Jan 13 08:27:28 2017 +0000 +++ b/vibro.h Tue Feb 07 10:11:35 2017 +0000 @@ -55,6 +55,7 @@ #define AFRQ (1<<6) #define AVBT (1<<5) +#define MPLC (1<<4) #define APLC (1<<3) #define AHFO (1<<1) @@ -62,8 +63,8 @@ #define LedOFF Gyro.PinReg &= ~PinRegBitLED; //установить бит светодиода в "0" #define LedON Gyro.PinReg |= PinRegBitLED; //установить бит светодиода в "1" -#define StartBackLight 0x00000333 -#define StartDischarg 0x00000222 +#define StartBackLight 0x7 +#define StartDischarg 0x4 #define PinRegBitTXE (1<<5) #define PinRegBitLED (1<<4) @@ -72,15 +73,15 @@ #define PinRegBit_2V (1<<1) #define PinRegBit_1V (1<<0) -#define ShiftStart0 0x1 +#define ShiftStart0 0x0 #define ShiftStart1 0x1 #define ShiftStart2 0x2 #define ShiftStart3 0x3 -#define DropDelayGLD_0 50 -#define DropDelayGLD_1 50 -#define DropDelayGLD_2 65 -#define DropDelayGLD_3 80 +#define DropDelayGLD_0 150 +#define DropDelayGLD_1 150 +#define DropDelayGLD_2 170 +#define DropDelayGLD_3 180 extern int tempAMP; @@ -122,7 +123,8 @@ typedef struct _Gyro { unsigned int LogPLC; // 1 unsigned int Log; // 2 - + unsigned int PLC_Phase; + unsigned int PLC_Gain; unsigned int PLC_Lern; // 3 обратный таймер для поиска максимальной амплитуды при работе без модулятора unsigned int ModAmp; // 4 амплитуда модулятора @@ -133,17 +135,23 @@ unsigned int Reper_Event; // 8 событие для вывода набора параметров типа Rate по меандру. unsigned int Event_500Hz; + + unsigned int DAC_current_Work; //3 + unsigned int DAC_current_Start; //4 стартовый ток накачки? + unsigned int RgConA; // 9 регистр управления ГЛД unsigned int RgConB; //10 регистр управления ГЛД unsigned int Gain_Sin; //11 коиф усиления синуса. unsigned int Gain_Cos; //12 коиф усиления косинуса. + unsigned int FrqPhase; unsigned int Frq; //13 Непосредственное значение частоты для таймера. unsigned int FrqHZ; //14 Частота в Гц. unsigned int FrqHZmin; //15 Мин значение частоты ВП unsigned int FrqHZmax; //16 Мах значение частоты ВП unsigned int FrqChengSpeed; //17 скорость регулировки частоты ВП - + unsigned int L_vibro; + unsigned int VibroFrqRegulF; //18 флаг регулировки частоты ВП unsigned int VibroAMPRegulF; //19 флаг регулировки амплитуды ВП unsigned int VibroNoiseF; //20 флаг ошумления амплитуды ВП @@ -176,7 +184,10 @@ unsigned int DeltaT; //40 unsigned int In1; //41 unsigned int In2; //42 - + int Tmp_OffsetT4; //47 + int Tmp_OffsetT5; + float Tmp_scaleT4; //53 + float Tmp_scaleT5; //54 //пятый ацп, он же амплитудный детектор "AD". есть два фильтра быстрый "Fast" и медленный "Slow" unsigned int ADF_Accum; //43 Значенее амплитудного детектора Временное unsigned int ADS_Accum; //44 Значенее амплитудного детектора Временное @@ -211,35 +222,260 @@ unsigned int Discharg; //67 последовательность бит харрактеризующая форму сигнала поджига. unsigned int BackLight; //68 последовательность бит харрактеризующая форму сигнала подсветки. - + unsigned int LaserOn; unsigned int EXT_Latch; //69 } GyroT, *Gyro_p; extern GyroT Gyro; typedef union { - int Array[25]; + int Array[248]; struct { - unsigned int GLD_Serial; //0 серийный номер прибора + unsigned int My_Addres; //0 адрес прибора +unsigned int a1; //1 +unsigned int a2; //2 + unsigned int DAC_current_Work; //3 + unsigned int DAC_current_Start; //4 стартовый ток накачки? + +unsigned int FlashMod; //5 +unsigned int a4; //6 + +unsigned int PLC_Phase; //7 +unsigned int PLC_Gain; //8 + +unsigned int a6; //9 +unsigned int a7; //10 +unsigned int a8; //11 + unsigned int FrqPhase; //12 фаза + unsigned int FrqChengSpeed; //13 скорость регулировки частоты ВП + unsigned int FrqHZ; //14 + unsigned int FrqHZmin; //15 + unsigned int FrqHZmax; //16 + unsigned int VB_Fdf_Hi; //17 + unsigned int VB_Fdf_Lo; //18 + unsigned int AmpSpeed; //19 + unsigned int AmpPerMin; //20 + unsigned int AmpPerMax; //21 + unsigned int AmpPer; //22 + unsigned int AmpMin; //23 минимальное значение AmpT(частота ошумления); + unsigned int AmpTD; //24 диапозон частоты ошумления(частота ошумления); + unsigned int AmpPerDel; //25 амплитуда ошумления +unsigned int a9; //26 +unsigned int a10; //27 +unsigned int a11; //28 +unsigned int a12; //29 +unsigned int a13; //30 +unsigned int a14; //31 +unsigned int a15; //32 +unsigned int a16; //33 + unsigned int ModAmp; //34 амплитуда модулятора + +unsigned int a17; //35 +unsigned int a18; //36 +unsigned int a19; //37 +unsigned int a20; //38 +unsigned int a21; //39 +unsigned int a22; //40 +unsigned int a23; //41 +unsigned int a24; //42 +unsigned int a25; //43 +unsigned int a26; //44 +unsigned int a27; //45 +unsigned int a28; //46 + + unsigned int Tmp_OffsetT4; //47 + unsigned int Tmp_OffsetT5; //48 + +unsigned int a29; //49 +unsigned int a30; //50 +unsigned int a32; //51 +unsigned int a33; //52 + + unsigned int Tmp_scaleT4; //53 + unsigned int Tmp_scaleT5; //54 + +unsigned int a34; //55 + + unsigned int Gain_Sin; //56 коиф усиления синуса. + unsigned int Gain_Cos; //57 коиф усиления косинуса. +unsigned int Header_Word; //58 Признак достоверности + unsigned int ParamMod; //59 + unsigned int GLD_Serial; //60 серийный номер прибора + +unsigned int a35; //61 + +unsigned int TermoMode; //62 серийный номер прибора + +unsigned int a36; //63 +unsigned int a37; //64 +unsigned int a38; //65 +unsigned int a39; //66 +unsigned int a40; //67 +unsigned int a41; //68 +unsigned int a42; //69 +unsigned int a43; //70 +unsigned int a44; //71 +unsigned int a45; //72 +unsigned int a46; //73 +unsigned int a47; //74 +unsigned int a48; //75 +unsigned int a49; //76 +unsigned int a50; //77 +unsigned int a51; //78 +unsigned int a52; //79 +unsigned int a53; //80 +unsigned int a54; //81 +unsigned int a55; //82 +unsigned int a56; //83 +unsigned int a57; //84 +unsigned int a58; //85 +unsigned int a59; //86 +unsigned int a60; //87 +unsigned int a61; //88 +unsigned int a62; //89 +unsigned int a63; //90 +unsigned int a64; //91 +unsigned int a65; //92 +unsigned int a66; //93 +unsigned int a67; //94 +unsigned int a68; //95 +unsigned int a69; //96 +unsigned int a70; //97 +unsigned int a71; //98 +unsigned int a72; //99 +unsigned int a73; //100 +unsigned int a74; //101 +unsigned int a75; //102 +unsigned int a76; //103 +unsigned int a77; //104 + +unsigned int a78; //105 + +unsigned int a79; //106 +unsigned int a80; //107 + +unsigned int a81; //108 +unsigned int a82; //109 +unsigned int a83; //110 +unsigned int a84; //111 +unsigned int a85; //112 +unsigned int a86; //113 +unsigned int a87; //114 +unsigned int a88; //115 +unsigned int a89; //116 + +unsigned int TSHeat0; //117 +unsigned int TSHeat1; //118 +unsigned int TSHeat2; //119 +unsigned int TSHeat3; //120 +unsigned int TSHeat4; //121 +unsigned int TSHeat5; //122 +unsigned int TSHeat6; //123 +unsigned int TSHeat7; //124 +unsigned int TSHeat8; //125 +unsigned int TSHeat9; //126 +unsigned int TSHeat10; //127 +unsigned int TSHeat11; //128 +unsigned int TSHeat12; //129 +unsigned int TSHeat13; //130 + +unsigned int TermoDataHeat0; //131 +unsigned int TermoDataHeat1; //132 +unsigned int TermoDataHeat2; //133 +unsigned int TermoDataHeat3; //134 +unsigned int TermoDataHeat4; //135 +unsigned int TermoDataHeat5; //136 +unsigned int TermoDataHeat6; //137 +unsigned int TermoDataHeat7; //138 +unsigned int TermoDataHeat8; //139 +unsigned int TermoDataHeat9; //140 +unsigned int TermoDataHeat10; //141 +unsigned int TermoDataHeat11; //142 +unsigned int TermoDataHeat12; //143 +unsigned int TermoDataHeat13; //144 +unsigned int TermoDataHeat14; //145 +unsigned int TermoDataHeat15; //146 +unsigned int TermoDataHeat16; //147 +unsigned int TermoDataHeat17; //148 +unsigned int TermoDataHeat18; //149 +unsigned int TermoDataHeat19; //150 +unsigned int TermoDataHeat20; //151 +unsigned int TermoDataHeat21; //152 +unsigned int TermoDataHeat22; //153 +unsigned int TermoDataHeat23; //154 +unsigned int TermoDataHeat24; //155 +unsigned int TermoDataHeat25; //156 +unsigned int TermoDataHeat26; //157 +unsigned int TermoDataHeat27; //158 + +unsigned int Step; //159 + +unsigned int TSCool0; //160 +unsigned int TSCool1; //161 +unsigned int TSCool2; //162 +unsigned int TSCool3; //163 +unsigned int TSCool4; //164 +unsigned int TSCool5; //165 +unsigned int TSCool6; //166 +unsigned int TSCool7; //167 +unsigned int TSCool8; //168 +unsigned int TSCool9; //169 +unsigned int TSCool10; //170 +unsigned int TSCool11; //171 +unsigned int TSCool12; //172 +unsigned int TSCool13; //173 + +unsigned int TermoDataCool0; //174 +unsigned int TermoDataCool1; //175 +unsigned int TermoDataCool2; //176 +unsigned int TermoDataCool3; //177 +unsigned int TermoDataCool4; //178 +unsigned int TermoDataCool5; //179 +unsigned int TermoDataCool6; //180 +unsigned int TermoDataCool7; //181 +unsigned int TermoDataCool8; //182 +unsigned int TermoDataCool9; //183 +unsigned int TermoDataCool10; //184 +unsigned int TermoDataCool11; //185 +unsigned int TermoDataCool12; //186 +unsigned int TermoDataCool13; //187 +unsigned int TermoDataCool14; //188 +unsigned int TermoDataCool15; //189 +unsigned int TermoDataCool16; //190 +unsigned int TermoDataCool17; //191 +unsigned int TermoDataCool18; //192 +unsigned int TermoDataCool19; //193 +unsigned int TermoDataCool20; //194 +unsigned int TermoDataCool21; //195 +unsigned int TermoDataCool22; //196 +unsigned int TermoDataCool23; //197 +unsigned int TermoDataCool24; //198 +unsigned int TermoDataCool25; //199 +unsigned int TermoDataCool26; //200 +unsigned int TermoDataCool27; //201 + +/* +unsigned int a84; //131 +unsigned int a85; //132 +unsigned int a86; //133 +unsigned int a87; //134 +unsigned int a88; //135 +unsigned int a89; //136 + + + unsigned int Firmware_Version; //1 версия программы - unsigned int My_Addres; //2 адрес прибора unsigned int DropDelayGLD; //3 задержка для мультидропа (дискрета 100кГц) - - unsigned int ModAmp; //4 амплитуда модулятора - - unsigned int RgConA; //5 регистр управления ГЛД - unsigned int RgConB; //6 регистр управления ГЛД - unsigned int Gain_Sin; //7 коиф усиления синуса. unsigned int Gain_Cos; //8 коиф усиления косинуса. unsigned int FrqHZ; //9 Частота в Гц. unsigned int FrqHZmin; //10 Мин значение частоты ВП unsigned int FrqHZmax; //11 Мах значение частоты ВП - unsigned int FrqChengSpeed; //12 скорость регулировки частоты ВП + unsigned int AmpPer; //13 начальное значение амплитуды - unsigned int AmpMin; //14 минимальное значение AmpT(частота ошумления); - unsigned int AmpTD; //15 диапозон частоты ошумления(частота ошумления); + + unsigned int AmpPerDel; //16 значение для расчета амплитуды (дельта амплитуды) на сколько будет отличаться в працентах 1 амплитуда от второй при ошумлении, мин знач : AmpPer, мах знач : AmpPer+AmpPerDel; (в процентах) unsigned int AmpPerMin; //17 ограничение минимальной амплитуды ВП unsigned int AmpPerMax; //18 ограничение максимальной амплитуды ВП @@ -248,12 +484,13 @@ unsigned int TermoNKU; //21 - unsigned int wall; //22 - unsigned int ParamMod; //23 + + - unsigned int DAC_A; //24 + unsigned int DAC_B; //25 - + unsigned int Try_Discarg; + */ //unsigned int PLC_Lern; //3 обратный таймер для поиска максимальной амплитуды при работе без модулятора //unsigned int Frq; //6 Непосредственное значение частоты для таймера. } Str;