![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
CntrlGLD.h@0:8ad47e2b6f00, 2016-01-30 (annotated)
- Committer:
- igor_v
- Date:
- Sat Jan 30 13:00:39 2016 +0000
- Revision:
- 0:8ad47e2b6f00
- Child:
- 1:f2adcae3d304
2016_01_30;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
igor_v | 0:8ad47e2b6f00 | 1 | |
igor_v | 0:8ad47e2b6f00 | 2 | #ifndef DEVICE |
igor_v | 0:8ad47e2b6f00 | 3 | #define DEVICE |
igor_v | 0:8ad47e2b6f00 | 4 | |
igor_v | 0:8ad47e2b6f00 | 5 | //e. constants for the piecewise-linear thermocompensation //r. êîíñòàíòû äëÿ êóñî÷íî-ëèíåéíîé òåðìîêîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 6 | #define TERMO_FUNC_SIZE 14 //e. amount of the points of the table function of thermocompensation //r. êîëè÷åñòâî òî÷åê òàáëè÷íîé ôóíêöèè òåðìîêîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 7 | #define MAX_ORDER 9 //e. maximal value of order for the thermocompensation coefficients //r. ìàêñèìàëüíàÿ âåëè÷èíà ïîðÿäêà äëÿ êîýôôèöèåíòîâ òåðìîêîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 8 | #define TSENS_NUMB 4 //e. number of the temperature sensor used for the thermocompensation //r. íîìåð òåðìîäàò÷èêà, èñïîëüçóåìîãî äëÿ êîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 9 | |
igor_v | 0:8ad47e2b6f00 | 10 | typedef enum _TERMO_MODE //e. thermocompensation modes //r. ðåæèìû ðàáîòû òåðìîêîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 11 | { |
igor_v | 0:8ad47e2b6f00 | 12 | TERMO_OFF, //e. thermocompensation is switched off //r. òåðìîêîìïåíñàöèÿ âûêëþ÷åíà |
igor_v | 0:8ad47e2b6f00 | 13 | TERMO_ON, //e. thermocompensation is switched on //r. òåðìîêîìïåíñàöèÿ âêëþ÷åíà |
igor_v | 0:8ad47e2b6f00 | 14 | TERMO_ON_NUMB_OFF, //e. thermocompensation is switched on, number resets (debug mode) //r. òåðìîêîìïåíñàöèÿ âêëþ÷åíà, ÷èñëî çàíóëÿåòñÿ (îòëàäî÷íûé ðåæèì) |
igor_v | 0:8ad47e2b6f00 | 15 | TERMO_ON_STATIC_ONLY, //e. only static thermocompensation is switched on //r. âêëþ÷åíà òîëüêî ñòàòè÷åñêàÿ òåðìîêîìïåíñàöèÿ |
igor_v | 0:8ad47e2b6f00 | 16 | TERMO_ON_DYNAMIC_ONLY, //e. only dynamic thermocompensation is switched on //r. âêëþ÷åíà òîëüêî äèíàìè÷åñêàÿ òåðìîêîìïåíñàöèÿ |
igor_v | 0:8ad47e2b6f00 | 17 | TERMO_ON_STATIC_ONLY_NUMB_OFF, //e. static thermocompensation is switched on, number resets (debug mode) //r. ñòàòè÷åñêàÿ òåðìîêîìïåíñàöèÿâêëþ÷åíà, ÷èñëî çàíóëÿåòñÿ (îòëàäî÷íûé ðåæèì) |
igor_v | 0:8ad47e2b6f00 | 18 | TERMO_ON_DYNAMIC_ONLY_NUMB_OFF //e. dynamic thermocompensation is switched on, number resets (debug mode) //r. äèíàìè÷åñêàÿ òåðìîêîìïåíñàöèÿâêëþ÷åíà, ÷èñëî çàíóëÿåòñÿ (îòëàäî÷íûé ðåæèì) |
igor_v | 0:8ad47e2b6f00 | 19 | } TERMO_MODE; |
igor_v | 0:8ad47e2b6f00 | 20 | |
igor_v | 0:8ad47e2b6f00 | 21 | typedef enum _WATCH_MODE //e. variants of control points for scope //r. âàðèàíòû êîíòðîëüíûõ òî÷åê äëÿ îñöèëëîãðàôà |
igor_v | 0:8ad47e2b6f00 | 22 | { |
igor_v | 0:8ad47e2b6f00 | 23 | VB_DELAY_MEANDER, //e. the delayed on the VB_phs meander //r. çàäåðæàííûé ìåàíäð íà âåëè÷èíó VB_phs |
igor_v | 0:8ad47e2b6f00 | 24 | VB_PHASE_DETECTOR, //e. output of the PD of the dither drive //r. âûõîä ôàçîâîãî äåòåêòîðà âèþðîïðèâîäà |
igor_v | 0:8ad47e2b6f00 | 25 | VB_PHASE_DETECTOR_1_SEC, //e. output of integral of the PD of the dither drive for 1 Sec //r. âûõîä èíòåãðàëà ÔÄ âèáðîïðèâîäà çà 1 ñåê |
igor_v | 0:8ad47e2b6f00 | 26 | VB_INTEGRATOR_40T, //e. output of integral of the PD of the dither drive for 40 periods //r. âûõîä èíòåãðàëà ÔÄ âèáðîïðèâîäà çà 40 ïåðèîäîâ |
igor_v | 0:8ad47e2b6f00 | 27 | WP_PHASE_DETECTOR //e. output of the PD of the CPLC regulator //r. âûõîä ôàçîâîãî äåòåêòîðà êîíòóðà ÑÐÏ |
igor_v | 0:8ad47e2b6f00 | 28 | } WATCH_MODE; |
igor_v | 0:8ad47e2b6f00 | 29 | |
igor_v | 0:8ad47e2b6f00 | 30 | //e. ===== device operation modes ================================================================ //r. ===== ðåæèìû ðàáîòû ïðèáîðà ================================================================ |
igor_v | 0:8ad47e2b6f00 | 31 | #define DM_INT_10KHZ_LATCH 1 //e. mode of internal latch 10 kHz //r. ðåæèì âíóòðåííåé çàùåëêè 10 êÃö |
igor_v | 0:8ad47e2b6f00 | 32 | #define DM_INT_LATCH_DELTA_PS 2 |
igor_v | 0:8ad47e2b6f00 | 33 | #define DM_INT_LATCH_DELTA_BINS 3 |
igor_v | 0:8ad47e2b6f00 | 34 | #define DM_EXT_LATCH_DELTA_PS_PULSE 4 //e. mode of external latch with output of the Delta_PS command by pulse //r. ðåæèì âíåøíåé çàùåëêè ñ âûäà÷åé êîìàíäû Delta_PS ïî èìïóëüñó |
igor_v | 0:8ad47e2b6f00 | 35 | #define DM_EXT_LATCH_DELTA_BINS_PULSE 6 //e. mode of external latch with output of the Delta_BINS command by pulse//r. ðåæèì âíåøíåé çàùåëêè ñ âûäà÷åé êîìàíäû Delta_BINS ïî èìïóëüñó |
igor_v | 0:8ad47e2b6f00 | 36 | #define DM_EXT_LATCH_DELTA_SF_PULSE 7 //e. mode of Delta Scale factor //r. ðåæèì Delta_SF command |
igor_v | 0:8ad47e2b6f00 | 37 | |
igor_v | 0:8ad47e2b6f00 | 38 | //e. *** the BLOCK of VARIABLES, LOADED from FLASH-memory ********************** //r. *** ÁËÎÊ ÏÅÐÅÌÅÍÍÛÕ, ÇÀÃÐÓÆÀÅÌÛÕ èç FLASH-ïàìÿòè ********************** |
igor_v | 0:8ad47e2b6f00 | 39 | //e. Address (parameter number in the block = 0..255 ) //r. Àäðåñ (Íîìåð ïàðàìåòðà â áëîêå = 0..255) |
igor_v | 0:8ad47e2b6f00 | 40 | typedef union |
igor_v | 0:8ad47e2b6f00 | 41 | { |
igor_v | 0:8ad47e2b6f00 | 42 | int Array[171]; |
igor_v | 0:8ad47e2b6f00 | 43 | struct |
igor_v | 0:8ad47e2b6f00 | 44 | { // Device_blk |
igor_v | 0:8ad47e2b6f00 | 45 | int My_Addres; //e. 0 - device own address //r.0 - ñîáñòâåííûé àäðåñ óñòðîéñòâà |
igor_v | 0:8ad47e2b6f00 | 46 | |
igor_v | 0:8ad47e2b6f00 | 47 | //e. =============== parameters of HFO regulator =============== //r. =============== ïàðàìåòðû êîíòóðà Â× ãåíåðàòîðà íàêà÷êè =============== |
igor_v | 0:8ad47e2b6f00 | 48 | int HF_ref; //e. 1 - value of the reference //r. 1 - çíà÷åíèå îïîðû |
igor_v | 0:8ad47e2b6f00 | 49 | int HF_scl; //e. 2 - the gain factor (1.15) //r. 2 - êîýôôèöèåíò ïåðåäà÷è (1.15) |
igor_v | 0:8ad47e2b6f00 | 50 | int HF_min; //r. 3 - ìèíèìóì âûõîäíîãî çíà÷åíèÿ íà ÖÀÏå ðåãóëÿòîðà (ñîîòâåòñòâóåò ìàêñèì. íàïðÿæåíèþ íà ÃÂ×) |
igor_v | 0:8ad47e2b6f00 | 51 | int HF_max; //e. 4 - maximum of the output value on the regulator DAC (appropriate to minimal voltage on the HFO) //r. 4 - ìàêñèìóì âûõîäíîãî çíà÷åíèÿ íà ÖÀÏå ðåãóëÿòîðà (ñîîòâåòñòâóåò ìèíèì. íàïðÿæåíèþ íà ÃÂ×) |
igor_v | 0:8ad47e2b6f00 | 52 | |
igor_v | 0:8ad47e2b6f00 | 53 | //e. =============== parameters of the regulator of the DS power regulator ========== //r. =============== ïàðàìåòðû êîíòóðà ðåãóëèðîâàíèÿ ìîùíîñòè ÄÓÏ ========== |
igor_v | 0:8ad47e2b6f00 | 54 | int RI_ref; //e. 5 - value of the reference //r. 5 - çíà÷åíèå îïîðû |
igor_v | 0:8ad47e2b6f00 | 55 | int RI_scl; //e. 6 - the gain factor (1.15) //r. 6 - êîýôôèöèåíò ïåðåäà÷è (1.15) |
igor_v | 0:8ad47e2b6f00 | 56 | |
igor_v | 0:8ad47e2b6f00 | 57 | //e. =============== parameters of the CPLC regulator ===== //r. =============== ïàðàìåòðû êîíòóðà ñòàáèëèçàöèè ðàáî÷åãî ïåðèìåòðà (ÑÐÏ) ===== |
igor_v | 0:8ad47e2b6f00 | 58 | int WP_ref; //e. 7 - value of the reference //r. 7 - çíà÷åíèå îïîðû |
igor_v | 0:8ad47e2b6f00 | 59 | int WP_scl; //e. 8 - the gain factor (1.15) //r. 8 - êîýôôèöèåíò ïåðåäà÷è (1.15) |
igor_v | 0:8ad47e2b6f00 | 60 | int WP_mdy; //e. 9 - value of the reset delay //r. 9 - çíà÷åíèå çàäåðæêè ñáðîñà |
igor_v | 0:8ad47e2b6f00 | 61 | int WP_rup; //e. 10 - upper value of DAC adjustment (appropriate to minimal voltage on the heater) //r. 10 - âåðõíåå çíà÷åíèå ðåãóëèðîâêè ÖÀÏ (ñîîòâåòñòâóåò ìèíèì. íàïðÿæåíèþ íà íàãðåâàòåëå) |
igor_v | 0:8ad47e2b6f00 | 62 | int WP_rdw; //e. 11 - lower value of the DAC adjustment (appropriate to maximal voltage on the heater) //r. 11 - âåðõíåå çíà÷åíèå ðåãóëèðîâêè ÖÀÏ (ñîîòâåòñòâóåò ìàêñèì. íàïðÿæåíèþ íà íàãðåâàòåëå) |
igor_v | 0:8ad47e2b6f00 | 63 | |
igor_v | 0:8ad47e2b6f00 | 64 | //e. =============== parameters of the dither drive regulator of the GLD ==================== //r. =============== ïàðàìåòðû êîíòóðà âèáðîïðèâîäà ÃËÄ ==================== |
igor_v | 0:8ad47e2b6f00 | 65 | int VB_phs; //e. 12 - the phase delay parameter of the dither drive PLL //r. 12 - ïàðàìåòð Phase_çàä. ÑÐ× âèáðîïðèâîäà |
igor_v | 0:8ad47e2b6f00 | 66 | int VB_scl; //e. 13 - the gain factor (1.15) of the dither drive PLL //r. 13 - êîýôôèöèåíò ïåðåäà÷è (1.15) ÑÐ× âèáðîïðèâîäà |
igor_v | 0:8ad47e2b6f00 | 67 | unsigned int VB_N; //e. 14 - divider for dither drive period (defines dither period) //r. 14 - êîýôô.äåëåíèÿ N âèáðîïðèâîäà (ïåðèîä êîëåáàíèé) ÂÏ |
igor_v | 0:8ad47e2b6f00 | 68 | unsigned int VB_Nmin; //e. 15 - minimum of the output value of the oscillation period regulator //r. 15 - ìèíèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà ïåðèîäà |
igor_v | 0:8ad47e2b6f00 | 69 | unsigned int VB_Nmax; //e. 16 - maximum of the output value of the oscillation period regulator //r. 16 - ìàêñèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà ïåðèîäà |
igor_v | 0:8ad47e2b6f00 | 70 | |
igor_v | 0:8ad47e2b6f00 | 71 | int VB_Fdf_Hi; //e. 17 - adjusted output frequency (H) //r. 17 - çàäàííàÿ ÷àñòîòà ðàñùåïëåíèÿ (H) |
igor_v | 0:8ad47e2b6f00 | 72 | unsigned int VB_Fdf_Lo; //e. 18 - (L) (double precision) //r. 18 - (L) (äâîéíàÿ òî÷íîñòü) |
igor_v | 0:8ad47e2b6f00 | 73 | |
igor_v | 0:8ad47e2b6f00 | 74 | int VB_Fsc; //e. 19 - the gain factor of the frequency regulator //r. 19 - êîýôôèöèåíò ïåðåäà÷è ðåãóëÿòîðà ÷àñòîòû ðàñùåïëåíèÿ |
igor_v | 0:8ad47e2b6f00 | 75 | unsigned int VB_Tmin; //e. 20 - the gain factor of the frequency regulator //r. 19 - êîýôôèöèåíò ïåðåäà÷è ðåãóëÿòîðà ÷àñòîòû ðàñùåïëåíèÿ |
igor_v | 0:8ad47e2b6f00 | 76 | unsigned int VB_Tmax; //e. 21 - maximum of the output value of the regulator //r. 21 - ìàêñèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà Tau |
igor_v | 0:8ad47e2b6f00 | 77 | unsigned int VB_tau; //e. 22 - pulse width of the dither drive (without noise)//r. 22 - äëèòåëüíîñòü èìïóëüñà âèáðîïðèâîäà (äî îøóìëåíèÿ) |
igor_v | 0:8ad47e2b6f00 | 78 | int VBN_Tzd; //e. 23 - adjusted noise period //r. 23 - çàäàííûé ïåðèîä îøóìëåíèÿ |
igor_v | 0:8ad47e2b6f00 | 79 | int VBN_Ran; //e. 24 - range of the random component of noise //r. 24 - äèàïàçîí ñëó÷àéíîé ñîñòàâëÿþùåé îøóìëåíèÿ VBN_Tsl |
igor_v | 0:8ad47e2b6f00 | 80 | int VBN_k; //e. 25 - adjusted noise constant //r. 25 - çàäàííàÿ êîíñòàíòà îøóìëåíèÿ |
igor_v | 0:8ad47e2b6f00 | 81 | |
igor_v | 0:8ad47e2b6f00 | 82 | //e. =============== parameters of processing of accurate data ============= //r. =============== ïàðàìåòðû îáðàáîòêè òî÷íîñòíîé èíôîðìàöèè ============= |
igor_v | 0:8ad47e2b6f00 | 83 | int PI_Fsc; //_ //e. 26 - the S_ds scale parameter //r. 26 - ìàñøòàáíûé êîýôôèöèåíò Säóï |
igor_v | 0:8ad47e2b6f00 | 84 | int PI_Fb0; //_ //e. 27 - the B_ds zero shift of the DS //r. 27 - ñìåùåíèå íóëÿ ÄÓÏà Bäóï |
igor_v | 0:8ad47e2b6f00 | 85 | int PI_scl; //_ //e. 28 - the Scale scale coefficient of the gyro //r. 28 - ìàñøòàáíûé êîýôô. ãèðîñêîïà Scale |
igor_v | 0:8ad47e2b6f00 | 86 | int PI_bia; //_ //e. 29 - the Bias zero shift of the gyro //r. 29 - ñìåùåíèå íóëÿ ãèðîñêîïà Bias |
igor_v | 0:8ad47e2b6f00 | 87 | |
igor_v | 0:8ad47e2b6f00 | 88 | //e. =============== coefficients of the temperature correction ================= //r. =============== êîýôôèöèåíòû òåìïåðàòóðíîé êîððåêöèè ================= |
igor_v | 0:8ad47e2b6f00 | 89 | int PI_a0; //_ // 30 |
igor_v | 0:8ad47e2b6f00 | 90 | int PI_a1; //_ // 31 |
igor_v | 0:8ad47e2b6f00 | 91 | int PI_a2; //_ // 32 |
igor_v | 0:8ad47e2b6f00 | 92 | int PI_a3; //_ // 33 |
igor_v | 0:8ad47e2b6f00 | 93 | int PI_a4; //_ // 34 |
igor_v | 0:8ad47e2b6f00 | 94 | int PI_a5; //_ // 35 |
igor_v | 0:8ad47e2b6f00 | 95 | int PI_a6; //_ // 36 |
igor_v | 0:8ad47e2b6f00 | 96 | int PI_b1; //_ // 37 |
igor_v | 0:8ad47e2b6f00 | 97 | int PI_b2; //_ // 38 |
igor_v | 0:8ad47e2b6f00 | 98 | int PI_b3; //_ // 39 |
igor_v | 0:8ad47e2b6f00 | 99 | int PI_b4; //_ // 40 |
igor_v | 0:8ad47e2b6f00 | 100 | int PI_b5; //_ // 41 |
igor_v | 0:8ad47e2b6f00 | 101 | int PI_b6; //_ // 42 |
igor_v | 0:8ad47e2b6f00 | 102 | |
igor_v | 0:8ad47e2b6f00 | 103 | //e. =============== parameters of normalization of the temperature sensors ============= //r. =============== ïàðàìåòðû íîðìèðîâêè äàò÷èêîâ òåìïåðàòóðû ============= |
igor_v | 0:8ad47e2b6f00 | 104 | |
igor_v | 0:8ad47e2b6f00 | 105 | int Tmp_bias[6]; //_ //e. 43 - an array of shifts of the 0..5 temperature sensors //r. 43 - ìàññèâ ñäâèãîâ òåìïåðàòóðíûõ äàò÷èêîâ 0..5 |
igor_v | 0:8ad47e2b6f00 | 106 | int Tmp_scal[6]; //_ //e. 49 - an array of the scale coefficients of temperature sensors//r. 49 - ìàññèâ ìàñøòàáíûõ ê-òîâ òåìïåðàòóðíûõ äàò÷èêîâ |
igor_v | 0:8ad47e2b6f00 | 107 | int WP_reset; //e. 55 - initial position of the CPLC regulator (after reset) //r. 55 - èñõîäíîå ïîëîæåíèå ðåãóëÿòîðà ÑÐÏ (ïîñëå ñáðîñà) |
igor_v | 0:8ad47e2b6f00 | 108 | |
igor_v | 0:8ad47e2b6f00 | 109 | //e. ================ gain factor of photodetector channels =========== //r. ================ ê-ò óñèëåíèÿ êàíàëîâ ôîòîïðèåìíèêà =========== |
igor_v | 0:8ad47e2b6f00 | 110 | unsigned int Gain_Ph_A; //e. 56 - initial gain factor of the A channel of photodetector //r. 56 - íà÷àëüíûé ê-ò óñèëåíèÿ êàíàëà À ôîòîïðèåìíèêà |
igor_v | 0:8ad47e2b6f00 | 111 | unsigned int Gain_Ph_B; //e. 57 - initial gain factor of the B channel of photodetector //r. 57 - íà÷àëüíûé ê-ò óñèëåíèÿ êàíàëà B ôîòîïðèåìíèêà |
igor_v | 0:8ad47e2b6f00 | 112 | |
igor_v | 0:8ad47e2b6f00 | 113 | //e. =============== switch of the source of loading GLD variables block === //r. =============== ïåðåêëþ÷àòåëü èñòî÷íèêà çàãðóçêè áëîêà ïåðåìåííûõ ÃËÄ (ãàëî÷êà â íàñòîðîå÷íîé ïðîãðàììå) |
igor_v | 0:8ad47e2b6f00 | 114 | int Header_Word; //e. 58 - flash sector validity header //r. 58 - çàãîëîâîê-êëþ÷ ê èíäèêàòîðó èñòî÷íèêà çàãðóçêè |
igor_v | 0:8ad47e2b6f00 | 115 | int LoadFlash_enable; //e. 59 - source loading flag: 1 - load from the flash //r. 59 - ïðèçíàê èñòî÷íèêà çàãðóçêè: 1 - ãðóçèòüñÿ èç flesh |
igor_v | 0:8ad47e2b6f00 | 116 | //e. 0 - load default parameters (factory) //r. 0 - ãðóçèòü ïàðàìåòðû ïî óìîë÷àíèþ (çàâîäñêèå) |
igor_v | 0:8ad47e2b6f00 | 117 | unsigned int Device_SerialNumber; //e. 60 - serial number of the device //r. 60 - ñåðèéíûé íîìåð ïðèáîðà |
igor_v | 0:8ad47e2b6f00 | 118 | int Reserved0; //e. 61 - not used |
igor_v | 0:8ad47e2b6f00 | 119 | TERMO_MODE TermoMode; //e 62 - device operation mode (with thermocompenstion, without it, debug )//r. 62 - ðåæèì ðàáîòû ïðèáîðà (ñ òåðìîêîìïåíñàöèåé, áåç íåå èëè îòëàäêà) |
igor_v | 0:8ad47e2b6f00 | 120 | //e. addition for the piecewise-linear termocorrection //r. äîáàâëåíèå äëÿ êóñî÷íî-ëèíåéíîé òåðìîêîððåêöèè |
igor_v | 0:8ad47e2b6f00 | 121 | int TemperInt[TERMO_FUNC_SIZE]; //e. 63 |
igor_v | 0:8ad47e2b6f00 | 122 | float TermoFunc[TERMO_FUNC_SIZE]; //e. 77 |
igor_v | 0:8ad47e2b6f00 | 123 | int WP_reset2; //e. 91 - voltages of CPLC regulator reset at cooling //r. xx - íàïðÿæåíèÿ îáíóëåíèÿ êîíòóðà ÑÐÏ ïðè îõëàæäåíèè |
igor_v | 0:8ad47e2b6f00 | 124 | //e. parameters setting termocompensation parameters in dynamics (at heating and cooling) //r. ïàðàìåòðû, çàäàþùèå ïàðàìåòðû òåðìîêîìïåíñàöèè â äèíàìèêå (ïðè íàãðåâå è îõëàæäåíèè) |
igor_v | 0:8ad47e2b6f00 | 125 | float Reserved1; //e. 92 - not used |
igor_v | 0:8ad47e2b6f00 | 126 | float Reserved2; //e. 93 - not used |
igor_v | 0:8ad47e2b6f00 | 127 | int K_vb_tu; //e. 94 - slope of dependence of the VB_N division factor from temperature (as though Hz/degree, but in relative units ) //r. êðóòèçíà çàâèñèìîñòè êîýôôèöèåíòà äåëåíèÿ VB_N îò òåìïåðàòóðû (êàê áû Ãö/ãðàäóñ, íî â ó.å.) |
igor_v | 0:8ad47e2b6f00 | 128 | int TemperNormal; //e. 95 -temperature for which the VB_N division factor of the dither drive is set //r. òåìïåðàòóðà, äëÿ êîòîðîé çàäàí êîýôôèöèåíò äåëåíèÿ âèáðîïðèâîäà VB_N |
igor_v | 0:8ad47e2b6f00 | 129 | int K_WP_rst_heating; //r. 96 - êðóòèçíà çàâèñèìîñòè íàïðÿæåíèÿ îáíóëåíèÿ ïðè íàãðåâàíèè îò òåìïåðàòóðû (êàê áû âîëüò/ãðàäóñ, íî â ó.å. ÖÀÏ è òåðìîäàò÷èêîâ ) |
igor_v | 0:8ad47e2b6f00 | 130 | int K_WP_rst_cooling; //e. 97 - slope of dependence of a reset voltage at cooling from temperature (as though Volt/degree, but in relative units of DAC and temperature sensors) //r. êðóòèçíà çàâèñèìîñòè íàïðÿæåíèÿ îáíóëåíèÿ ïðè îõëàæäåíèè îò òåìïåðàòóðû (êàê áû âîëüò/ãðàäóñ, íî â ó.å. ÖÀÏ è òåðìîäàò÷èêîâ ) |
igor_v | 0:8ad47e2b6f00 | 131 | int WP_transition_step; //e. 98 - step of change of a heater voltage at resetting //r. øàã èçìåíåíèÿ íàïðÿæåíèÿ íàãðåâàòåëÿ ïðè âûïîëíåíèè îáíóëåíèÿ |
igor_v | 0:8ad47e2b6f00 | 132 | int Reserved3; // e. 99 -not used |
igor_v | 0:8ad47e2b6f00 | 133 | int HF_scl_2; //r. 100 - êîýôôèöèåíò ïåðåäà÷è (1.15) êîíòóðà ÃÂ× ïðè îáíóëåíèè |
igor_v | 0:8ad47e2b6f00 | 134 | int TemperIntDyn[TERMO_FUNC_SIZE]; //e. 114 - |
igor_v | 0:8ad47e2b6f00 | 135 | float ThermoHeatDelta[TERMO_FUNC_SIZE]; //e. 128 - |
igor_v | 0:8ad47e2b6f00 | 136 | int DeltaTempRecalc; //r. 129 - òåìïåðàòóðíûé èíòåðâàë ïåðåñ÷åòà äèíàìè÷. êîìïåíñàöèè (â ó.å.) //e. temperature delta for dynamic thermocompensation recalculation(in relative units) |
igor_v | 0:8ad47e2b6f00 | 137 | int TemperCoolIntDyn[TERMO_FUNC_SIZE]; // e. 143 - |
igor_v | 0:8ad47e2b6f00 | 138 | float ThermoCoolDelta[TERMO_FUNC_SIZE]; //e. 157 - |
igor_v | 0:8ad47e2b6f00 | 139 | } Str; |
igor_v | 0:8ad47e2b6f00 | 140 | } TDEVICE_BLK; |
igor_v | 0:8ad47e2b6f00 | 141 | |
igor_v | 0:8ad47e2b6f00 | 142 | |
igor_v | 0:8ad47e2b6f00 | 143 | |
igor_v | 0:8ad47e2b6f00 | 144 | |
igor_v | 0:8ad47e2b6f00 | 145 | |
igor_v | 0:8ad47e2b6f00 | 146 | |
igor_v | 0:8ad47e2b6f00 | 147 | |
igor_v | 0:8ad47e2b6f00 | 148 | |
igor_v | 0:8ad47e2b6f00 | 149 | |
igor_v | 0:8ad47e2b6f00 | 150 | |
igor_v | 0:8ad47e2b6f00 | 151 | |
igor_v | 0:8ad47e2b6f00 | 152 | //e. ************ end of the BLOCK of VARIABLES, LOADED from FLASH-memory ************ //r. ************ êîíåö áëîêà çàãðóæàåìûõ èç ôëýø-ïàìÿòè ïàðàìåòðîâ ÃËÄ ************ |
igor_v | 0:8ad47e2b6f00 | 153 | extern TDEVICE_BLK Device_blk; //e. the BLOCK of VARIABLES, LOADED from FLASH-memory //r. ÁËÎÊ ÏÅÐÅÌÅÍÍÛÕ, ÇÀÃÐÓÆÀÅÌÛÕ èç FLASH-ïàìÿòè |
igor_v | 0:8ad47e2b6f00 | 154 | |
igor_v | 0:8ad47e2b6f00 | 155 | extern int Device_Mode; |
igor_v | 0:8ad47e2b6f00 | 156 | extern unsigned Valid_Data; |
igor_v | 0:8ad47e2b6f00 | 157 | |
igor_v | 0:8ad47e2b6f00 | 158 | extern unsigned ser_num; |
igor_v | 0:8ad47e2b6f00 | 159 | |
igor_v | 0:8ad47e2b6f00 | 160 | extern int VB_Nmin0; //r. ìèíèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà ïåðèîäà äëÿ òåìïåðàòóðû Device_blk.TemperNormal |
igor_v | 0:8ad47e2b6f00 | 161 | extern int VB_Nmax0; //r. ìàêñèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà ïåðèîäà äëÿ òåìïåðàòóðû Device_blk.TemperNormal |
igor_v | 0:8ad47e2b6f00 | 162 | |
igor_v | 0:8ad47e2b6f00 | 163 | extern unsigned BIT_number; |
igor_v | 0:8ad47e2b6f00 | 164 | extern unsigned Is_BIT; |
igor_v | 0:8ad47e2b6f00 | 165 | |
igor_v | 0:8ad47e2b6f00 | 166 | extern unsigned start_Rq; //r. çàïðîñ íà çàïóñê ïðèáîðà |
igor_v | 0:8ad47e2b6f00 | 167 | extern unsigned stop_Rq; //r. çàïðîñ íà îñòàíîâ ïðèáîðà |
igor_v | 0:8ad47e2b6f00 | 168 | extern unsigned pulse_Rq; //r. çàïðîñ íà ïîäæèã ëàçåðà |
igor_v | 0:8ad47e2b6f00 | 169 | |
igor_v | 0:8ad47e2b6f00 | 170 | //r. *** Ïðèáîðíûå ïàðàìåòðû ïî óìîë÷àíèþ *** |
igor_v | 0:8ad47e2b6f00 | 171 | #define DEVICE_SN 1 //r. ñåðèéíûé íîìåð ïðèáîðà = 01 |
igor_v | 0:8ad47e2b6f00 | 172 | #define My_Addres_const 0 //r. - ñîáñòâåííûé àäðåñ óñòðîéñòâà |
igor_v | 0:8ad47e2b6f00 | 173 | |
igor_v | 0:8ad47e2b6f00 | 174 | //r. ====== ïàðàìåòðû êîíòóðà Â× ãåíåðàòîðà íàêà÷êè =============== |
igor_v | 0:8ad47e2b6f00 | 175 | |
igor_v | 0:8ad47e2b6f00 | 176 | #define HF_REF_CONST 15080 //r. 1 - çíà÷åíèå îïîðû |
igor_v | 0:8ad47e2b6f00 | 177 | #define HF_SCL_CONST 1 //r. 2 - êîýôôèöèåíò ïåðåäà÷è (1.15) |
igor_v | 0:8ad47e2b6f00 | 178 | #define HF_MIN_CONST -32668 //r. 3 - ìèíèìóì âûõîäíîãî çíà÷åíèÿ íà ÖÀÏå ðåãóëÿòîðà (ñîîòâåòñòâóåò ìàêñèì. íàïðÿæåíèþ íà ÃÂ×) |
igor_v | 0:8ad47e2b6f00 | 179 | #define HF_MAX_CONST -17379 //r. 4 - ìàêñèìóì âûõîäíîãî çíà÷åíèÿ íà ÖÀÏå ðåãóëÿòîðà (ñîîòâåòñòâóåò ìèíèì. íàïðÿæåíèþ íà ÃÂ×) |
igor_v | 0:8ad47e2b6f00 | 180 | #define HFO_SHIFT 16 //r. ÷èñëî ðàçðÿäîâ äðîáíîé ÷àñòè â 32-õáèòîâîé ïåðåìåííîé hf_reg32 |
igor_v | 0:8ad47e2b6f00 | 181 | |
igor_v | 0:8ad47e2b6f00 | 182 | //r. ====== ïàðàìåòðû êîíòóðà ñòàáèëèçàöèè ðàáî÷åãî ïåðèìåòðà (ÑÐÏ) ===== |
igor_v | 0:8ad47e2b6f00 | 183 | |
igor_v | 0:8ad47e2b6f00 | 184 | #define WP_REF_CONST 5 //r. 7 - çíà÷åíèå îïîðû |
igor_v | 0:8ad47e2b6f00 | 185 | #define WP_SCL_CONST 5 //r. 8 - êîýôôèöèåíò ïåðåäà÷è (1.15) |
igor_v | 0:8ad47e2b6f00 | 186 | #define WP_MDY_CONST 30 //r. 9 - çíà÷åíèå çàäåðæêè ñáðîñà |
igor_v | 0:8ad47e2b6f00 | 187 | #define WP_RUP_CONST 31936 //r. 10 - íèæíåå çíà÷åíèå ðåãóëèðîâêè ÖÀÏ (ñîîòâåòñòâóåò ìèíèì. íàïðÿæåíèþ íà íàãðåâàòåëå) |
igor_v | 0:8ad47e2b6f00 | 188 | #define WP_RDW_CONST 11801 //r. 11 - âåðõíåå çíà÷åíèå ðåãóëèðîâêè ÖÀÏ (ñîîòâåòñòâóåò ìàêñèì. íàïðÿæåíèþ íà íàãðåâàòåëå) |
igor_v | 0:8ad47e2b6f00 | 189 | |
igor_v | 0:8ad47e2b6f00 | 190 | |
igor_v | 0:8ad47e2b6f00 | 191 | //r. =============== ïàðàìåòðû êîíòóðà âèáðîïðèâîäà ÃËÄ ==================== |
igor_v | 0:8ad47e2b6f00 | 192 | |
igor_v | 0:8ad47e2b6f00 | 193 | #define VB_PHS_CONST 4 //r. 12 - ïàðàìåòð Phase_çàä. ÑÐ× âèáðîïðèâîäà |
igor_v | 0:8ad47e2b6f00 | 194 | #define VB_SCL_CONST 1024 //r. 13 - êîýôôèöèåíò ïåðåäà÷è (1.15) ÑÐ× âèáðîïðèâîäà |
igor_v | 0:8ad47e2b6f00 | 195 | #define T_VIB_START 16600 //r. 14 - êîýôô.äåëåíèÿ N âèáðîïðèâîäà (ïåðèîä êîëåáàíèé) ÂÏ |
igor_v | 0:8ad47e2b6f00 | 196 | //r. _VB_N íà÷àëüíûé ïåðèîä êîëåáàíèé âèáðîïðèâîäà (406Hz-18916, 17067 - 450Hz) |
igor_v | 0:8ad47e2b6f00 | 197 | #define T_VIB_DELTA 1000 //r. äèàïàçîí èçìåíåíèÿ ïåðèîäà êîëåáàíèé âèáðîïðèâîäà (~ +/- 10 Hz) |
igor_v | 0:8ad47e2b6f00 | 198 | |
igor_v | 0:8ad47e2b6f00 | 199 | #define VB_NMIN_CONST 12080 //r. 15 - ìèíèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà ïåðèîäà |
igor_v | 0:8ad47e2b6f00 | 200 | #define VB_NMAX_CONST 64000 //r. 16 - ìàêñèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà ïåðèîäà |
igor_v | 0:8ad47e2b6f00 | 201 | #define VB_FDF_HI_CONST 3 //r. 17 - çàäàííàÿ ÷àñòîòà ðàñùåïëåíèÿ (H) |
igor_v | 0:8ad47e2b6f00 | 202 | #define VB_FDF_LO_CONST 0 //r. 18 - (L) (äâîéíàÿ òî÷íîñòü) |
igor_v | 0:8ad47e2b6f00 | 203 | #define VB_FSC_CONST -2000 //r. 19 - êîýôôèöèåíò ïåðåäà÷è ðåãóëÿòîðà ÷àñòîòû ðàñùåïëåíèÿ |
igor_v | 0:8ad47e2b6f00 | 204 | #define VB_TMIN_CONST 100 //r. 20 - ìèíèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà Tau |
igor_v | 0:8ad47e2b6f00 | 205 | #define VB_TMAX_CONST 10022 //r. 21 - ìàêñèìóì âûõîäíîãî çíà÷åíèÿ ðåãóëÿòîðà Tau |
igor_v | 0:8ad47e2b6f00 | 206 | #define L_VIB_START 5120 //r. 22 - äëèòåëüíîñòü èìïóëüñà âèáðîïðèâîäà (äî îøóìëåíèÿ) |
igor_v | 0:8ad47e2b6f00 | 207 | //r. _VB_tau íà÷àëüíàÿ äëèòåëüíîñòü èìïóëüñà âèáðîïðèâîäà |
igor_v | 0:8ad47e2b6f00 | 208 | |
igor_v | 0:8ad47e2b6f00 | 209 | #define VBN_TZD_CONST 500 //r. 23 - çàäàííûé ïåðèîä îøóìëåíèÿ (êîíñòàíòà ïîëüçîâàòåëÿ) |
igor_v | 0:8ad47e2b6f00 | 210 | #define VBN_RAN_CONST 400 //r. 24 - äèàïàçîí ñëó÷àéíîé ñîñòàâëÿþùåé îøóìëåíèÿ VBN_Tsl |
igor_v | 0:8ad47e2b6f00 | 211 | #define VBN_K_CONST 7000 //r. 25 - çàäàííàÿ êîíñòàíòà îøóìëåíèÿ (êîíñòàíòà ïîëüçîâàòåëÿ) |
igor_v | 0:8ad47e2b6f00 | 212 | |
igor_v | 0:8ad47e2b6f00 | 213 | //r. =============== ïàðàìåòðû êîíòóðà ðåãóëèðîâàíèÿ ìîùíîñòè ÄÓÏ ========== |
igor_v | 0:8ad47e2b6f00 | 214 | #define RI_REF_CONST 25600 //r. 5 - çíà÷åíèå îïîðû |
igor_v | 0:8ad47e2b6f00 | 215 | #define RI_SCL_CONST 0 //r. 6 - êîýôôèöèåíò ïåðåäà÷è (1.15) |
igor_v | 0:8ad47e2b6f00 | 216 | |
igor_v | 0:8ad47e2b6f00 | 217 | |
igor_v | 0:8ad47e2b6f00 | 218 | //r. =============== ïàðàìåòðû îáðàáîòêè òî÷íîñòíîé èíôîðìàöèè ============= |
igor_v | 0:8ad47e2b6f00 | 219 | #define PI_FSC_CONST 128 //r. 26 - ìàñøòàáíûé êîýôôèöèåíò Säóï |
igor_v | 0:8ad47e2b6f00 | 220 | #define PI_FB0_CONST 0 //r. 27 - ñìåùåíèå íóëÿ ÄÓÏà Bäóï |
igor_v | 0:8ad47e2b6f00 | 221 | #define PI_SCL_CONST 256 //r. 28 - ìàñøòàáíûé êîýôô. ãèðîñêîïà Scale |
igor_v | 0:8ad47e2b6f00 | 222 | #define PI_BIA_CONST 0 //r. 29 - ñìåùåíèå íóëÿ ãèðîñêîïà Bias |
igor_v | 0:8ad47e2b6f00 | 223 | |
igor_v | 0:8ad47e2b6f00 | 224 | //r. =============== êîýôôèöèåíòû òåìïåðàòóðíîé êîððåêöèè ================= |
igor_v | 0:8ad47e2b6f00 | 225 | #define PI_A0_CONST 0 // 30 |
igor_v | 0:8ad47e2b6f00 | 226 | #define PI_A1_CONST 0 // 31 |
igor_v | 0:8ad47e2b6f00 | 227 | #define PI_A2_CONST 0 // 32 |
igor_v | 0:8ad47e2b6f00 | 228 | #define PI_A3_CONST 0 // 33 |
igor_v | 0:8ad47e2b6f00 | 229 | #define PI_A4_CONST 0 // 34 |
igor_v | 0:8ad47e2b6f00 | 230 | #define PI_A5_CONST 0 // 35 |
igor_v | 0:8ad47e2b6f00 | 231 | #define PI_A6_CONST 0 // 36 |
igor_v | 0:8ad47e2b6f00 | 232 | #define PI_B1_CONST 0 // 37 |
igor_v | 0:8ad47e2b6f00 | 233 | #define PI_B2_CONST 0 // 38 |
igor_v | 0:8ad47e2b6f00 | 234 | #define PI_B3_CONST 0 // 39 |
igor_v | 0:8ad47e2b6f00 | 235 | #define PI_B4_CONST 0 // 40 |
igor_v | 0:8ad47e2b6f00 | 236 | #define PI_B5_CONST 0 // 41 |
igor_v | 0:8ad47e2b6f00 | 237 | #define PI_B6_CONST 0 // 42 |
igor_v | 0:8ad47e2b6f00 | 238 | |
igor_v | 0:8ad47e2b6f00 | 239 | #define TMP_SCALE 0x4000 // 43 - 54 Tmp_bias[6]; Tmp_scal[6] |
igor_v | 0:8ad47e2b6f00 | 240 | #define TMP_BIAS 0 |
igor_v | 0:8ad47e2b6f00 | 241 | #define WP_RESET_CONST 7360 // 55 |
igor_v | 0:8ad47e2b6f00 | 242 | #define WP_RESET2_CONST 29216 |
igor_v | 0:8ad47e2b6f00 | 243 | #define WP_TRANS_STEP 32767 |
igor_v | 0:8ad47e2b6f00 | 244 | //r. ================ íà÷àëüíûé ê-ò óñèëåíèÿ êàíàëîâ ôîòîïðèåìíèêà =========== |
igor_v | 0:8ad47e2b6f00 | 245 | #define G_PHOTO_STRA 60 // 56 |
igor_v | 0:8ad47e2b6f00 | 246 | #define G_PHOTO_STRB 60 // 57 |
igor_v | 0:8ad47e2b6f00 | 247 | |
igor_v | 0:8ad47e2b6f00 | 248 | //r. =============== ïåðåêëþ÷àòåëü èñòî÷íèêà çàãðóçêè áëîêà ïåðåìåííûõ ÃËÄ === |
igor_v | 0:8ad47e2b6f00 | 249 | #define HEADER_WORD_CONST 0x55aa //r. 58 - çàãîëîâîê-êëþ÷ ê èíäèêàòîðó èñòî÷íèêà çàãðóçêè |
igor_v | 0:8ad47e2b6f00 | 250 | |
igor_v | 0:8ad47e2b6f00 | 251 | #define DITHER_REG_PERIOD 40 //r. ïåðèîä ðåãóëèðîâàíèÿ âèáðîïðèîäà (â ïåðèîäàõ âèáðîïðèâîäà) |
igor_v | 0:8ad47e2b6f00 | 252 | |
igor_v | 0:8ad47e2b6f00 | 253 | #define PLC_RESET_THRESHOLD (-3276) //r. ñîîòâåòñòâóåò íàïðÿæåíèþ +1.2 âîëüòà |
igor_v | 0:8ad47e2b6f00 | 254 | |
igor_v | 0:8ad47e2b6f00 | 255 | //r. ìèí.äîïóñòèìàÿ ÷àñòîòà ðàñùåïëåíèÿ, ïðè êîò. äàííûå ñ÷èòàþòñÿ äîñòîâåðíûìè |
igor_v | 0:8ad47e2b6f00 | 256 | #define F_RAS_MIN 10000 //r. ìèíèìàëüíàÿ ÷àñòîòà ðàñùåïëåíèÿ ïðè ñòàðòå |
igor_v | 0:8ad47e2b6f00 | 257 | #define F_OUT_MIN (5000>>4) // 5000 Ãö / 16 |
igor_v | 0:8ad47e2b6f00 | 258 | #define F_OUT_NORM (70000>>4) // 90000 Ãö / 16 |
igor_v | 0:8ad47e2b6f00 | 259 | #define F_OUT_MAX (300000>>4) // 300000 Ãö / 16 |
igor_v | 0:8ad47e2b6f00 | 260 | |
igor_v | 0:8ad47e2b6f00 | 261 | #define Set_LightUp LPC_GPIO0->FIOSET = (1<<4) //set light up signal |
igor_v | 0:8ad47e2b6f00 | 262 | #define Reset_LightUp LPC_GPIO0->FIOCLR = (1<<4) //reset light up signal |
igor_v | 0:8ad47e2b6f00 | 263 | |
igor_v | 0:8ad47e2b6f00 | 264 | //r. êîíñòàíòû äëÿ êóñî÷íî-ëèíåéíîé òåðìîêîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 265 | #define TERMO_FUNC_SIZE 14 //r. êîëè÷åñòâî òî÷åê òàáëè÷íîé ôóíêöèè òåðìîêîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 266 | #define MAX_ORDER 9 //r. ìàêñèìàëüíàÿ âåëè÷èíà ïîðÿäêà äëÿ êîýôôèöèåíòîâ òåðìîêîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 267 | #define TSENS_NUMB 4 //r. íîìåð òåðìîäàò÷èêà, èñïîëüçóåìîãî äëÿ êîìïåíñàöèè |
igor_v | 0:8ad47e2b6f00 | 268 | |
igor_v | 0:8ad47e2b6f00 | 269 | #define VALID_START_4SEC 3 //r. âðåìÿ ïîñëå ñòàðòà, êîãäà òåìïåðàòóðà ñòàëà äîñòîâåðíîé |
igor_v | 0:8ad47e2b6f00 | 270 | |
igor_v | 0:8ad47e2b6f00 | 271 | #define N_START_MAX 1 // 4 //r. ÷èñëî ïîïûòîê çàïóñêà ïðèáîðà |
igor_v | 0:8ad47e2b6f00 | 272 | #define LIGHT_UP_PULSE_WDTH 5000 //1000 //e. width of light-up pulse = 100 msec |
igor_v | 0:8ad47e2b6f00 | 273 | #define LIGHT_UP_PAUSE 1000 //e. pause after light-up = 100 msec |
igor_v | 0:8ad47e2b6f00 | 274 | #define LIGHT_UP_POLLING 10000 //e. time of waiting laser generation = 1 sec |
igor_v | 0:8ad47e2b6f00 | 275 | |
igor_v | 0:8ad47e2b6f00 | 276 | // Status word errors bits |
igor_v | 0:8ad47e2b6f00 | 277 | #define OUT_FREQ_ERROR 0x8000 |
igor_v | 0:8ad47e2b6f00 | 278 | #define DITH_FREQ_ERROR 0x4000 |
igor_v | 0:8ad47e2b6f00 | 279 | #define HFO_VOLT_ERROR 0x2000 |
igor_v | 0:8ad47e2b6f00 | 280 | #define THERMO_RANGE_ERROR 0x1000 |
igor_v | 0:8ad47e2b6f00 | 281 | #define THERMO_DIFF_ERROR 0x0800 |
igor_v | 0:8ad47e2b6f00 | 282 | |
igor_v | 0:8ad47e2b6f00 | 283 | #define TS_MIN -2500 // minimal temperature for our thermal sensors |
igor_v | 0:8ad47e2b6f00 | 284 | #define TS_MAX +13000 // maximal temperature for our thermal sensors |
igor_v | 0:8ad47e2b6f00 | 285 | #define TS_DIFF_MAX 1300 // maximal difference between 2 thermal sensors |
igor_v | 0:8ad47e2b6f00 | 286 | |
igor_v | 0:8ad47e2b6f00 | 287 | #define HFO_NEG_MIN 8738 // -4.5 V |
igor_v | 0:8ad47e2b6f00 | 288 | #define HFO_NEG_MAX 25122 // -10.5 V |
igor_v | 0:8ad47e2b6f00 | 289 | #define HFO_POZ_MIN -32221 // +10.5 V |
igor_v | 0:8ad47e2b6f00 | 290 | #define HFO_POZ_MAX -15837 // +4.5 V |
igor_v | 0:8ad47e2b6f00 | 291 | |
igor_v | 0:8ad47e2b6f00 | 292 | //e. ================ bits of the main register (_RgConA) of GLD control ============== |
igor_v | 0:8ad47e2b6f00 | 293 | //r. ================ áèòû îñíîâíîãî ðåãèñòðà óïðàâëåíèÿ GLD (_RgConA) =============== |
igor_v | 0:8ad47e2b6f00 | 294 | //e. ================ (bits of the status register) ============================ |
igor_v | 0:8ad47e2b6f00 | 295 | //r. ================ (îíè æå - áèòû ðåãèñòðà ñîñòîÿíèÿ) ============================ |
igor_v | 0:8ad47e2b6f00 | 296 | #define LASER_ON 0x0001 //r. âêë./âûêë. ãåíåðàöèþ ëàçåðà |
igor_v | 0:8ad47e2b6f00 | 297 | #define HF_REG_ON 0x0002 //r. âêë./âûêë. êîíòóð ÃÂ× |
igor_v | 0:8ad47e2b6f00 | 298 | #define RI_REG_ON 0x0004 //r. âêë./âûêë. êîíòóð ìîùíîñòè ÄÓÏ |
igor_v | 0:8ad47e2b6f00 | 299 | #define WP_REG_ON 0x0008 //r. ìàñêà âêë./âûêë. êîíòóðà ÑÐÏ |
igor_v | 0:8ad47e2b6f00 | 300 | #define WP_SIN_ON 0x0010 //r. âêë./âûêë. ïîèñêîâûé ñèãíàë ÑÐÏ |
igor_v | 0:8ad47e2b6f00 | 301 | #define VB_TAU_ON 0x0020 //r. âêë./âûêë. êîíòóð àìïëèòóäû âèáðîðèâîäà |
igor_v | 0:8ad47e2b6f00 | 302 | #define VB_FREQ_ON 0x0040 //r. âêë./âûêë. êîíòóð ÷àñòîòû âèáðîïðèâîäà |
igor_v | 0:8ad47e2b6f00 | 303 | #define GLD_ON 0x0080 //r. âêë./âûêë. âåñü ÃËÄ |
igor_v | 0:8ad47e2b6f00 | 304 | |
igor_v | 0:8ad47e2b6f00 | 305 | // Status word errors bits |
igor_v | 0:8ad47e2b6f00 | 306 | #define OUT_FREQ_ERROR 0x8000 |
igor_v | 0:8ad47e2b6f00 | 307 | #define DITH_FREQ_ERROR 0x4000 |
igor_v | 0:8ad47e2b6f00 | 308 | #define HFO_VOLT_ERROR 0x2000 |
igor_v | 0:8ad47e2b6f00 | 309 | #define THERMO_RANGE_ERROR 0x1000 |
igor_v | 0:8ad47e2b6f00 | 310 | #define THERMO_DIFF_ERROR 0x0800 |
igor_v | 0:8ad47e2b6f00 | 311 | |
igor_v | 0:8ad47e2b6f00 | 312 | #define loop_is_closed(loop_bit) ((RgConA & (loop_bit)) == loop_bit) |
igor_v | 0:8ad47e2b6f00 | 313 | #define close_loop(loop_bit) RgConA |= loop_bit |
igor_v | 0:8ad47e2b6f00 | 314 | #define open_loop(loop_bit) RgConA &= ~(loop_bit) |
igor_v | 0:8ad47e2b6f00 | 315 | //r. âûêëþ÷èòü âñå êîíòóðà ðåãóëèðîâàíèÿ |
igor_v | 0:8ad47e2b6f00 | 316 | #define open_all_loops() RgConA = 0 |
igor_v | 0:8ad47e2b6f00 | 317 | #define close_all_loops() RgConA = 0xFFFF |
igor_v | 0:8ad47e2b6f00 | 318 | |
igor_v | 0:8ad47e2b6f00 | 319 | extern unsigned SRgR; //r.ñèñòåìíîãî ðåãèñòðà ðåæèìà ïëàòû ADSP |
igor_v | 0:8ad47e2b6f00 | 320 | |
igor_v | 0:8ad47e2b6f00 | 321 | extern unsigned RgConA; //r. îñíîâíîé ðåãèñòð óïðàâëåíèÿ óñòðîéñòâà |
igor_v | 0:8ad47e2b6f00 | 322 | extern unsigned RgConB; //r. äîïîëíèòåëüíûé ðåãèñòð óïðàâëåíèÿ |
igor_v | 0:8ad47e2b6f00 | 323 | //extern unsigned Copy_e5_RgR; //r. êîïèÿ ðåãèñòðà ðåæèìà ïëàòû E5 |
igor_v | 0:8ad47e2b6f00 | 324 | //extern unsigned Copy_e5_RgRA; //r. êîïèÿ äîïîëíèòåëüíîãî ðåãèñòðà ðåæèìà E5 |
igor_v | 0:8ad47e2b6f00 | 325 | |
igor_v | 0:8ad47e2b6f00 | 326 | void contrl_GLD(void); |
igor_v | 0:8ad47e2b6f00 | 327 | #endif |
igor_v | 0:8ad47e2b6f00 | 328 | |
igor_v | 0:8ad47e2b6f00 | 329 |