![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
main.c@107:4d178bcc9d8a, 2016-04-01 (annotated)
- Committer:
- Kovalev_D
- Date:
- Fri Apr 01 16:13:55 2016 +0000
- Revision:
- 107:4d178bcc9d8a
- Parent:
- 106:250ddd8629c6
- Child:
- 108:030cdde08314
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
igor_v | 8:5188b1448d34 | 1 | //ssdfwewedfsfds |
igor_v | 0:8ad47e2b6f00 | 2 | /****************************************Copyright (c)**************************************************** |
igor_v | 0:8ad47e2b6f00 | 3 | **--------------File Info--------------------------------------------------------------------------------- |
igor_v | 0:8ad47e2b6f00 | 4 | ** File name: main.c |
igor_v | 0:8ad47e2b6f00 | 5 | ** Last modified Date: 2011-10-24 |
igor_v | 0:8ad47e2b6f00 | 6 | ** Last Version: V1.00 |
igor_v | 0:8ad47e2b6f00 | 7 | ** Descriptions: The main() function |
igor_v | 0:8ad47e2b6f00 | 8 | ** |
igor_v | 0:8ad47e2b6f00 | 9 | **-------------------------------------------------------------------------------------------------------- |
igor_v | 0:8ad47e2b6f00 | 10 | ** Created by: Electrooptica Incorp. |
igor_v | 0:8ad47e2b6f00 | 11 | ** Created date: 2011-08-22 |
igor_v | 0:8ad47e2b6f00 | 12 | ** Version: V1.00 |
igor_v | 3:ed8744c5f67a | 13 | ** Descriptions: |
igor_v | 3:ed8744c5f67a | 14 | **-------------------------------------------------------------------------------------------------------- |
igor_v | 30:17c84ed091b3 | 15 | последнии изменения |
igor_v | 30:17c84ed091b3 | 16 | //2016_02_03_17_47 |
igor_v | 31:c783288001b5 | 17 | //2016_02_06 igor |
igor_v | 37:bdd52117b56e | 18 | //2016_06 Dima |
Kovalev_D | 41:70d12776d1ef | 19 | //2016_02_06 21:20 Kovalev_D |
igor_v | 0:8ad47e2b6f00 | 20 | *********************************************************************************************************/ |
igor_v | 21:bc8c1cec3da6 | 21 | |
igor_v | 0:8ad47e2b6f00 | 22 | |
igor_v | 0:8ad47e2b6f00 | 23 | #include "Global.h" |
igor_v | 0:8ad47e2b6f00 | 24 | //#include <math.h> |
Diletant | 74:f4d9c3403578 | 25 | #include "Device.h" |
Kovalev_D | 10:8d2edc51f3c9 | 26 | |
igor_v | 0:8ad47e2b6f00 | 27 | /****************************************************************************** |
igor_v | 0:8ad47e2b6f00 | 28 | ** Main Function main() |
igor_v | 0:8ad47e2b6f00 | 29 | ******************************************************************************/ |
Diletant | 75:cc1942179a2f | 30 | Device device; //Single global for all device hardware-independent algorithm |
Diletant | 74:f4d9c3403578 | 31 | |
igor_v | 0:8ad47e2b6f00 | 32 | extern uint32_t CMD_Mode; |
igor_v | 52:30f2e52a493f | 33 | unsigned int secPuls; |
igor_v | 52:30f2e52a493f | 34 | float DACF, K_DAC; |
Kovalev_D | 107:4d178bcc9d8a | 35 | int tempAMP; |
igor_v | 52:30f2e52a493f | 36 | int main (void) |
igor_v | 52:30f2e52a493f | 37 | { |
Kovalev_D | 96:1c8536458119 | 38 | int i,ttemp; |
Kovalev_D | 92:c892f0311aa7 | 39 | |
Kovalev_D | 88:b5c1d9d338d1 | 40 | //DMA_Init(); // Инициализация DMA не используем |
Kovalev_D | 88:b5c1d9d338d1 | 41 | //DACInit(); // инициализация ЦАП. |
Kovalev_D | 92:c892f0311aa7 | 42 | //UART_DMA_Init(); //инициализация DMA для UART.//не используем |
Kovalev_D | 89:a0d344db227e | 43 | //WDTInit(); |
Kovalev_D | 99:3d8f206ceac2 | 44 | // G_Photo_Init(); //инициализация интерфейса I2C для фотодетектора. |
Kovalev_D | 86:398da56ef751 | 45 | //инициализация |
Kovalev_D | 92:c892f0311aa7 | 46 | |
Kovalev_D | 92:c892f0311aa7 | 47 | |
Kovalev_D | 92:c892f0311aa7 | 48 | |
Kovalev_D | 86:398da56ef751 | 49 | SystemInit1(); // Инициализация контроллера: установка тактовых частот |
Kovalev_D | 86:398da56ef751 | 50 | FlashDMA_Init(); // Загрузка параметров с флэш |
Kovalev_D | 86:398da56ef751 | 51 | SystemCoreClockUpdate1(); // расчет тактовой частоты процессора перед инициализацией UART - 100MHz |
Kovalev_D | 88:b5c1d9d338d1 | 52 | |
Kovalev_D | 86:398da56ef751 | 53 | GLD_Init(); |
Kovalev_D | 92:c892f0311aa7 | 54 | ///////////старый UART |
igor_v | 91:a2bb81eaa183 | 55 | // UARTInit(); // инициализация UART0 на скорость 38400. |
igor_v | 91:a2bb81eaa183 | 56 | // UART1_Init(); // инициализация UART1 на скорость 38400. |
Kovalev_D | 88:b5c1d9d338d1 | 57 | |
igor_v | 91:a2bb81eaa183 | 58 | |
Kovalev_D | 96:1c8536458119 | 59 | UART_InitSet (0, 115200, 0x03); // надо проверить, мож чо с ногам |
Kovalev_D | 92:c892f0311aa7 | 60 | UART_InitSet (1, 38400, 0x03); |
Kovalev_D | 99:3d8f206ceac2 | 61 | |
Kovalev_D | 86:398da56ef751 | 62 | //////////// |
Kovalev_D | 90:d9b6a4bc5065 | 63 | //DAC_ADC_Exchange_Init(); // инициализация обмена АЦП и ЦАП. |
Kovalev_D | 88:b5c1d9d338d1 | 64 | |
Diletant | 46:2670fa0fcebc | 65 | IntLatch_Init(); // инициализация внутренней защелки. |
Diletant | 46:2670fa0fcebc | 66 | ExtLatch_Init(); // инициализация внешней защелки. |
igor_v | 21:bc8c1cec3da6 | 67 | LoadFlashParam(FromFLASH); //загрузка параметров. |
Kovalev_D | 89:a0d344db227e | 68 | |
Kovalev_D | 92:c892f0311aa7 | 69 | |
Kovalev_D | 103:e96f08947def | 70 | |
Kovalev_D | 89:a0d344db227e | 71 | |
Kovalev_D | 92:c892f0311aa7 | 72 | |
igor_v | 30:17c84ed091b3 | 73 | open_all_loops(); //#define open_all_loops() RgConA = 0 (Основной регистр управления устройства (0 - включить, 1 - отключить)). |
igor_v | 30:17c84ed091b3 | 74 | Output.Str.HF_reg = Device_blk.Str.HF_min; //HFO output voltage = максивальное напряжение на ГВЧ. |
igor_v | 30:17c84ed091b3 | 75 | init_PLC(); //Инициализация СРП(регулировка периметра) |
igor_v | 30:17c84ed091b3 | 76 | init_Dither_reg(); //инициализация вибропривода |
igor_v | 30:17c84ed091b3 | 77 | RgConB = RATE_VIBRO_1; // дополнительный регистр управления = разность вибросчетчиков после фильтра скольз.среднего(#define RATE_VIBRO_1 0x0001) |
Kovalev_D | 86:398da56ef751 | 78 | close_all_loops(); |
igor_v | 51:81f47b817071 | 79 | |
igor_v | 51:81f47b817071 | 80 | |
Kovalev_D | 105:bd01d8d20fb6 | 81 | Out_G_photo(200,200); //запись в буфер мастера принятые от функции данные (60,60) и установка флага старта передачи и занятой шины. |
Kovalev_D | 105:bd01d8d20fb6 | 82 | |
igor_v | 51:81f47b817071 | 83 | |
igor_v | 51:81f47b817071 | 84 | |
Kovalev_D | 47:d902ef6f7564 | 85 | WriteCon1("\n\r ...GL start programm uart ACK.... "); |
Kovalev_D | 47:d902ef6f7564 | 86 | WriteCon("\n\r ...GL start programm uart Tech.... "); |
igor_v | 15:f5191a1c3805 | 87 | sprintf(Time,"\r\nCompiled: %s %s.",__DATE__, __TIME__ ); //Подготовка даты и времени компиляции |
igor_v | 13:e2a1d18677b8 | 88 | WriteCon(Time); |
igor_v | 11:af609f6dee46 | 89 | |
igor_v | 37:bdd52117b56e | 90 | |
igor_v | 11:af609f6dee46 | 91 | |
Kovalev_D | 50:0e3d47f18a50 | 92 | while ( 1 ) { //основной цикл. |
Kovalev_D | 107:4d178bcc9d8a | 93 | /*tempAMP = Buff_Restored_sin [CountV255] - MaxAmp; |
Kovalev_D | 107:4d178bcc9d8a | 94 | if (tempAMP > 0) {MaxAmp=Buff_Restored_sin [CountV255];} // подумать со знаком*/ |
Kovalev_D | 107:4d178bcc9d8a | 95 | |
Kovalev_D | 107:4d178bcc9d8a | 96 | |
Kovalev_D | 107:4d178bcc9d8a | 97 | |
Kovalev_D | 107:4d178bcc9d8a | 98 | |
Kovalev_D | 107:4d178bcc9d8a | 99 | // if (tempAMP > 30) {MaxAmp = Buff_Restored_sin[CountV255];} // подумать со знаком |
Kovalev_D | 107:4d178bcc9d8a | 100 | |
Kovalev_D | 105:bd01d8d20fb6 | 101 | G_Photo_Exchange(); |
Kovalev_D | 92:c892f0311aa7 | 102 | Concol (); // Проврка 0 консоли (вход и выход) |
Kovalev_D | 93:b3803774f110 | 103 | |
Kovalev_D | 93:b3803774f110 | 104 | Concol1 (); // Проврка 0 консоли (вход и выход) |
Kovalev_D | 99:3d8f206ceac2 | 105 | Read_CMD(); |
Kovalev_D | 103:e96f08947def | 106 | |
igor_v | 3:ed8744c5f67a | 107 | if (OutBufConCount) OutBufConCount--; |
igor_v | 48:8697dfe679b9 | 108 | |
Kovalev_D | 95:dd51e577e114 | 109 | if (ReadCon (Time)) { |
igor_v | 48:8697dfe679b9 | 110 | |
igor_v | 16:18e3fd7b92d0 | 111 | if (Time[0] == 'h') { // если ввели буквц h то выдать подсказку. сделанно через принф ОЧЕНЬ плохо в работе не использовать |
igor_v | 15:f5191a1c3805 | 112 | sprintf(Time,"\r\nCompiled: %s %s.",__DATE__, __TIME__ ); //Подготовка даты и времени компиляции |
igor_v | 15:f5191a1c3805 | 113 | WriteCon(Time); |
igor_v | 52:30f2e52a493f | 114 | sprintf(Time,"--%d.%3.d.%2.d.",Time1Hz,Time1K,Time100K); //Временно выдачпа временни из трех чисел |
igor_v | 15:f5191a1c3805 | 115 | WriteCon(Time); |
igor_v | 52:30f2e52a493f | 116 | } |
igor_v | 52:30f2e52a493f | 117 | if (Time[0] == 'D') { |
igor_v | 52:30f2e52a493f | 118 | Gyro.Discharg = StartDischarg; |
igor_v | 15:f5191a1c3805 | 119 | } |
igor_v | 52:30f2e52a493f | 120 | if (Time[0] == 'L') { |
igor_v | 52:30f2e52a493f | 121 | Gyro.BackLight = StartBackLight; |
igor_v | 52:30f2e52a493f | 122 | } |
Kovalev_D | 98:95b8e79f13e1 | 123 | |
Kovalev_D | 105:bd01d8d20fb6 | 124 | if (Time[0] == 'F') { // выдача технологическая |
Kovalev_D | 105:bd01d8d20fb6 | 125 | sprintf(Time,"\r\n"); |
Kovalev_D | 105:bd01d8d20fb6 | 126 | WriteCon(Time); |
Kovalev_D | 105:bd01d8d20fb6 | 127 | sprintf((Time)," <%07d> <%07d>",Gyro.F_ras,Param2); |
Kovalev_D | 105:bd01d8d20fb6 | 128 | WriteCon(Time); |
Kovalev_D | 105:bd01d8d20fb6 | 129 | } |
Kovalev_D | 98:95b8e79f13e1 | 130 | |
Kovalev_D | 98:95b8e79f13e1 | 131 | |
Kovalev_D | 105:bd01d8d20fb6 | 132 | // F_rasH F_rasL |
Kovalev_D | 98:95b8e79f13e1 | 133 | |
Kovalev_D | 98:95b8e79f13e1 | 134 | |
Kovalev_D | 98:95b8e79f13e1 | 135 | if (Time[0] == '1') { // выдача технологическая |
Kovalev_D | 88:b5c1d9d338d1 | 136 | sprintf(Time,"\r\n"); |
Kovalev_D | 95:dd51e577e114 | 137 | WriteCon(Time); |
Kovalev_D | 96:1c8536458119 | 138 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ",Buff_1Point[i]); |
igor_v | 52:30f2e52a493f | 139 | WriteCon(Time); |
igor_v | 52:30f2e52a493f | 140 | } |
Kovalev_D | 98:95b8e79f13e1 | 141 | |
Kovalev_D | 98:95b8e79f13e1 | 142 | if (Time[0] == '2') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 143 | sprintf(Time,"\r\n"); |
Kovalev_D | 98:95b8e79f13e1 | 144 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 145 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ", Buff_8Point[i]); |
Kovalev_D | 98:95b8e79f13e1 | 146 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 147 | } |
Kovalev_D | 98:95b8e79f13e1 | 148 | if (Time[0] == '3') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 149 | sprintf(Time,"\r\n"); |
Kovalev_D | 98:95b8e79f13e1 | 150 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 151 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ", Buff_16Point[i]); |
Kovalev_D | 98:95b8e79f13e1 | 152 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 153 | } |
Kovalev_D | 98:95b8e79f13e1 | 154 | |
Kovalev_D | 98:95b8e79f13e1 | 155 | if (Time[0] == '4') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 156 | sprintf(Time,"\r\n"); |
Kovalev_D | 98:95b8e79f13e1 | 157 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 158 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ", Buff_16PointD[i]); |
Kovalev_D | 98:95b8e79f13e1 | 159 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 160 | } |
Kovalev_D | 98:95b8e79f13e1 | 161 | |
Kovalev_D | 104:ab1cb4ff56b2 | 162 | if (Time[0] == 'z') { // выдача технологическая |
Kovalev_D | 104:ab1cb4ff56b2 | 163 | sprintf(Time,"\r\n"); |
Kovalev_D | 104:ab1cb4ff56b2 | 164 | WriteCon(Time); |
Kovalev_D | 104:ab1cb4ff56b2 | 165 | |
Kovalev_D | 104:ab1cb4ff56b2 | 166 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 104:ab1cb4ff56b2 | 167 | { |
Kovalev_D | 104:ab1cb4ff56b2 | 168 | ttemp=(Buff_16PointD[i]); |
Kovalev_D | 104:ab1cb4ff56b2 | 169 | if (ttemp < 0) WriteCon("1"); else WriteCon("0"); |
Kovalev_D | 104:ab1cb4ff56b2 | 170 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 171 | |
Kovalev_D | 104:ab1cb4ff56b2 | 172 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 173 | |
Kovalev_D | 104:ab1cb4ff56b2 | 174 | |
Kovalev_D | 98:95b8e79f13e1 | 175 | if (Time[0] == '5') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 176 | sprintf(Time,"\r\n"); |
Kovalev_D | 98:95b8e79f13e1 | 177 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 178 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ",Buff_32Point[i]); |
Kovalev_D | 98:95b8e79f13e1 | 179 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 180 | } |
Kovalev_D | 98:95b8e79f13e1 | 181 | |
Kovalev_D | 98:95b8e79f13e1 | 182 | if (Time[0] == '6') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 183 | sprintf(Time,"\r\n"); |
Kovalev_D | 98:95b8e79f13e1 | 184 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 185 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ",Buff_Restored_sin[i]); |
Kovalev_D | 98:95b8e79f13e1 | 186 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 187 | } |
Kovalev_D | 95:dd51e577e114 | 188 | |
Kovalev_D | 95:dd51e577e114 | 189 | |
Kovalev_D | 104:ab1cb4ff56b2 | 190 | |
Kovalev_D | 104:ab1cb4ff56b2 | 191 | if (Time[0] == 'c') { // выдача технологическая |
Kovalev_D | 104:ab1cb4ff56b2 | 192 | sprintf(Time,"\r\n"); |
Kovalev_D | 104:ab1cb4ff56b2 | 193 | WriteCon(Time); |
Kovalev_D | 106:250ddd8629c6 | 194 | sprintf((Time)," <%07d> <%07d> <%07d> <%07d>", Gyro.F_ras,Gyro.F_ras/16, Gyro.Cnt_Pls, Gyro.Cnt_Mns); |
Kovalev_D | 104:ab1cb4ff56b2 | 195 | WriteCon(Time); |
Kovalev_D | 104:ab1cb4ff56b2 | 196 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 197 | |
Kovalev_D | 104:ab1cb4ff56b2 | 198 | |
Kovalev_D | 104:ab1cb4ff56b2 | 199 | |
Kovalev_D | 98:95b8e79f13e1 | 200 | if (Time[0] == '7') { // выдача технологическая |
Kovalev_D | 95:dd51e577e114 | 201 | sprintf(Time,"\r\n"); |
Kovalev_D | 95:dd51e577e114 | 202 | WriteCon(Time); |
Kovalev_D | 96:1c8536458119 | 203 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 10)," <%07d> ",Buff_AMP64P[i]-(Buff_AMP[i])); |
Kovalev_D | 95:dd51e577e114 | 204 | WriteCon(Time); |
Kovalev_D | 95:dd51e577e114 | 205 | } |
Kovalev_D | 98:95b8e79f13e1 | 206 | if (Time[0] == '9') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 207 | sprintf(Time,"\r\n"); |
Kovalev_D | 98:95b8e79f13e1 | 208 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 209 | for (int i = 0; i < 32; i++ )sprintf((Time)," <%07d> ",Gyro.Frq); |
Kovalev_D | 98:95b8e79f13e1 | 210 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 211 | } |
Kovalev_D | 98:95b8e79f13e1 | 212 | |
Kovalev_D | 98:95b8e79f13e1 | 213 | if (Time[0] == 'p') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 214 | sprintf(Time,"\r\n"); |
Kovalev_D | 98:95b8e79f13e1 | 215 | WriteCon(Time); |
Kovalev_D | 99:3d8f206ceac2 | 216 | for (int i = 0; i < 32; i++ )sprintf((Time)," <%07d> ",Cur_Amp); |
Kovalev_D | 98:95b8e79f13e1 | 217 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 218 | } |
Kovalev_D | 99:3d8f206ceac2 | 219 | if (Time[0] == 'm') { // выдача технологическая |
Kovalev_D | 99:3d8f206ceac2 | 220 | sprintf(Time,"\r\n"); |
Kovalev_D | 99:3d8f206ceac2 | 221 | WriteCon(Time); |
Kovalev_D | 107:4d178bcc9d8a | 222 | /* sprintf((Time)," <%07d> ",Cur_Amp); WriteCon(Time); |
Kovalev_D | 99:3d8f206ceac2 | 223 | sprintf((Time)," <%07d> ",Znak_Amp); WriteCon(Time); |
Kovalev_D | 107:4d178bcc9d8a | 224 | sprintf((Time)," <%07d> ",Spi.DAC_B); WriteCon(Time);*/ |
Kovalev_D | 107:4d178bcc9d8a | 225 | sprintf((Time),"tempAMP <%07d> ", tempAMP); WriteCon(Time); |
Kovalev_D | 107:4d178bcc9d8a | 226 | sprintf((Time)," Buff_Restored_sin [CountV31] <%07d> ",Buff_Restored_sin [CountV31]); WriteCon(Time); |
Kovalev_D | 107:4d178bcc9d8a | 227 | sprintf((Time)," Gyro.Amp <%07d> ",amp); WriteCon(Time); |
Kovalev_D | 107:4d178bcc9d8a | 228 | |
Kovalev_D | 99:3d8f206ceac2 | 229 | |
Kovalev_D | 99:3d8f206ceac2 | 230 | } |
Kovalev_D | 98:95b8e79f13e1 | 231 | if (Time[0] == 'V') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 232 | Gyro.Frq+=65000; |
Kovalev_D | 98:95b8e79f13e1 | 233 | } |
Kovalev_D | 98:95b8e79f13e1 | 234 | if (Time[0] == 'v') { // выдача технологическая |
Kovalev_D | 98:95b8e79f13e1 | 235 | Gyro.Frq-=65000; |
Kovalev_D | 98:95b8e79f13e1 | 236 | } |
Kovalev_D | 96:1c8536458119 | 237 | |
Kovalev_D | 98:95b8e79f13e1 | 238 | if (Time[0] == '8') { // выдача технологическая |
Kovalev_D | 96:1c8536458119 | 239 | sprintf(Time,"\r\n"); |
Kovalev_D | 96:1c8536458119 | 240 | WriteCon(Time); |
Kovalev_D | 96:1c8536458119 | 241 | // for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ",Buff_AMP64P[i]-(Buff_AMP[i]*2)); |
Kovalev_D | 96:1c8536458119 | 242 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 96:1c8536458119 | 243 | { |
Kovalev_D | 96:1c8536458119 | 244 | ttemp=(Buff_AMP64P[i]-(Buff_AMP[i])); |
Kovalev_D | 96:1c8536458119 | 245 | if (ttemp < 0) WriteCon("1"); else WriteCon("0"); |
Kovalev_D | 96:1c8536458119 | 246 | } |
Kovalev_D | 96:1c8536458119 | 247 | // WriteCon(Time); |
Kovalev_D | 96:1c8536458119 | 248 | } |
Kovalev_D | 95:dd51e577e114 | 249 | |
Kovalev_D | 98:95b8e79f13e1 | 250 | if (Time[0] == 'b') { // выдача технологическая |
Kovalev_D | 92:c892f0311aa7 | 251 | sprintf(Time,"\r\n"); |
Kovalev_D | 95:dd51e577e114 | 252 | WriteCon(Time); |
Kovalev_D | 98:95b8e79f13e1 | 253 | |
Kovalev_D | 98:95b8e79f13e1 | 254 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 98:95b8e79f13e1 | 255 | { |
Kovalev_D | 98:95b8e79f13e1 | 256 | ttemp=(Buff_Restored_sin[i]); |
Kovalev_D | 98:95b8e79f13e1 | 257 | if (ttemp < 0) WriteCon("1"); else WriteCon("0"); |
Kovalev_D | 98:95b8e79f13e1 | 258 | } |
Kovalev_D | 98:95b8e79f13e1 | 259 | |
Kovalev_D | 92:c892f0311aa7 | 260 | } |
Kovalev_D | 98:95b8e79f13e1 | 261 | |
Kovalev_D | 92:c892f0311aa7 | 262 | Read_CMD(); |
Kovalev_D | 95:dd51e577e114 | 263 | } |
igor_v | 38:716472a4492e | 264 | if (OutBufCon1Count) OutBufCon1Count--; |
Kovalev_D | 92:c892f0311aa7 | 265 | // Read_CMD(); |
igor_v | 52:30f2e52a493f | 266 | |
Kovalev_D | 88:b5c1d9d338d1 | 267 | Event_1Hz(); |
Kovalev_D | 88:b5c1d9d338d1 | 268 | Event_1KHz(); |
Kovalev_D | 88:b5c1d9d338d1 | 269 | Event_100KHz(); |
Kovalev_D | 88:b5c1d9d338d1 | 270 | Event_Vibro(); |
Kovalev_D | 92:c892f0311aa7 | 271 | |
Kovalev_D | 88:b5c1d9d338d1 | 272 | } |
igor_v | 0:8ad47e2b6f00 | 273 | } |
igor_v | 0:8ad47e2b6f00 | 274 | |
igor_v | 0:8ad47e2b6f00 | 275 | /****************************************************************************** |
igor_v | 0:8ad47e2b6f00 | 276 | ** End Of File |
igor_v | 0:8ad47e2b6f00 | 277 | ******************************************************************************/ |
igor_v | 0:8ad47e2b6f00 | 278 | |
igor_v | 0:8ad47e2b6f00 | 279 |