123
Fork of LG by
Command.c@195:bcc769f5292b, 2016-09-20 (annotated)
- Committer:
- Kovalev_D
- Date:
- Tue Sep 20 10:39:30 2016 +0000
- Revision:
- 195:bcc769f5292b
- Parent:
- 194:8f3cb37a5541
- Child:
- 196:f76dbc081e63
PLC_TERMO
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
igor_v | 0:8ad47e2b6f00 | 1 | #include "stdlib.h" |
igor_v | 0:8ad47e2b6f00 | 2 | #include "LPC17xx.h" |
igor_v | 0:8ad47e2b6f00 | 3 | #include "Global.h" |
Kovalev_D | 106:250ddd8629c6 | 4 | int tempNH,tempNL; |
igor_v | 0:8ad47e2b6f00 | 5 | unsigned int Rate_Flag; |
igor_v | 0:8ad47e2b6f00 | 6 | unsigned int CountBuFFIn; |
igor_v | 21:bc8c1cec3da6 | 7 | unsigned int N=0,CRC_N; |
igor_v | 21:bc8c1cec3da6 | 8 | unsigned int Param1=0; |
igor_v | 21:bc8c1cec3da6 | 9 | unsigned int Param2=0; |
igor_v | 21:bc8c1cec3da6 | 10 | unsigned int Param3=0; |
igor_v | 21:bc8c1cec3da6 | 11 | unsigned int Param4=0; |
Kovalev_D | 102:4270092be987 | 12 | unsigned int Consol=123; |
Kovalev_D | 121:bbae560cdd43 | 13 | unsigned int TempParam=1; |
Kovalev_D | 124:9ae09249f842 | 14 | unsigned int CountParam=0; |
Kovalev_D | 129:406995a91322 | 15 | |
Kovalev_D | 148:7ce8c1fd00f7 | 16 | int ttemp; |
Kovalev_D | 136:19b9e6abb86f | 17 | |
Kovalev_D | 136:19b9e6abb86f | 18 | |
Kovalev_D | 136:19b9e6abb86f | 19 | unsigned int pDestT ; |
Kovalev_D | 136:19b9e6abb86f | 20 | GyroParam *Flash; |
Kovalev_D | 147:1aed74f19a8f | 21 | ///////////////flah and boot/////////// |
Kovalev_D | 147:1aed74f19a8f | 22 | void GoBoot(void) |
Kovalev_D | 147:1aed74f19a8f | 23 | { |
Kovalev_D | 147:1aed74f19a8f | 24 | /* Prepare Sectors to be flashed */ |
Kovalev_D | 147:1aed74f19a8f | 25 | NVIC_DisableIRQ(TIMER1_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 26 | NVIC_DisableIRQ(TIMER2_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 27 | NVIC_DisableIRQ(TIMER3_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 28 | NVIC_DisableIRQ(EINT3_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 29 | SystemInitDef(); |
Kovalev_D | 147:1aed74f19a8f | 30 | vIAP_ReinvokeISP(); |
Kovalev_D | 147:1aed74f19a8f | 31 | } |
Kovalev_D | 181:0b022246c43c | 32 | |
Kovalev_D | 181:0b022246c43c | 33 | void DropDelay(void) |
Kovalev_D | 181:0b022246c43c | 34 | { |
Kovalev_D | 181:0b022246c43c | 35 | Gyro.DropDelayGLD = DropDelayGLD_0; |
Kovalev_D | 194:8f3cb37a5541 | 36 | switch(Gyro.My_Addres) { |
Kovalev_D | 194:8f3cb37a5541 | 37 | case 1: Gyro.DropDelayGLD = DropDelayGLD_1; break; |
Kovalev_D | 194:8f3cb37a5541 | 38 | case 2: Gyro.DropDelayGLD = DropDelayGLD_2; break; |
Kovalev_D | 194:8f3cb37a5541 | 39 | case 3: Gyro.DropDelayGLD = DropDelayGLD_3; break; |
Kovalev_D | 194:8f3cb37a5541 | 40 | } |
Kovalev_D | 194:8f3cb37a5541 | 41 | |
Kovalev_D | 181:0b022246c43c | 42 | } |
Kovalev_D | 181:0b022246c43c | 43 | |
Kovalev_D | 147:1aed74f19a8f | 44 | void WriteFlash(void) |
Kovalev_D | 147:1aed74f19a8f | 45 | { |
Kovalev_D | 147:1aed74f19a8f | 46 | |
Kovalev_D | 147:1aed74f19a8f | 47 | NVIC_DisableIRQ(TIMER1_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 48 | NVIC_DisableIRQ(TIMER2_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 49 | NVIC_DisableIRQ(TIMER3_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 50 | NVIC_DisableIRQ(EINT3_IRQn); |
Kovalev_D | 147:1aed74f19a8f | 51 | |
Kovalev_D | 147:1aed74f19a8f | 52 | SystemInitDef(); |
Kovalev_D | 147:1aed74f19a8f | 53 | WriteCon("\r\n Start Prepare Sectors"); |
Kovalev_D | 147:1aed74f19a8f | 54 | if(u32IAP_PrepareSectors(18, 21) == IAP_STA_CMD_SUCCESS) |
Kovalev_D | 147:1aed74f19a8f | 55 | { |
Kovalev_D | 147:1aed74f19a8f | 56 | WriteCon("\r\nPrepare Sectors OK"); |
Kovalev_D | 147:1aed74f19a8f | 57 | WriteCon("\r\n Start Erase"); |
Kovalev_D | 147:1aed74f19a8f | 58 | u32IAP_EraseSectors(IMG_START_SECTOR, IMG_END_SECTOR); |
Kovalev_D | 147:1aed74f19a8f | 59 | WriteCon("\r\n AND Erase"); |
Kovalev_D | 147:1aed74f19a8f | 60 | } |
Kovalev_D | 147:1aed74f19a8f | 61 | else WriteCon("\r\nPrepare Sectors ERROR"); |
Kovalev_D | 147:1aed74f19a8f | 62 | SystemInit1(); |
Kovalev_D | 147:1aed74f19a8f | 63 | Gyro.FlashMod = 0; |
Kovalev_D | 169:140743e3bb96 | 64 | } |
Kovalev_D | 136:19b9e6abb86f | 65 | |
Kovalev_D | 136:19b9e6abb86f | 66 | void ReadFlash ( void) |
Kovalev_D | 136:19b9e6abb86f | 67 | { |
Kovalev_D | 147:1aed74f19a8f | 68 | Gyro.FlashMod = 0; |
Kovalev_D | 136:19b9e6abb86f | 69 | WriteCon("\r\n Pirivet Flash"); |
Kovalev_D | 136:19b9e6abb86f | 70 | pDestT= (unsigned int) (0x10000); |
Kovalev_D | 136:19b9e6abb86f | 71 | Flash = (GyroParam*) pDestT; |
Kovalev_D | 136:19b9e6abb86f | 72 | GyroP = *(Flash); |
Kovalev_D | 136:19b9e6abb86f | 73 | sprintf((Time)," dffddfd <%07d> ", GyroP.Str.K_WP_rst_heating); |
Kovalev_D | 136:19b9e6abb86f | 74 | WriteCon(Time); |
Kovalev_D | 169:140743e3bb96 | 75 | } |
Kovalev_D | 169:140743e3bb96 | 76 | ///////////////end flah and boot/////////// |
Kovalev_D | 191:40028201ddad | 77 | void M_RateA(void) |
Kovalev_D | 193:a0fe8bfc97e4 | 78 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 79 | /*Gyro.Delta500_Event=0; |
Kovalev_D | 193:a0fe8bfc97e4 | 80 | Gyro.DeltaEXT_Event=0;*/ |
Kovalev_D | 191:40028201ddad | 81 | switch(Gyro.ModeOut) { |
Kovalev_D | 193:a0fe8bfc97e4 | 82 | case 1: if(Gyro.Rate1_Event ) CMD_Rate(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 83 | case 2: if(Gyro.Reper_Event ) CMD_Rate2(); break; //Gyro.Reper_Event выставляется при переходе синуса из - в + |
Kovalev_D | 193:a0fe8bfc97e4 | 84 | case 3: if(Gyro.Delta500_Event ) CMD_Delta_PS(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 85 | case 4: if(Gyro.EXT_Latch ) CMD_Delta_PS(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 86 | case 5: if(Gyro.Delta_Bins_Event500 ) CMD_Delta_Bins(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 87 | case 6: if(Gyro.B_Delta_EventEXT ) CMD_B_Delta(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 88 | case 7: if(Gyro.B_Delta_Event500 ) CMD_B_Delta(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 89 | } |
Kovalev_D | 191:40028201ddad | 90 | } |
Kovalev_D | 136:19b9e6abb86f | 91 | |
Kovalev_D | 129:406995a91322 | 92 | void CMD_M_Param_R(void) |
igor_v | 0:8ad47e2b6f00 | 93 | { |
Kovalev_D | 129:406995a91322 | 94 | unsigned int NP; |
Kovalev_D | 129:406995a91322 | 95 | unsigned int Param; |
Kovalev_D | 129:406995a91322 | 96 | BuffTemp[0] = Gyro.SOC_Out; |
Kovalev_D | 129:406995a91322 | 97 | BuffTemp[1] = Gyro.My_Addres; |
Kovalev_D | 129:406995a91322 | 98 | |
Kovalev_D | 129:406995a91322 | 99 | NP = BuffTemp[3]; |
Kovalev_D | 129:406995a91322 | 100 | |
Kovalev_D | 129:406995a91322 | 101 | Param = GyroP.Array[NP]; |
Kovalev_D | 129:406995a91322 | 102 | |
Kovalev_D | 129:406995a91322 | 103 | BuffTemp[2] =(Param >> 8) & 0xff;//старший байт требуемого параметра |
Kovalev_D | 129:406995a91322 | 104 | BuffTemp[3] =(Param >> 0) & 0xff;//младший байт требуемого параметра |
Kovalev_D | 129:406995a91322 | 105 | |
Kovalev_D | 129:406995a91322 | 106 | Check(BuffTemp, 6); |
Kovalev_D | 129:406995a91322 | 107 | WriteConN (BuffTemp,6); |
Kovalev_D | 129:406995a91322 | 108 | } |
Kovalev_D | 129:406995a91322 | 109 | void CMD_M_Param_W(void) |
Kovalev_D | 129:406995a91322 | 110 | { |
Kovalev_D | 129:406995a91322 | 111 | unsigned int NP; |
Kovalev_D | 129:406995a91322 | 112 | unsigned int Param; |
Kovalev_D | 129:406995a91322 | 113 | |
Kovalev_D | 129:406995a91322 | 114 | NP = BuffTemp[3]; |
Kovalev_D | 129:406995a91322 | 115 | Param = (BuffTemp[4]<<8); |
Kovalev_D | 129:406995a91322 | 116 | Param |= BuffTemp[5]; |
Kovalev_D | 129:406995a91322 | 117 | |
Kovalev_D | 129:406995a91322 | 118 | GyroP.Array[NP] = Param; |
Kovalev_D | 129:406995a91322 | 119 | |
Kovalev_D | 129:406995a91322 | 120 | |
Kovalev_D | 129:406995a91322 | 121 | BuffTemp[0] = Gyro.SOC_Out; |
Kovalev_D | 129:406995a91322 | 122 | BuffTemp[1] = Gyro.My_Addres; |
Kovalev_D | 129:406995a91322 | 123 | BuffTemp[2] = Gyro.CMD_In; |
Kovalev_D | 129:406995a91322 | 124 | BuffTemp[3] = 0x00;//старший байт требуемого параметра |
Kovalev_D | 129:406995a91322 | 125 | |
Kovalev_D | 129:406995a91322 | 126 | Check(BuffTemp, 6); |
Kovalev_D | 129:406995a91322 | 127 | WriteConN (BuffTemp,6); |
Kovalev_D | 129:406995a91322 | 128 | } |
igor_v | 0:8ad47e2b6f00 | 129 | void CMD_Maintenance(void) |
igor_v | 0:8ad47e2b6f00 | 130 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 131 | |
Kovalev_D | 185:7e200f4d9b16 | 132 | Gyro.DropDelayGLD = DropDelayGLD_0;//задержка на выдачу 45 микросекунд для любого адреса ГЛД |
Kovalev_D | 122:fbacb932a30b | 133 | BuffTemp[0] = Gyro.SOC_Out; |
Kovalev_D | 124:9ae09249f842 | 134 | BuffTemp[1] = Gyro.My_Addres; |
Kovalev_D | 124:9ae09249f842 | 135 | BuffTemp[2] = Gyro.Firmware_Version; |
Kovalev_D | 169:140743e3bb96 | 136 | BuffTemp[3] = Gyro.GLD_Serial; |
igor_v | 21:bc8c1cec3da6 | 137 | BuffTemp[4]=0x00; |
igor_v | 21:bc8c1cec3da6 | 138 | BuffTemp[5]=0x00; |
igor_v | 21:bc8c1cec3da6 | 139 | Check(BuffTemp, 8); |
igor_v | 21:bc8c1cec3da6 | 140 | WriteConN (BuffTemp,8); |
Kovalev_D | 121:bbae560cdd43 | 141 | |
igor_v | 0:8ad47e2b6f00 | 142 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 143 | void CMD_B_Delta(void) |
Kovalev_D | 193:a0fe8bfc97e4 | 144 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 145 | Gyro.B_Delta_Event500=0; |
Kovalev_D | 193:a0fe8bfc97e4 | 146 | Gyro.B_Delta_EventEXT=0; |
Kovalev_D | 193:a0fe8bfc97e4 | 147 | unsigned int Temp; |
Kovalev_D | 193:a0fe8bfc97e4 | 148 | BuffTemp[ 0] = Gyro.SOC_Out; |
Kovalev_D | 193:a0fe8bfc97e4 | 149 | BuffTemp[ 1] = Gyro.My_Addres; |
Kovalev_D | 193:a0fe8bfc97e4 | 150 | |
Kovalev_D | 193:a0fe8bfc97e4 | 151 | Temp = Gyro.CuruAngle; |
Kovalev_D | 193:a0fe8bfc97e4 | 152 | Gyro.CuruAngle = 0; |
Kovalev_D | 193:a0fe8bfc97e4 | 153 | BuffTemp[ 2] =(Temp >> 16) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 193:a0fe8bfc97e4 | 154 | BuffTemp[ 3] =(Temp >> 8) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 193:a0fe8bfc97e4 | 155 | BuffTemp[ 4] =(Temp >> 0) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 193:a0fe8bfc97e4 | 156 | BuffTemp[ 5] = 0x00000000; |
Kovalev_D | 193:a0fe8bfc97e4 | 157 | Check(BuffTemp, 8); |
Kovalev_D | 193:a0fe8bfc97e4 | 158 | WriteConN (BuffTemp,8); |
Kovalev_D | 193:a0fe8bfc97e4 | 159 | } |
Kovalev_D | 165:b2bd0c810a4f | 160 | |
Kovalev_D | 193:a0fe8bfc97e4 | 161 | void CMD_Delta_Bins(void) |
Kovalev_D | 193:a0fe8bfc97e4 | 162 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 163 | Gyro.Delta_Bins_Event500=0; |
Kovalev_D | 193:a0fe8bfc97e4 | 164 | unsigned int Temp; |
Kovalev_D | 193:a0fe8bfc97e4 | 165 | BuffTemp[ 0] = Gyro.SOC_Out; |
Kovalev_D | 193:a0fe8bfc97e4 | 166 | BuffTemp[ 1] = Gyro.My_Addres; |
Kovalev_D | 193:a0fe8bfc97e4 | 167 | |
Kovalev_D | 193:a0fe8bfc97e4 | 168 | Temp = Gyro.CuruAngle; |
Kovalev_D | 193:a0fe8bfc97e4 | 169 | Gyro.CuruAngle = 0; |
Kovalev_D | 193:a0fe8bfc97e4 | 170 | |
Kovalev_D | 193:a0fe8bfc97e4 | 171 | BuffTemp[ 2] =(Temp >> 24) & 0xff;//старший байт разности счетчиков |
Kovalev_D | 193:a0fe8bfc97e4 | 172 | BuffTemp[ 3] =(Temp >> 16) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 193:a0fe8bfc97e4 | 173 | BuffTemp[ 4] =(Temp >> 8) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 193:a0fe8bfc97e4 | 174 | BuffTemp[ 5] =(Temp >> 0) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 193:a0fe8bfc97e4 | 175 | BuffTemp[ 6] = 0x0000; |
Kovalev_D | 193:a0fe8bfc97e4 | 176 | Check(BuffTemp, 9); |
Kovalev_D | 193:a0fe8bfc97e4 | 177 | WriteConN (BuffTemp,9); |
Kovalev_D | 193:a0fe8bfc97e4 | 178 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 179 | void CMD_Delta_PS(void) |
Kovalev_D | 124:9ae09249f842 | 180 | { |
Kovalev_D | 124:9ae09249f842 | 181 | Gyro.Delta500_Event=0; |
Kovalev_D | 193:a0fe8bfc97e4 | 182 | Gyro.EXT_Latch=0; |
Kovalev_D | 193:a0fe8bfc97e4 | 183 | |
Kovalev_D | 122:fbacb932a30b | 184 | unsigned int Temp; |
Kovalev_D | 124:9ae09249f842 | 185 | BuffTemp[ 0] = Gyro.SOC_Out; |
Kovalev_D | 122:fbacb932a30b | 186 | BuffTemp[ 1] = Gyro.My_Addres; |
Kovalev_D | 124:9ae09249f842 | 187 | |
Kovalev_D | 193:a0fe8bfc97e4 | 188 | Temp = Gyro.CuruAngle; |
Kovalev_D | 124:9ae09249f842 | 189 | Gyro.CuruAngle = 0; |
Kovalev_D | 124:9ae09249f842 | 190 | |
Kovalev_D | 124:9ae09249f842 | 191 | BuffTemp[ 2] =(Temp >> 8) & 0xff;//старший байт разности счетчиков |
Kovalev_D | 124:9ae09249f842 | 192 | BuffTemp[ 3] =(Temp >> 0) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 124:9ae09249f842 | 193 | |
Kovalev_D | 124:9ae09249f842 | 194 | BuffTemp[ 4] = CountParam; |
Kovalev_D | 124:9ae09249f842 | 195 | switch(CountParam) { |
Kovalev_D | 184:ebcd2bc3be8f | 196 | |
Kovalev_D | 124:9ae09249f842 | 197 | //F_ras |
Kovalev_D | 124:9ae09249f842 | 198 | case 0: |
Kovalev_D | 124:9ae09249f842 | 199 | Temp = Gyro.F_ras; |
Kovalev_D | 124:9ae09249f842 | 200 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 201 | break; |
Kovalev_D | 124:9ae09249f842 | 202 | |
Kovalev_D | 124:9ae09249f842 | 203 | case 1: |
Kovalev_D | 124:9ae09249f842 | 204 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 205 | break; |
Kovalev_D | 124:9ae09249f842 | 206 | |
Kovalev_D | 124:9ae09249f842 | 207 | |
Kovalev_D | 124:9ae09249f842 | 208 | |
Kovalev_D | 124:9ae09249f842 | 209 | //HFO |
Kovalev_D | 124:9ae09249f842 | 210 | case 2: |
Kovalev_D | 124:9ae09249f842 | 211 | Temp = 0;//HFO |
Kovalev_D | 124:9ae09249f842 | 212 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 213 | break; |
Kovalev_D | 124:9ae09249f842 | 214 | |
Kovalev_D | 124:9ae09249f842 | 215 | case 3: |
Kovalev_D | 124:9ae09249f842 | 216 | Temp = 0;//HFO |
Kovalev_D | 124:9ae09249f842 | 217 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 218 | break; |
Kovalev_D | 124:9ae09249f842 | 219 | |
Kovalev_D | 124:9ae09249f842 | 220 | |
Kovalev_D | 124:9ae09249f842 | 221 | |
Kovalev_D | 124:9ae09249f842 | 222 | //T_Vibro |
Kovalev_D | 124:9ae09249f842 | 223 | case 4: |
Kovalev_D | 124:9ae09249f842 | 224 | Temp = (unsigned int)((7680000*16/(Gyro.Frq>>12))); |
Kovalev_D | 124:9ae09249f842 | 225 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 226 | break; |
Kovalev_D | 124:9ae09249f842 | 227 | |
Kovalev_D | 124:9ae09249f842 | 228 | case 5: |
Kovalev_D | 124:9ae09249f842 | 229 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 230 | break; |
Kovalev_D | 124:9ae09249f842 | 231 | |
Kovalev_D | 124:9ae09249f842 | 232 | |
Kovalev_D | 124:9ae09249f842 | 233 | |
Kovalev_D | 124:9ae09249f842 | 234 | //L_Vibro |
Kovalev_D | 124:9ae09249f842 | 235 | case 6: |
Kovalev_D | 124:9ae09249f842 | 236 | Temp = (unsigned int)(((7680000*16/200) *Gyro.AmpPer /(Gyro.Frq>>12))); |
Kovalev_D | 124:9ae09249f842 | 237 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 238 | |
Kovalev_D | 124:9ae09249f842 | 239 | break; |
Kovalev_D | 124:9ae09249f842 | 240 | |
Kovalev_D | 124:9ae09249f842 | 241 | case 7: |
Kovalev_D | 124:9ae09249f842 | 242 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 243 | break; |
Kovalev_D | 124:9ae09249f842 | 244 | |
Kovalev_D | 124:9ae09249f842 | 245 | |
Kovalev_D | 124:9ae09249f842 | 246 | |
Kovalev_D | 124:9ae09249f842 | 247 | //Напряжение на регуляторе периметра |
Kovalev_D | 124:9ae09249f842 | 248 | case 8: |
Kovalev_D | 165:b2bd0c810a4f | 249 | Temp = Spi.DAC_B /*- 0x7fff*/; |
Kovalev_D | 124:9ae09249f842 | 250 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 251 | |
Kovalev_D | 124:9ae09249f842 | 252 | break; |
Kovalev_D | 124:9ae09249f842 | 253 | |
Kovalev_D | 124:9ae09249f842 | 254 | case 9: |
Kovalev_D | 124:9ae09249f842 | 255 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 256 | break; |
Kovalev_D | 124:9ae09249f842 | 257 | |
Kovalev_D | 124:9ae09249f842 | 258 | |
Kovalev_D | 124:9ae09249f842 | 259 | |
Kovalev_D | 124:9ae09249f842 | 260 | //темпкратурный канал 0 |
Kovalev_D | 124:9ae09249f842 | 261 | case 10: |
Kovalev_D | 124:9ae09249f842 | 262 | Temp = 100; |
Kovalev_D | 124:9ae09249f842 | 263 | BuffTemp[5] = (Temp >> 8) & 0xff; |
igor_v | 0:8ad47e2b6f00 | 264 | |
Kovalev_D | 124:9ae09249f842 | 265 | break; |
Kovalev_D | 124:9ae09249f842 | 266 | |
Kovalev_D | 124:9ae09249f842 | 267 | case 11: |
Kovalev_D | 124:9ae09249f842 | 268 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 269 | break; |
Kovalev_D | 124:9ae09249f842 | 270 | |
Kovalev_D | 124:9ae09249f842 | 271 | |
Kovalev_D | 124:9ae09249f842 | 272 | |
Kovalev_D | 178:1666a83d88a5 | 273 | //f |
Kovalev_D | 124:9ae09249f842 | 274 | case 12: |
Kovalev_D | 124:9ae09249f842 | 275 | Temp = Gyro.AD_Slow >> 16; |
Kovalev_D | 124:9ae09249f842 | 276 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 277 | |
Kovalev_D | 124:9ae09249f842 | 278 | break; |
Kovalev_D | 124:9ae09249f842 | 279 | |
Kovalev_D | 124:9ae09249f842 | 280 | case 13: |
Kovalev_D | 124:9ae09249f842 | 281 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 282 | break; |
Kovalev_D | 124:9ae09249f842 | 283 | |
Kovalev_D | 124:9ae09249f842 | 284 | |
Kovalev_D | 124:9ae09249f842 | 285 | |
Kovalev_D | 124:9ae09249f842 | 286 | //ток 1 |
Kovalev_D | 124:9ae09249f842 | 287 | case 14: |
Kovalev_D | 124:9ae09249f842 | 288 | Temp = Gyro.In1; |
Kovalev_D | 124:9ae09249f842 | 289 | BuffTemp[5] = (Temp >> 8) & 0xff;//in1//2 |
Kovalev_D | 124:9ae09249f842 | 290 | |
Kovalev_D | 124:9ae09249f842 | 291 | break; |
Kovalev_D | 124:9ae09249f842 | 292 | |
Kovalev_D | 124:9ae09249f842 | 293 | case 15: |
Kovalev_D | 124:9ae09249f842 | 294 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 295 | break; |
Kovalev_D | 124:9ae09249f842 | 296 | |
Kovalev_D | 124:9ae09249f842 | 297 | |
Kovalev_D | 124:9ae09249f842 | 298 | |
Kovalev_D | 124:9ae09249f842 | 299 | //ток 2 |
Kovalev_D | 124:9ae09249f842 | 300 | case 16: |
Kovalev_D | 124:9ae09249f842 | 301 | Temp = Gyro.In2; |
Kovalev_D | 124:9ae09249f842 | 302 | BuffTemp[5] = (Temp >> 8) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 303 | break; |
Kovalev_D | 124:9ae09249f842 | 304 | |
Kovalev_D | 124:9ae09249f842 | 305 | case 17: |
Kovalev_D | 124:9ae09249f842 | 306 | BuffTemp[5] = (Temp >> 0) & 0xff;//in2//3 |
Kovalev_D | 124:9ae09249f842 | 307 | break; |
Kovalev_D | 124:9ae09249f842 | 308 | |
Kovalev_D | 124:9ae09249f842 | 309 | |
Kovalev_D | 124:9ae09249f842 | 310 | |
Kovalev_D | 124:9ae09249f842 | 311 | //разностный температурный канал Delta Temp |
Kovalev_D | 124:9ae09249f842 | 312 | case 18: |
Kovalev_D | 124:9ae09249f842 | 313 | Temp = Gyro.DeltaT; |
Kovalev_D | 124:9ae09249f842 | 314 | BuffTemp[5] = (Temp >> 8) & 0xff;//дельта |
Kovalev_D | 124:9ae09249f842 | 315 | break; |
Kovalev_D | 124:9ae09249f842 | 316 | |
Kovalev_D | 124:9ae09249f842 | 317 | case 19: |
Kovalev_D | 124:9ae09249f842 | 318 | BuffTemp[5] = (Temp >> 0) & 0xff; |
Kovalev_D | 124:9ae09249f842 | 319 | break; |
Kovalev_D | 124:9ae09249f842 | 320 | |
Kovalev_D | 124:9ae09249f842 | 321 | |
Kovalev_D | 124:9ae09249f842 | 322 | |
Kovalev_D | 124:9ae09249f842 | 323 | //температурный канал 5 |
Kovalev_D | 124:9ae09249f842 | 324 | case 20: |
Kovalev_D | 124:9ae09249f842 | 325 | Temp = Gyro.Termo;//0xa4=164 |
Kovalev_D | 124:9ae09249f842 | 326 | BuffTemp[5] =(Temp >> 8) & 0xff;//температура |
Kovalev_D | 124:9ae09249f842 | 327 | |
Kovalev_D | 124:9ae09249f842 | 328 | break; |
Kovalev_D | 124:9ae09249f842 | 329 | |
Kovalev_D | 124:9ae09249f842 | 330 | case 21: |
Kovalev_D | 124:9ae09249f842 | 331 | BuffTemp[5] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 |
Kovalev_D | 124:9ae09249f842 | 332 | break; |
Kovalev_D | 124:9ae09249f842 | 333 | } |
Kovalev_D | 162:44e4ded32c6a | 334 | Check(BuffTemp, CRC_N); |
Kovalev_D | 162:44e4ded32c6a | 335 | WriteConN (BuffTemp,CRC_N); |
Kovalev_D | 128:1e4675a36c93 | 336 | |
Kovalev_D | 165:b2bd0c810a4f | 337 | |
Kovalev_D | 165:b2bd0c810a4f | 338 | if(CountParam>20)CountParam=0;//зацикливания буфера от 0 до 21 |
Kovalev_D | 165:b2bd0c810a4f | 339 | else CountParam++; |
Kovalev_D | 124:9ae09249f842 | 340 | |
Kovalev_D | 124:9ae09249f842 | 341 | } |
Kovalev_D | 124:9ae09249f842 | 342 | |
Kovalev_D | 121:bbae560cdd43 | 343 | void CMD_Rate2(void) |
Kovalev_D | 121:bbae560cdd43 | 344 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 345 | Gyro.Reper_Event=0; |
Kovalev_D | 121:bbae560cdd43 | 346 | BuffTemp[ 0] = Gyro.SOC_Out; |
Kovalev_D | 121:bbae560cdd43 | 347 | BuffTemp[ 1] = Gyro.My_Addres; |
Kovalev_D | 121:bbae560cdd43 | 348 | |
Kovalev_D | 121:bbae560cdd43 | 349 | |
Kovalev_D | 121:bbae560cdd43 | 350 | BuffTemp[ 2] =(Gyro.CaunPlus >> 8) & 0xff;//старший байт счетчика +. |
Kovalev_D | 121:bbae560cdd43 | 351 | BuffTemp[ 3] =(Gyro.CaunPlus >> 0) & 0xff;//младший байт счетчика +. |
Kovalev_D | 121:bbae560cdd43 | 352 | |
Kovalev_D | 121:bbae560cdd43 | 353 | BuffTemp[ 4] =(Gyro.CaunMin >> 8) & 0xff;//старший байт счетчика -. |
Kovalev_D | 121:bbae560cdd43 | 354 | BuffTemp[ 5] =(Gyro.CaunMin >> 0) & 0xff;//младший байт счетчика -. |
Kovalev_D | 124:9ae09249f842 | 355 | |
Kovalev_D | 122:fbacb932a30b | 356 | Check(BuffTemp, 8); |
Kovalev_D | 122:fbacb932a30b | 357 | WriteConN (BuffTemp,8); |
Kovalev_D | 121:bbae560cdd43 | 358 | } |
Kovalev_D | 124:9ae09249f842 | 359 | |
igor_v | 0:8ad47e2b6f00 | 360 | void CMD_Rate(void) |
Kovalev_D | 190:289514f730ee | 361 | { |
Kovalev_D | 124:9ae09249f842 | 362 | Gyro.Rate1_Event=0; |
Kovalev_D | 108:030cdde08314 | 363 | unsigned int Temp; |
Kovalev_D | 191:40028201ddad | 364 | unsigned int OldCuruAngle; |
igor_v | 28:17c84ed091b3 | 365 | Gyro.Firmware_Version=0xff; /// промежуточная затычка |
Kovalev_D | 122:fbacb932a30b | 366 | |
igor_v | 0:8ad47e2b6f00 | 367 | |
igor_v | 28:17c84ed091b3 | 368 | BuffTemp[ 0] = Gyro.SOC_Out; |
igor_v | 28:17c84ed091b3 | 369 | BuffTemp[ 1] = Gyro.My_Addres; |
igor_v | 21:bc8c1cec3da6 | 370 | |
Kovalev_D | 108:030cdde08314 | 371 | |
Kovalev_D | 112:4a96133a1311 | 372 | BuffTemp[ 2] =(Gyro.CaunPlus >> 8) & 0xff;//старший байт счетчика +. |
Kovalev_D | 112:4a96133a1311 | 373 | BuffTemp[ 3] =(Gyro.CaunPlus >> 0) & 0xff;//младший байт счетчика +. |
Kovalev_D | 108:030cdde08314 | 374 | |
Kovalev_D | 112:4a96133a1311 | 375 | BuffTemp[ 4] =(Gyro.CaunMin >> 8) & 0xff;//старший байт счетчика -. |
Kovalev_D | 112:4a96133a1311 | 376 | BuffTemp[ 5] =(Gyro.CaunMin >> 0) & 0xff;//младший байт счетчика -. |
Kovalev_D | 108:030cdde08314 | 377 | |
Kovalev_D | 191:40028201ddad | 378 | |
Kovalev_D | 191:40028201ddad | 379 | Temp=Gyro.CuruAngle; //(0,28/с) |
Kovalev_D | 191:40028201ddad | 380 | |
Kovalev_D | 193:a0fe8bfc97e4 | 381 | //8 байт + 4 байта от прошлых измерений |
Kovalev_D | 193:a0fe8bfc97e4 | 382 | // Gyro.CuruAngle = Gyro.CuruAngle + OldCuruAngle; //(72 град/с) |
Kovalev_D | 193:a0fe8bfc97e4 | 383 | /* OldCuruAngle=Gyro.CuruAngle & 0xff; //сохраняем 4 байта для след измирений |
Kovalev_D | 193:a0fe8bfc97e4 | 384 | Temp=Gyro.CuruAngle>>8; */ //приводим к форме вывода |
Kovalev_D | 193:a0fe8bfc97e4 | 385 | /* |
Kovalev_D | 191:40028201ddad | 386 | //(9 град/с) |
Kovalev_D | 193:a0fe8bfc97e4 | 387 | OldCuruAngle=Gyro.CuruAngle & 0x1f; //сохраняем 5 бит для след измирений |
Kovalev_D | 193:a0fe8bfc97e4 | 388 | Temp=Gyro.CuruAngle>>5; */ //приводим к форме вывода |
Kovalev_D | 191:40028201ddad | 389 | Gyro.CuruAngle = 0; |
Kovalev_D | 108:030cdde08314 | 390 | BuffTemp[ 6] =(Temp >> 8) & 0xff;//старший байт разности счетчиков |
Kovalev_D | 108:030cdde08314 | 391 | BuffTemp[ 7] =(Temp >> 0) & 0xff;//младший байт разности счетчиков |
Kovalev_D | 108:030cdde08314 | 392 | |
Kovalev_D | 108:030cdde08314 | 393 | |
Kovalev_D | 122:fbacb932a30b | 394 | Temp = Gyro.F_ras; |
Kovalev_D | 122:fbacb932a30b | 395 | BuffTemp[ 8] = (Temp >> 8) & 0xff;//расщипление частота |
Kovalev_D | 122:fbacb932a30b | 396 | BuffTemp[ 9] = (Temp >> 0) & 0xff;// |
igor_v | 21:bc8c1cec3da6 | 397 | |
Kovalev_D | 108:030cdde08314 | 398 | BuffTemp[10] = (Temp >> 8) & 0xff;//выход регулятора гвч; |
Kovalev_D | 122:fbacb932a30b | 399 | BuffTemp[11] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 400 | |
Kovalev_D | 145:f023b2f18b82 | 401 | Temp = (Gyro.AD_Slow >> 16)- 0x7fff; |
Kovalev_D | 108:030cdde08314 | 402 | BuffTemp[12]=(Temp >> 8) & 0xff;//// |
Kovalev_D | 108:030cdde08314 | 403 | BuffTemp[13]=(Temp >> 0) & 0xff;//// |
igor_v | 21:bc8c1cec3da6 | 404 | |
Kovalev_D | 108:030cdde08314 | 405 | |
Kovalev_D | 108:030cdde08314 | 406 | Temp = (unsigned int)((7680000*16/(Gyro.Frq>>12))); |
Kovalev_D | 108:030cdde08314 | 407 | BuffTemp[14] = (Temp >> 8) & 0xff; |
Kovalev_D | 108:030cdde08314 | 408 | BuffTemp[15] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 409 | |
Kovalev_D | 107:4d178bcc9d8a | 410 | BuffTemp[16] = 0xf; |
Kovalev_D | 106:250ddd8629c6 | 411 | BuffTemp[17] = 0x02; |
Kovalev_D | 108:030cdde08314 | 412 | |
igor_v | 21:bc8c1cec3da6 | 413 | |
Kovalev_D | 108:030cdde08314 | 414 | Temp = (unsigned int)(((7680000*16/200) *Gyro.AmpPer /(Gyro.Frq>>12))); |
Kovalev_D | 108:030cdde08314 | 415 | BuffTemp[18] = (Temp >> 8) & 0xff; |
Kovalev_D | 108:030cdde08314 | 416 | BuffTemp[19] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 417 | |
Kovalev_D | 106:250ddd8629c6 | 418 | BuffTemp[20] = 0x00; |
Kovalev_D | 106:250ddd8629c6 | 419 | BuffTemp[21] = 0x00; |
Kovalev_D | 120:9f446f1495e8 | 420 | |
Kovalev_D | 178:1666a83d88a5 | 421 | Temp = Spi.DAC_B - 0x7fff; |
Kovalev_D | 108:030cdde08314 | 422 | BuffTemp[22] = (Temp >> 8) & 0xff; |
Kovalev_D | 108:030cdde08314 | 423 | BuffTemp[23] = (Temp >> 0) & 0xff; |
igor_v | 21:bc8c1cec3da6 | 424 | |
Kovalev_D | 178:1666a83d88a5 | 425 | Temp = Gyro.PLC_Delta >> 16; |
Kovalev_D | 121:bbae560cdd43 | 426 | BuffTemp[24] = (Temp >> 8) & 0xff; |
Kovalev_D | 178:1666a83d88a5 | 427 | BuffTemp[25] = (Temp >> 0) & 0xff;// |
Kovalev_D | 113:8be429494918 | 428 | |
Kovalev_D | 178:1666a83d88a5 | 429 | Temp = Gyro.AD_Slow >> 16; |
Kovalev_D | 113:8be429494918 | 430 | BuffTemp[26] = (Temp >> 8) & 0xff; |
Kovalev_D | 113:8be429494918 | 431 | BuffTemp[27] = (Temp >> 0) & 0xff; |
Kovalev_D | 113:8be429494918 | 432 | |
Kovalev_D | 113:8be429494918 | 433 | Temp = Gyro.AD_Slow >> 16; |
Kovalev_D | 113:8be429494918 | 434 | BuffTemp[28] = (Temp >> 8) & 0xff; |
Kovalev_D | 113:8be429494918 | 435 | BuffTemp[29] = (Temp >> 0) & 0xff; |
Kovalev_D | 113:8be429494918 | 436 | |
Kovalev_D | 113:8be429494918 | 437 | Temp = Gyro.In1; |
Kovalev_D | 113:8be429494918 | 438 | BuffTemp[30] = (Temp >> 8) & 0xff;//in1//2 |
Kovalev_D | 113:8be429494918 | 439 | BuffTemp[31] = (Temp >> 0) & 0xff; |
Kovalev_D | 113:8be429494918 | 440 | |
Kovalev_D | 113:8be429494918 | 441 | Temp = Gyro.In2; |
Kovalev_D | 113:8be429494918 | 442 | BuffTemp[32] = (Temp >> 8) & 0xff; |
Kovalev_D | 113:8be429494918 | 443 | BuffTemp[33] = (Temp >> 0) & 0xff;//in2//3 |
Kovalev_D | 113:8be429494918 | 444 | |
Kovalev_D | 113:8be429494918 | 445 | Temp = Gyro.DeltaT; |
Kovalev_D | 113:8be429494918 | 446 | BuffTemp[34] = (Temp >> 8) & 0xff;//дельта |
Kovalev_D | 113:8be429494918 | 447 | BuffTemp[35] = (Temp >> 0) & 0xff; |
Kovalev_D | 194:8f3cb37a5541 | 448 | // Temp = 000; |
Kovalev_D | 172:ef7bf1663645 | 449 | Temp = Gyro.Termo; |
Kovalev_D | 194:8f3cb37a5541 | 450 | Temp = (0x7fff + Temp);///164 |
Kovalev_D | 195:bcc769f5292b | 451 | |
Kovalev_D | 113:8be429494918 | 452 | BuffTemp[36] =(Temp >> 8) & 0xff;//температура |
Kovalev_D | 115:e5a230e5af52 | 453 | BuffTemp[37] =(Temp >> 0) & 0xff;//ADC6 sesnsor 5 |
igor_v | 21:bc8c1cec3da6 | 454 | |
Kovalev_D | 106:250ddd8629c6 | 455 | BuffTemp[38] =0x00; |
Kovalev_D | 106:250ddd8629c6 | 456 | BuffTemp[39] =0x00; |
Kovalev_D | 106:250ddd8629c6 | 457 | BuffTemp[40] =0x00; |
Kovalev_D | 106:250ddd8629c6 | 458 | BuffTemp[41] =0x00; |
igor_v | 21:bc8c1cec3da6 | 459 | |
igor_v | 21:bc8c1cec3da6 | 460 | |
igor_v | 21:bc8c1cec3da6 | 461 | Check(BuffTemp, 44); |
igor_v | 21:bc8c1cec3da6 | 462 | WriteConN (BuffTemp,44); |
Kovalev_D | 92:c892f0311aa7 | 463 | |
igor_v | 0:8ad47e2b6f00 | 464 | } |
Kovalev_D | 179:2b4e6bc277df | 465 | void CMD_M_vib() |
Kovalev_D | 179:2b4e6bc277df | 466 | { |
Kovalev_D | 179:2b4e6bc277df | 467 | unsigned int temp1,temp2; |
igor_v | 0:8ad47e2b6f00 | 468 | |
Kovalev_D | 179:2b4e6bc277df | 469 | temp1 =((BuffTemp[4]<<8) | BuffTemp[5]); |
Kovalev_D | 179:2b4e6bc277df | 470 | temp1=temp1&0xFFFF; |
Kovalev_D | 180:375dcd9c0cb6 | 471 | (unsigned int)((7680000*16/(Gyro.Frq>>12))); |
Kovalev_D | 180:375dcd9c0cb6 | 472 | Gyro.Frq=(122880000/temp1)<<12; |
Kovalev_D | 179:2b4e6bc277df | 473 | |
Kovalev_D | 179:2b4e6bc277df | 474 | temp2 =((BuffTemp[6]<<8) | BuffTemp[7]); |
Kovalev_D | 179:2b4e6bc277df | 475 | temp2=temp2&0xFFFF; |
Kovalev_D | 179:2b4e6bc277df | 476 | |
Kovalev_D | 179:2b4e6bc277df | 477 | Gyro.AmpPer=(((((Gyro.Frq>>12)*200)/16)*temp2)/7680000); |
Kovalev_D | 179:2b4e6bc277df | 478 | } |
igor_v | 21:bc8c1cec3da6 | 479 | void CMD_M_Control_D8()///установка\сброс регистров управления |
igor_v | 21:bc8c1cec3da6 | 480 | { |
Kovalev_D | 104:ab1cb4ff56b2 | 481 | unsigned int bit,NReg,Pa; |
Kovalev_D | 104:ab1cb4ff56b2 | 482 | unsigned int SR,V,A,Bit_num; |
Kovalev_D | 104:ab1cb4ff56b2 | 483 | SR=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 484 | V=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 485 | A=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 486 | Bit_num=0; |
Kovalev_D | 104:ab1cb4ff56b2 | 487 | |
igor_v | 28:17c84ed091b3 | 488 | BuffTemp[0] = Gyro.SOC_Out; //DD |
igor_v | 28:17c84ed091b3 | 489 | BuffTemp[1] = Gyro.My_Addres; //00 |
igor_v | 28:17c84ed091b3 | 490 | BuffTemp[2] = Gyro.CMD_In; //D8 |
Kovalev_D | 104:ab1cb4ff56b2 | 491 | |
Kovalev_D | 104:ab1cb4ff56b2 | 492 | Pa = BuffTemp[3]; |
Kovalev_D | 104:ab1cb4ff56b2 | 493 | SR = Pa >> 0x7; |
Kovalev_D | 104:ab1cb4ff56b2 | 494 | V = Pa >> 0x5; |
Kovalev_D | 104:ab1cb4ff56b2 | 495 | V = V & 0x3; |
Kovalev_D | 104:ab1cb4ff56b2 | 496 | A = Pa >> 0x4; |
Kovalev_D | 104:ab1cb4ff56b2 | 497 | A = A & 0x1; |
Kovalev_D | 104:ab1cb4ff56b2 | 498 | Bit_num = Pa & 0xf; |
Kovalev_D | 104:ab1cb4ff56b2 | 499 | |
Kovalev_D | 194:8f3cb37a5541 | 500 | if(SR) |
Kovalev_D | 194:8f3cb37a5541 | 501 | { |
Kovalev_D | 104:ab1cb4ff56b2 | 502 | switch (Bit_num){ |
Kovalev_D | 194:8f3cb37a5541 | 503 | case 0x06: FrqON break; |
Kovalev_D | 194:8f3cb37a5541 | 504 | case 0x05: AVibON break; |
Kovalev_D | 194:8f3cb37a5541 | 505 | case 0x01: HFOON break; |
Kovalev_D | 194:8f3cb37a5541 | 506 | case 0x03: PlcON break; |
Kovalev_D | 104:ab1cb4ff56b2 | 507 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 508 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 509 | else{ |
Kovalev_D | 104:ab1cb4ff56b2 | 510 | switch (Bit_num){ |
Kovalev_D | 194:8f3cb37a5541 | 511 | case 0x06: FrqOFF break; |
Kovalev_D | 194:8f3cb37a5541 | 512 | case 0x05: AVibOFF break; |
Kovalev_D | 194:8f3cb37a5541 | 513 | case 0x01: HFOOFF break; |
Kovalev_D | 194:8f3cb37a5541 | 514 | case 0x03: PlcOFF break; |
Kovalev_D | 104:ab1cb4ff56b2 | 515 | } |
Kovalev_D | 104:ab1cb4ff56b2 | 516 | } |
Kovalev_D | 129:406995a91322 | 517 | BuffTemp[0] = Gyro.SOC_Out; //DD |
Kovalev_D | 129:406995a91322 | 518 | BuffTemp[1] = Gyro.My_Addres; //00 |
Kovalev_D | 129:406995a91322 | 519 | BuffTemp[2] = Gyro.CMD_In; //D8 |
Kovalev_D | 129:406995a91322 | 520 | BuffTemp[3] = A<<4; |
Kovalev_D | 129:406995a91322 | 521 | BuffTemp[4] = 0x0; |
Kovalev_D | 129:406995a91322 | 522 | BuffTemp[5] = 0x0; |
Kovalev_D | 129:406995a91322 | 523 | Check(BuffTemp, CRC_N); |
Kovalev_D | 129:406995a91322 | 524 | WriteConN (BuffTemp,CRC_N); |
igor_v | 0:8ad47e2b6f00 | 525 | } |
igor_v | 0:8ad47e2b6f00 | 526 | |
igor_v | 21:bc8c1cec3da6 | 527 | void CMD_M_Control_D9()///чтение регистров управления |
igor_v | 21:bc8c1cec3da6 | 528 | { |
igor_v | 21:bc8c1cec3da6 | 529 | int bit,NReg; |
igor_v | 28:17c84ed091b3 | 530 | BuffTemp[0] = Gyro.SOC_Out; //DD |
igor_v | 28:17c84ed091b3 | 531 | BuffTemp[1] = Gyro.My_Addres; //00 |
igor_v | 28:17c84ed091b3 | 532 | BuffTemp[2] = Gyro.CMD_In; //D9 |
igor_v | 21:bc8c1cec3da6 | 533 | if ((Param1 & 0x10) == 0) { |
igor_v | 21:bc8c1cec3da6 | 534 | BuffTemp[3]=0<<4; |
igor_v | 28:17c84ed091b3 | 535 | BuffTemp[4] = (Gyro.RgConA>>8 )& 0xff; |
igor_v | 28:17c84ed091b3 | 536 | BuffTemp[5] = Gyro.RgConA & 0xff; |
igor_v | 21:bc8c1cec3da6 | 537 | } else { |
igor_v | 21:bc8c1cec3da6 | 538 | BuffTemp[3]=1<<4; |
igor_v | 28:17c84ed091b3 | 539 | BuffTemp[4] = (Gyro.RgConB>>8 ) & 0xff; |
igor_v | 28:17c84ed091b3 | 540 | BuffTemp[5] = Gyro.RgConB & 0xff; |
igor_v | 21:bc8c1cec3da6 | 541 | } |
igor_v | 21:bc8c1cec3da6 | 542 | Check(BuffTemp, CRC_N); |
igor_v | 21:bc8c1cec3da6 | 543 | WriteConN (BuffTemp,CRC_N); |
igor_v | 21:bc8c1cec3da6 | 544 | } |
igor_v | 21:bc8c1cec3da6 | 545 | // (номер (код) ЦАПа 0...3, старший байт требуемого ЦАПа, младший байт треб ЦАПа) |
igor_v | 0:8ad47e2b6f00 | 546 | void CMD_M_Stymul() |
igor_v | 0:8ad47e2b6f00 | 547 | { |
igor_v | 21:bc8c1cec3da6 | 548 | int temp; |
Kovalev_D | 102:4270092be987 | 549 | int HFO; |
Kovalev_D | 102:4270092be987 | 550 | temp=BuffTemp[3]; |
Kovalev_D | 102:4270092be987 | 551 | Consol = temp&0x3; |
Kovalev_D | 103:e96f08947def | 552 | HFO = temp&0x3;// // (номер (код) ЦАПа 0...3, HFO - 3dac, PLC - 0DAC |
igor_v | 21:bc8c1cec3da6 | 553 | temp =((BuffTemp[4]<<8) | BuffTemp[5]); |
igor_v | 21:bc8c1cec3da6 | 554 | // temp=0; |
igor_v | 21:bc8c1cec3da6 | 555 | temp=temp&0xFFFF; |
Kovalev_D | 102:4270092be987 | 556 | |
Kovalev_D | 102:4270092be987 | 557 | if(HFO) |
Kovalev_D | 102:4270092be987 | 558 | { |
Kovalev_D | 102:4270092be987 | 559 | Spi.DAC_A=(unsigned int)temp; |
Kovalev_D | 102:4270092be987 | 560 | } |
Kovalev_D | 102:4270092be987 | 561 | else{ |
igor_v | 21:bc8c1cec3da6 | 562 | DACF =(temp*K_DAC)+deltaDAC; |
igor_v | 21:bc8c1cec3da6 | 563 | Spi.DAC_B =(unsigned int)(DACF) /*(unsigned int)(temp*K_DAC+deltaDAC)*/; // K_DAC); |
igor_v | 21:bc8c1cec3da6 | 564 | } |
igor_v | 0:8ad47e2b6f00 | 565 | } |
Kovalev_D | 194:8f3cb37a5541 | 566 | |
Kovalev_D | 194:8f3cb37a5541 | 567 | void GLDStartDischarg(void) |
Kovalev_D | 194:8f3cb37a5541 | 568 | { |
Kovalev_D | 194:8f3cb37a5541 | 569 | switch(Gyro.My_Addres) |
Kovalev_D | 194:8f3cb37a5541 | 570 | {//смещение поджига и подсветки в зависимости от адреса ГЛД |
Kovalev_D | 194:8f3cb37a5541 | 571 | case 0: |
Kovalev_D | 194:8f3cb37a5541 | 572 | Gyro.Discharg = StartDischarg << ShiftStart0; |
Kovalev_D | 194:8f3cb37a5541 | 573 | Gyro.BackLight = StartBackLight << ShiftStart0; |
Kovalev_D | 194:8f3cb37a5541 | 574 | break; |
Kovalev_D | 194:8f3cb37a5541 | 575 | case 1: |
Kovalev_D | 194:8f3cb37a5541 | 576 | Gyro.Discharg = StartDischarg << ShiftStart1; |
Kovalev_D | 194:8f3cb37a5541 | 577 | Gyro.BackLight = StartBackLight << ShiftStart1; |
Kovalev_D | 194:8f3cb37a5541 | 578 | break; |
Kovalev_D | 194:8f3cb37a5541 | 579 | case 2: |
Kovalev_D | 194:8f3cb37a5541 | 580 | Gyro.Discharg = StartDischarg << ShiftStart2; |
Kovalev_D | 194:8f3cb37a5541 | 581 | Gyro.BackLight = StartBackLight << ShiftStart2; |
Kovalev_D | 194:8f3cb37a5541 | 582 | break; |
Kovalev_D | 194:8f3cb37a5541 | 583 | case 3: |
Kovalev_D | 194:8f3cb37a5541 | 584 | Gyro.Discharg = StartDischarg << ShiftStart3; |
Kovalev_D | 194:8f3cb37a5541 | 585 | Gyro.BackLight = StartBackLight << ShiftStart3; |
Kovalev_D | 194:8f3cb37a5541 | 586 | break; |
Kovalev_D | 194:8f3cb37a5541 | 587 | } |
Kovalev_D | 194:8f3cb37a5541 | 588 | } |
Kovalev_D | 194:8f3cb37a5541 | 589 | |
Kovalev_D | 103:e96f08947def | 590 | void Gph_W() |
Kovalev_D | 103:e96f08947def | 591 | { |
Kovalev_D | 172:ef7bf1663645 | 592 | Gyro.flagGph_W=3; |
Kovalev_D | 172:ef7bf1663645 | 593 | Out_G_photo(BuffTemp[4],BuffTemp[5]); |
Kovalev_D | 172:ef7bf1663645 | 594 | |
Kovalev_D | 103:e96f08947def | 595 | } |
igor_v | 0:8ad47e2b6f00 | 596 | |
Kovalev_D | 102:4270092be987 | 597 | |
igor_v | 0:8ad47e2b6f00 | 598 | unsigned int Check(char *c, unsigned int Count) |
igor_v | 0:8ad47e2b6f00 | 599 | { |
igor_v | 21:bc8c1cec3da6 | 600 | int i=1; |
igor_v | 21:bc8c1cec3da6 | 601 | unsigned int temp,CRC; |
igor_v | 21:bc8c1cec3da6 | 602 | |
igor_v | 21:bc8c1cec3da6 | 603 | |
igor_v | 21:bc8c1cec3da6 | 604 | temp=1; |
igor_v | 21:bc8c1cec3da6 | 605 | CRC=0; |
igor_v | 21:bc8c1cec3da6 | 606 | |
igor_v | 21:bc8c1cec3da6 | 607 | |
igor_v | 21:bc8c1cec3da6 | 608 | for(; i<Count-2; i++) { |
igor_v | 21:bc8c1cec3da6 | 609 | CRC+=c[i]; |
igor_v | 21:bc8c1cec3da6 | 610 | } |
igor_v | 0:8ad47e2b6f00 | 611 | |
igor_v | 21:bc8c1cec3da6 | 612 | if(c[Count-2]!=((CRC>>8)&0xFF)) { |
igor_v | 21:bc8c1cec3da6 | 613 | temp=0; |
igor_v | 28:17c84ed091b3 | 614 | Gyro.RsErrLine = (Gyro.RsErrLine)&=0x2; |
igor_v | 21:bc8c1cec3da6 | 615 | } |
igor_v | 0:8ad47e2b6f00 | 616 | |
igor_v | 21:bc8c1cec3da6 | 617 | if(c[Count-1]!=((CRC>>0)&0xFF)) { |
igor_v | 21:bc8c1cec3da6 | 618 | temp=0; |
igor_v | 28:17c84ed091b3 | 619 | // Gyro.RsErrLine= (Gyro.RsErrLine)=0x2; |
igor_v | 21:bc8c1cec3da6 | 620 | } |
igor_v | 21:bc8c1cec3da6 | 621 | |
igor_v | 21:bc8c1cec3da6 | 622 | c[Count-2]=(CRC>>8)&0xFF; |
igor_v | 21:bc8c1cec3da6 | 623 | c[Count-1]=(CRC>>0)&0xFF; |
igor_v | 21:bc8c1cec3da6 | 624 | |
igor_v | 21:bc8c1cec3da6 | 625 | |
igor_v | 21:bc8c1cec3da6 | 626 | |
igor_v | 21:bc8c1cec3da6 | 627 | return temp; |
igor_v | 0:8ad47e2b6f00 | 628 | } |
igor_v | 0:8ad47e2b6f00 | 629 | |
igor_v | 0:8ad47e2b6f00 | 630 | int Getlengf(void) |
igor_v | 0:8ad47e2b6f00 | 631 | { |
Kovalev_D | 121:bbae560cdd43 | 632 | unsigned int lengf; |
Kovalev_D | 121:bbae560cdd43 | 633 | lengf = 1; |
Kovalev_D | 194:8f3cb37a5541 | 634 | switch(Gyro.CMD_In) |
Kovalev_D | 194:8f3cb37a5541 | 635 | { |
Kovalev_D | 194:8f3cb37a5541 | 636 | case 0x99: lengf=6; CRC_N=8; break; //Mintainance |
Kovalev_D | 194:8f3cb37a5541 | 637 | case 0xB0: lengf=6; CRC_N=9; break; //Delta_Bins |
Kovalev_D | 194:8f3cb37a5541 | 638 | case 0x0F: lengf=6; CRC_N=8; break; //Delta_Bins |
Kovalev_D | 194:8f3cb37a5541 | 639 | case 0xA0: lengf=6; CRC_N=8; break; //Delta_PS |
Kovalev_D | 194:8f3cb37a5541 | 640 | case 0xDD: lengf=6; CRC_N=44; break; //m_rate |
Kovalev_D | 194:8f3cb37a5541 | 641 | case 0x0A: lengf=8; break; //m_stymul |
Kovalev_D | 194:8f3cb37a5541 | 642 | case 0xE9: lengf=6; CRC_N=8; break; //DeviceMode |
Kovalev_D | 194:8f3cb37a5541 | 643 | case 0xE8: lengf=6; CRC_N=8; break; //DeviceMode |
Kovalev_D | 194:8f3cb37a5541 | 644 | case 0xA5: lengf=6; CRC_N=8; break; //DeviceMode |
Kovalev_D | 194:8f3cb37a5541 | 645 | case 0xD8: lengf=6; CRC_N=6; break; //m_control |
Kovalev_D | 194:8f3cb37a5541 | 646 | case 0xD9: lengf=6; CRC_N=8; break; //m_control |
Kovalev_D | 194:8f3cb37a5541 | 647 | case 0xE4: lengf=8; break; //M_VIB_W |
Kovalev_D | 194:8f3cb37a5541 | 648 | case 0xE6: lengf=8; break; //M_Gph_W |
Kovalev_D | 194:8f3cb37a5541 | 649 | } return lengf; |
igor_v | 0:8ad47e2b6f00 | 650 | } |
igor_v | 0:8ad47e2b6f00 | 651 | |
igor_v | 0:8ad47e2b6f00 | 652 | void Read_CMD(void) |
igor_v | 21:bc8c1cec3da6 | 653 | { |
Kovalev_D | 188:4c523cc373cc | 654 | |
Kovalev_D | 147:1aed74f19a8f | 655 | Gyro.RsErrLine = (Gyro.RsErrLine)& 0xffff;//для сброса ошибки |
Kovalev_D | 188:4c523cc373cc | 656 | CountBuFFIn=ReadChekCon1(BuffTemp); |
Kovalev_D | 188:4c523cc373cc | 657 | // чтение данных из консоли |
Kovalev_D | 188:4c523cc373cc | 658 | if(CountBuFFIn==1) { |
Kovalev_D | 190:289514f730ee | 659 | // если есть первый байт |
Kovalev_D | 147:1aed74f19a8f | 660 | if (BuffTemp[0] != SOC_In) { |
Kovalev_D | 147:1aed74f19a8f | 661 | ReadCon1(BuffTemp); |
Kovalev_D | 194:8f3cb37a5541 | 662 | Gyro.RsErrLine += 0x100; |
Kovalev_D | 147:1aed74f19a8f | 663 | BuffTemp[99]=Gyro.RsErrLine; |
Kovalev_D | 147:1aed74f19a8f | 664 | } |
Kovalev_D | 147:1aed74f19a8f | 665 | } |
Kovalev_D | 190:289514f730ee | 666 | else if(CountBuFFIn==2) //если второй байт |
Kovalev_D | 194:8f3cb37a5541 | 667 | { // широковещаительный |
Kovalev_D | 194:8f3cb37a5541 | 668 | if (BuffTemp[1] != Gyro.My_Addres /*|| BuffTemp[1] !=0x1f*/) { |
Kovalev_D | 93:b3803774f110 | 669 | ReadCon1(BuffTemp); |
Kovalev_D | 194:8f3cb37a5541 | 670 | Gyro.RsErrLine += 0x1; |
Kovalev_D | 188:4c523cc373cc | 671 | } |
Kovalev_D | 147:1aed74f19a8f | 672 | } |
Kovalev_D | 190:289514f730ee | 673 | else if(CountBuFFIn==3) // если третий байт |
Kovalev_D | 147:1aed74f19a8f | 674 | { |
igor_v | 28:17c84ed091b3 | 675 | Gyro.CMD_In=BuffTemp[2]; |
Kovalev_D | 92:c892f0311aa7 | 676 | N=Getlengf(); |
Kovalev_D | 92:c892f0311aa7 | 677 | } |
Kovalev_D | 92:c892f0311aa7 | 678 | else if(CountBuFFIn==4 && (N==6)) |
Kovalev_D | 92:c892f0311aa7 | 679 | { // N - длина посылки аскглд(для записи параметров). определяется по коду команды в Getlengf(); |
igor_v | 21:bc8c1cec3da6 | 680 | Param1=BuffTemp[3]; |
Kovalev_D | 92:c892f0311aa7 | 681 | } |
Kovalev_D | 92:c892f0311aa7 | 682 | else if((CountBuFFIn==5)&&(N==7)) |
Kovalev_D | 92:c892f0311aa7 | 683 | { |
igor_v | 21:bc8c1cec3da6 | 684 | Param1=BuffTemp[3]; |
igor_v | 21:bc8c1cec3da6 | 685 | Param2=BuffTemp[4]; |
igor_v | 0:8ad47e2b6f00 | 686 | |
Kovalev_D | 92:c892f0311aa7 | 687 | } |
Kovalev_D | 92:c892f0311aa7 | 688 | else if((CountBuFFIn==6)&&(N==8)) |
Kovalev_D | 147:1aed74f19a8f | 689 | { |
igor_v | 21:bc8c1cec3da6 | 690 | Param1=BuffTemp[3]; |
igor_v | 21:bc8c1cec3da6 | 691 | Param2=BuffTemp[4]; |
igor_v | 21:bc8c1cec3da6 | 692 | Param3=BuffTemp[5]; |
Kovalev_D | 92:c892f0311aa7 | 693 | } |
Kovalev_D | 102:4270092be987 | 694 | else if((CountBuFFIn==8)&&(N==10)) |
Kovalev_D | 147:1aed74f19a8f | 695 | { |
Kovalev_D | 102:4270092be987 | 696 | Param1=BuffTemp[4]; |
Kovalev_D | 102:4270092be987 | 697 | Param2=BuffTemp[5]; |
Kovalev_D | 102:4270092be987 | 698 | Param3=BuffTemp[6]; |
Kovalev_D | 102:4270092be987 | 699 | Param4=BuffTemp[7]; |
Kovalev_D | 102:4270092be987 | 700 | } |
Kovalev_D | 98:95b8e79f13e1 | 701 | |
Kovalev_D | 92:c892f0311aa7 | 702 | else if(CountBuFFIn > (N-1)) |
Kovalev_D | 92:c892f0311aa7 | 703 | { |
Kovalev_D | 147:1aed74f19a8f | 704 | ReadCon1(BuffTemp); |
Kovalev_D | 147:1aed74f19a8f | 705 | switch(Gyro.CMD_In) { |
Kovalev_D | 194:8f3cb37a5541 | 706 | case 0x99: Gyro.ModeOut=0; CMD_Maintenance(); break; |
Kovalev_D | 194:8f3cb37a5541 | 707 | case 0xD8: CMD_M_Control_D8(); break; |
Kovalev_D | 194:8f3cb37a5541 | 708 | case 0xE9: CMD_M_Param_R(); break; //чтение параметров |
Kovalev_D | 194:8f3cb37a5541 | 709 | case 0xE8: CMD_M_Param_W(); break; //запись параметра |
Kovalev_D | 194:8f3cb37a5541 | 710 | case 0xDA: GLDStartDischarg(); break; |
Kovalev_D | 194:8f3cb37a5541 | 711 | case 0xD9: CMD_M_Control_D9(); break; |
Kovalev_D | 194:8f3cb37a5541 | 712 | case 0x0A: CMD_M_Stymul(); break; |
Kovalev_D | 194:8f3cb37a5541 | 713 | case 0xDD: TempParam=(BuffTemp[3]) & 0x9f; //Rate |
Kovalev_D | 193:a0fe8bfc97e4 | 714 | switch(TempParam) { |
Kovalev_D | 193:a0fe8bfc97e4 | 715 | case Rate1 : CMD_Rate(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 716 | case Rate2 : CMD_Rate2(); break; |
Kovalev_D | 194:8f3cb37a5541 | 717 | case PRate1 : Gyro.ModeOut=1; break; |
Kovalev_D | 194:8f3cb37a5541 | 718 | case PRate2 : Gyro.ModeOut=2; break; |
Kovalev_D | 193:a0fe8bfc97e4 | 719 | } |
Kovalev_D | 194:8f3cb37a5541 | 720 | break; //DropDelay(); выставка задержки для мультидропа сбрасывается в команде CMD_Maintenance() на () микросекунд; |
Kovalev_D | 194:8f3cb37a5541 | 721 | case 0xA0: DropDelay(); TempParam=(BuffTemp[3]) & 0x90; //Delta_PS |
Kovalev_D | 193:a0fe8bfc97e4 | 722 | switch(TempParam) { |
Kovalev_D | 193:a0fe8bfc97e4 | 723 | case Delta_500 : CMD_Delta_PS(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 724 | case Delta_EXT : CMD_Delta_PS(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 725 | case PDelta_500 : Gyro.ModeOut=3; break; |
Kovalev_D | 193:a0fe8bfc97e4 | 726 | case PDelta_EXT : Gyro.ModeOut=4; break; |
Kovalev_D | 193:a0fe8bfc97e4 | 727 | } |
Kovalev_D | 194:8f3cb37a5541 | 728 | break; |
Kovalev_D | 194:8f3cb37a5541 | 729 | case 0xB0: DropDelay(); TempParam = TempParam=(BuffTemp[3]>>7); //Delta_Bins |
Kovalev_D | 193:a0fe8bfc97e4 | 730 | switch(TempParam) { |
Kovalev_D | 193:a0fe8bfc97e4 | 731 | case PDelta_Bins: Gyro.ModeOut=5; break; |
Kovalev_D | 193:a0fe8bfc97e4 | 732 | case Delta_Bins : CMD_Delta_Bins(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 733 | } |
Kovalev_D | 194:8f3cb37a5541 | 734 | break; |
Kovalev_D | 194:8f3cb37a5541 | 735 | case 0x0F: DropDelay(); TempParam = (((BuffTemp[3])>>4) & 0x9); //B_Delta |
Kovalev_D | 193:a0fe8bfc97e4 | 736 | switch(TempParam) { |
Kovalev_D | 193:a0fe8bfc97e4 | 737 | case PB_Delta_EXT: Gyro.ModeOut=6; break; |
Kovalev_D | 193:a0fe8bfc97e4 | 738 | case PB_Delta_INT: Gyro.ModeOut=7; break; |
Kovalev_D | 193:a0fe8bfc97e4 | 739 | case B_Delta_EXT: CMD_B_Delta(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 740 | case B_Delta_INT: CMD_B_Delta(); break; |
Kovalev_D | 193:a0fe8bfc97e4 | 741 | } |
Kovalev_D | 194:8f3cb37a5541 | 742 | break; |
Kovalev_D | 194:8f3cb37a5541 | 743 | case 0xE4: CMD_M_vib(); break; |
Kovalev_D | 194:8f3cb37a5541 | 744 | case 0xE6: Gph_W(); break; |
Kovalev_D | 194:8f3cb37a5541 | 745 | Gyro.RsErrLine = 0; |
Kovalev_D | 194:8f3cb37a5541 | 746 | } |
Kovalev_D | 194:8f3cb37a5541 | 747 | } |
Kovalev_D | 147:1aed74f19a8f | 748 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 749 | |
Kovalev_D | 193:a0fe8bfc97e4 | 750 | |
Kovalev_D | 193:a0fe8bfc97e4 | 751 | |
Kovalev_D | 193:a0fe8bfc97e4 | 752 | |
Kovalev_D | 193:a0fe8bfc97e4 | 753 | |
Kovalev_D | 193:a0fe8bfc97e4 | 754 | |
Kovalev_D | 193:a0fe8bfc97e4 | 755 | |
Kovalev_D | 193:a0fe8bfc97e4 | 756 | |
Kovalev_D | 193:a0fe8bfc97e4 | 757 | |
Kovalev_D | 193:a0fe8bfc97e4 | 758 | |
Kovalev_D | 193:a0fe8bfc97e4 | 759 | |
Kovalev_D | 193:a0fe8bfc97e4 | 760 | |
Kovalev_D | 193:a0fe8bfc97e4 | 761 | |
Kovalev_D | 193:a0fe8bfc97e4 | 762 | |
Kovalev_D | 193:a0fe8bfc97e4 | 763 | |
Kovalev_D | 193:a0fe8bfc97e4 | 764 | |
Kovalev_D | 193:a0fe8bfc97e4 | 765 | |
Kovalev_D | 193:a0fe8bfc97e4 | 766 | |
Kovalev_D | 193:a0fe8bfc97e4 | 767 | |
Kovalev_D | 193:a0fe8bfc97e4 | 768 | |
Kovalev_D | 193:a0fe8bfc97e4 | 769 | |
Kovalev_D | 147:1aed74f19a8f | 770 | void TechLog(void) |
Kovalev_D | 147:1aed74f19a8f | 771 | { |
Kovalev_D | 147:1aed74f19a8f | 772 | if (ReadCon (Time)) { |
Kovalev_D | 147:1aed74f19a8f | 773 | ///////////////////////////////////////////////////////////////// |
Kovalev_D | 147:1aed74f19a8f | 774 | //////////////////////////////////////////////////////////////// |
Kovalev_D | 147:1aed74f19a8f | 775 | //////////////////////Выбор FlashMod/////////////////////////// |
Kovalev_D | 147:1aed74f19a8f | 776 | //////////////////////////////////////////////////////////////// |
Kovalev_D | 121:bbae560cdd43 | 777 | |
Kovalev_D | 193:a0fe8bfc97e4 | 778 | if (Time[0] == 'B') |
Kovalev_D | 193:a0fe8bfc97e4 | 779 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 780 | sprintf((Time),"<%015d>\r\n", Gyro.tempdelta); |
Kovalev_D | 193:a0fe8bfc97e4 | 781 | WriteCon(Time);} |
Kovalev_D | 147:1aed74f19a8f | 782 | if (Time[0] == 'W') {Gyro.FlashMod=2;} |
Kovalev_D | 147:1aed74f19a8f | 783 | if (Time[0] == 'R') {Gyro.FlashMod=3;} |
Kovalev_D | 147:1aed74f19a8f | 784 | /////////////////////////////////////////////////////////////// |
Kovalev_D | 147:1aed74f19a8f | 785 | /////////////////////////////////////////////////////////////// |
Kovalev_D | 147:1aed74f19a8f | 786 | //////////////////////////////////////////////////////////////// |
Kovalev_D | 147:1aed74f19a8f | 787 | if (Time[0] == 'H') { // если ввели буквц h то выдать подсказку. сделанно через принф ОЧЕНЬ плохо в работе не использовать |
Kovalev_D | 147:1aed74f19a8f | 788 | sprintf(Time,"\r\nCompiled: %s %s.",__DATE__, __TIME__ ); //Подготовка даты и времени компиляции |
Kovalev_D | 147:1aed74f19a8f | 789 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 790 | sprintf(Time,"--%d.%3.d.%2.d.",Time1Hz,Time1K,Time100K); //Временно выдачпа временни из трех чисел |
Kovalev_D | 147:1aed74f19a8f | 791 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 792 | } |
Kovalev_D | 147:1aed74f19a8f | 793 | if (Time[0] == 'D') { |
Kovalev_D | 147:1aed74f19a8f | 794 | Gyro.Discharg = StartDischarg; |
Kovalev_D | 147:1aed74f19a8f | 795 | } |
Kovalev_D | 147:1aed74f19a8f | 796 | if (Time[0] == 'L') { |
Kovalev_D | 147:1aed74f19a8f | 797 | Gyro.BackLight = StartBackLight; |
Kovalev_D | 147:1aed74f19a8f | 798 | } |
Kovalev_D | 147:1aed74f19a8f | 799 | if (Time[0] == 'F') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 800 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 801 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 802 | sprintf((Time)," Gyro.CuruAngle = <%015d>", Gyro.CuruAngle); |
Kovalev_D | 147:1aed74f19a8f | 803 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 804 | } |
Kovalev_D | 147:1aed74f19a8f | 805 | if (Time[0] == 'q') { // внешняя защелка |
Kovalev_D | 147:1aed74f19a8f | 806 | Gyro.EXT_Latch=1; |
Kovalev_D | 147:1aed74f19a8f | 807 | } |
Kovalev_D | 147:1aed74f19a8f | 808 | if (Time[0] == '1') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 809 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 810 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 811 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ",Buff_1Point[i]); |
Kovalev_D | 147:1aed74f19a8f | 812 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 813 | } |
Kovalev_D | 147:1aed74f19a8f | 814 | if (Time[0] == '2') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 815 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 816 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 817 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ", Buff_32Point[CountV31]); |
Kovalev_D | 147:1aed74f19a8f | 818 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 819 | } |
Kovalev_D | 147:1aed74f19a8f | 820 | if (Time[0] == '3') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 821 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 822 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 823 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ", Buff_16Point[i]); |
Kovalev_D | 147:1aed74f19a8f | 824 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 825 | } |
Kovalev_D | 147:1aed74f19a8f | 826 | if (Time[0] == '4') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 827 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 828 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 829 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%07d> ", Buff_8Point[i]); |
Kovalev_D | 193:a0fe8bfc97e4 | 830 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 831 | sprintf(Time,"\r\n"); |
Kovalev_D | 193:a0fe8bfc97e4 | 832 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 833 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%07d> ", Buff_16PointD[i]); |
Kovalev_D | 191:40028201ddad | 834 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 835 | sprintf(Time,"\r\n"); |
Kovalev_D | 191:40028201ddad | 836 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 837 | sprintf(Time,"\r\n"); |
Kovalev_D | 191:40028201ddad | 838 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 839 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%07d> ", Buff_32Point[i]); |
Kovalev_D | 191:40028201ddad | 840 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 841 | sprintf(Time,"\r\n"); |
Kovalev_D | 191:40028201ddad | 842 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 843 | sprintf(Time,"\r\n"); |
Kovalev_D | 191:40028201ddad | 844 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 845 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%07d> ", Buff_Restored_sin[i]); |
Kovalev_D | 191:40028201ddad | 846 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 847 | sprintf(Time,"\r\n\r\n\r\n"); |
Kovalev_D | 191:40028201ddad | 848 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 849 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 850 | if (Time[0] == 'z'){ // выдача технологичес6кая |
Kovalev_D | 193:a0fe8bfc97e4 | 851 | |
Kovalev_D | 191:40028201ddad | 852 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 853 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 854 | |
Kovalev_D | 193:a0fe8bfc97e4 | 855 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 193:a0fe8bfc97e4 | 856 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 857 | ttemp+=(Buff_Restored_sin[i]); |
Kovalev_D | 193:a0fe8bfc97e4 | 858 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 859 | sprintf((Time)," %d ",ttemp); |
Kovalev_D | 193:a0fe8bfc97e4 | 860 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 861 | |
Kovalev_D | 193:a0fe8bfc97e4 | 862 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 193:a0fe8bfc97e4 | 863 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 864 | ttemp += Buff_64Point[i]; |
Kovalev_D | 193:a0fe8bfc97e4 | 865 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 866 | sprintf((Time)," %d ",ttemp); |
Kovalev_D | 193:a0fe8bfc97e4 | 867 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 868 | |
Kovalev_D | 193:a0fe8bfc97e4 | 869 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 193:a0fe8bfc97e4 | 870 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 871 | ttemp += Buff_32Point[i]; |
Kovalev_D | 193:a0fe8bfc97e4 | 872 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 873 | sprintf((Time)," %d ",ttemp); |
Kovalev_D | 193:a0fe8bfc97e4 | 874 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 875 | |
Kovalev_D | 193:a0fe8bfc97e4 | 876 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 147:1aed74f19a8f | 877 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 878 | ttemp += Buff_16Point[i]; |
Kovalev_D | 193:a0fe8bfc97e4 | 879 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 880 | sprintf((Time)," %d ",ttemp); |
Kovalev_D | 193:a0fe8bfc97e4 | 881 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 882 | |
Kovalev_D | 193:a0fe8bfc97e4 | 883 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 193:a0fe8bfc97e4 | 884 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 885 | ttemp += Buff_16PointD[i]; |
Kovalev_D | 147:1aed74f19a8f | 886 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 887 | sprintf((Time)," %d ",ttemp); |
Kovalev_D | 193:a0fe8bfc97e4 | 888 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 889 | |
Kovalev_D | 193:a0fe8bfc97e4 | 890 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 193:a0fe8bfc97e4 | 891 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 892 | ttemp += Buff_8Point[i]; |
Kovalev_D | 193:a0fe8bfc97e4 | 893 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 894 | sprintf((Time)," %d ",ttemp); |
Kovalev_D | 193:a0fe8bfc97e4 | 895 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 896 | |
Kovalev_D | 193:a0fe8bfc97e4 | 897 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 193:a0fe8bfc97e4 | 898 | { |
Kovalev_D | 193:a0fe8bfc97e4 | 899 | ttemp += Buff_1Point[i]; |
Kovalev_D | 193:a0fe8bfc97e4 | 900 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 901 | sprintf((Time)," %d ",ttemp); |
Kovalev_D | 193:a0fe8bfc97e4 | 902 | WriteCon(Time); |
Kovalev_D | 175:daffcc97d532 | 903 | } |
Kovalev_D | 147:1aed74f19a8f | 904 | if (Time[0] == '6') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 905 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 906 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 907 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 9)," <%05d> ",Buff_Restored_sin[i]); |
Kovalev_D | 147:1aed74f19a8f | 908 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 909 | } |
Kovalev_D | 147:1aed74f19a8f | 910 | if (Time[0] == '7') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 911 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 912 | WriteCon(Time); |
Kovalev_D | 191:40028201ddad | 913 | for (int i = 0; i < 32; i++ )sprintf((Time + i * 10)," <%05d> ", Buff_16PointD[CountV31] - Buff_32Point[CountV31]); |
Kovalev_D | 147:1aed74f19a8f | 914 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 915 | } |
Kovalev_D | 147:1aed74f19a8f | 916 | if (Time[0] == '9') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 917 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 918 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 919 | for (int i = 0; i < 32; i++ )sprintf((Time)," <%07d> ",Gyro.Frq); |
Kovalev_D | 147:1aed74f19a8f | 920 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 921 | } |
Kovalev_D | 193:a0fe8bfc97e4 | 922 | /*if (Time[0] == 'p') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 923 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 924 | WriteCon(Time); |
Kovalev_D | 185:7e200f4d9b16 | 925 | for (int i = 0; i < 32; i++ )sprintf((Time)," <%07d> ",Gyro.MaxAmp); |
Kovalev_D | 147:1aed74f19a8f | 926 | WriteCon(Time); |
Kovalev_D | 193:a0fe8bfc97e4 | 927 | }*/ |
Kovalev_D | 179:2b4e6bc277df | 928 | if (Time[0] == 'x') { // выдача технологическая |
Kovalev_D | 179:2b4e6bc277df | 929 | sprintf(Time,"\r\n"); |
Kovalev_D | 179:2b4e6bc277df | 930 | WriteCon(Time); |
Kovalev_D | 179:2b4e6bc277df | 931 | sprintf((Time)," Gyro.MaxAmp = <%07d> Gyro.CaunPlus = <%07d> Gyro.CaunMin= <%07d> Gyro.CaunPlus+Gyro.CaunMin-5000 <%07d> ",Gyro.MaxAmp, Gyro.CaunPlus, Gyro.CaunMin, ((Gyro.CaunPlus + Gyro.CaunMin)-5000)); |
Kovalev_D | 179:2b4e6bc277df | 932 | WriteCon(Time); |
Kovalev_D | 179:2b4e6bc277df | 933 | } |
Kovalev_D | 147:1aed74f19a8f | 934 | if (Time[0] == 'm') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 935 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 936 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 937 | sprintf((Time),"PLC_Delta <%07d> ", Gyro.PLC_Delta); WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 938 | sprintf((Time),"PLC_DeltaADD <%07d> ", Gyro.PLC_DeltaADD); WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 939 | } |
Kovalev_D | 147:1aed74f19a8f | 940 | if (Time[0] == 'V') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 941 | Spi.DAC_B += 200; |
Kovalev_D | 195:bcc769f5292b | 942 | sprintf(Time,"%d\r\n", Spi.DAC_B); |
Kovalev_D | 195:bcc769f5292b | 943 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 944 | } |
Kovalev_D | 147:1aed74f19a8f | 945 | if (Time[0] == 'v') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 946 | Spi.DAC_B -= 200; |
Kovalev_D | 195:bcc769f5292b | 947 | sprintf(Time,"%d\r\n", Spi.DAC_B); |
Kovalev_D | 195:bcc769f5292b | 948 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 949 | } |
Kovalev_D | 147:1aed74f19a8f | 950 | //////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 150:29c9f7671bac | 951 | /*Запись лога регулировки частоты*/ |
Kovalev_D | 192:d32c8cf7bcd9 | 952 | if (Time[0] == 'y') Gyro.flag=1; //включит передачу |
Kovalev_D | 192:d32c8cf7bcd9 | 953 | if (Time[0] == 'u') Gyro.flag=0; //LPC_TIM1->MR0+1000 вносим помеху |
Kovalev_D | 192:d32c8cf7bcd9 | 954 | if (Time[0] == 'i') Gyro.flag=2; //LPC_TIM1->MR0 убираем помеху |
Kovalev_D | 193:a0fe8bfc97e4 | 955 | if (Time[0] == 'o') Gyro.flag=3; //Отключить передачу |
Kovalev_D | 193:a0fe8bfc97e4 | 956 | if (Time[0] == 'p') Gyro.LogHZ = 1; //Отключить передачу |
Kovalev_D | 193:a0fe8bfc97e4 | 957 | if (Time[0] == 'l') Gyro.LogHZ = 0; //Отключить передачу |
Kovalev_D | 147:1aed74f19a8f | 958 | //////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 150:29c9f7671bac | 959 | /*Запись лога регулировки периметра*/ |
Kovalev_D | 151:d565ce4d58c8 | 960 | if (Time[0] == 'g') {Gyro.LogPLC=1; Gyro.PLC_Lern=0;} //включит передачу |
Kovalev_D | 150:29c9f7671bac | 961 | if (Time[0] == 'h') Gyro.StrayPLC_flag = 1; //LPC_TIM1->MR0+1000 вносим помеху + |
Kovalev_D | 150:29c9f7671bac | 962 | if (Time[0] == 'j') Gyro.StrayPLC_flag = 0; //LPC_TIM1->MR0 убираем помеху |
Kovalev_D | 150:29c9f7671bac | 963 | if (Time[0] == 'b') Gyro.StrayPLC_flag = 3; //LPC_TIM1->MR0-1000 вносим помеху - |
Kovalev_D | 150:29c9f7671bac | 964 | if (Time[0] == 'n') Gyro.StrayPLC_flag = 2; //LPC_TIM1->MR0+2500 большая помеха. |
Kovalev_D | 168:f4a6abb18358 | 965 | if (Time[0] == 'k') Gyro.LogPLC = 0; //Отключить передачу |
Kovalev_D | 168:f4a6abb18358 | 966 | if (Time[0] == 'd') Gyro.ModJump = 1; //прыжок на воду + |
Kovalev_D | 168:f4a6abb18358 | 967 | if (Time[0] == 'f') Gyro.ModJump = 2; //прыжок на воду - |
Kovalev_D | 175:daffcc97d532 | 968 | //if (Time[0] == 'z') {Gyro.ModJump = 3; Spi.DAC_B = 0x3a98; } //прообежать по всем модам. |
Kovalev_D | 189:8a16378724c4 | 969 | ////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 189:8a16378724c4 | 970 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 189:8a16378724c4 | 971 | ////////////////////////////////////////////////////выдача частоты в терминал длля записи лога/////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 189:8a16378724c4 | 972 | ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
Kovalev_D | 189:8a16378724c4 | 973 | //////G=1,K=0 в терменале |
Kovalev_D | 189:8a16378724c4 | 974 | |
Kovalev_D | 189:8a16378724c4 | 975 | if((Gyro.LogHZ == 1)&&(Gyro.Event_500Hz==1)) //Запись для Ориджина. |
Kovalev_D | 189:8a16378724c4 | 976 | { |
Kovalev_D | 189:8a16378724c4 | 977 | Gyro.Event_500Hz=0; |
Kovalev_D | 191:40028201ddad | 978 | sprintf((Time),"%d \r\n",Gyro.MaxAmp); |
Kovalev_D | 189:8a16378724c4 | 979 | WriteCon(Time); |
Kovalev_D | 189:8a16378724c4 | 980 | } |
Kovalev_D | 189:8a16378724c4 | 981 | |
Kovalev_D | 189:8a16378724c4 | 982 | |
Kovalev_D | 147:1aed74f19a8f | 983 | if (Time[0] == '8') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 984 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 985 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 986 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 147:1aed74f19a8f | 987 | { |
Kovalev_D | 147:1aed74f19a8f | 988 | ttemp=(Buff_AMP64P[i]-(Buff_AMP[i])); |
Kovalev_D | 147:1aed74f19a8f | 989 | if (ttemp < 0) WriteCon("1"); else WriteCon("0"); |
Kovalev_D | 147:1aed74f19a8f | 990 | } |
Kovalev_D | 147:1aed74f19a8f | 991 | } |
Kovalev_D | 168:f4a6abb18358 | 992 | if (Time[0] == 'q') { // выдача технологическая |
Kovalev_D | 147:1aed74f19a8f | 993 | sprintf(Time,"\r\n"); |
Kovalev_D | 147:1aed74f19a8f | 994 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 995 | for (int i = 0; i < 32; i++ ) |
Kovalev_D | 147:1aed74f19a8f | 996 | { |
Kovalev_D | 147:1aed74f19a8f | 997 | ttemp=(Buff_Restored_sin[i]); |
Kovalev_D | 147:1aed74f19a8f | 998 | if (ttemp < 0) WriteCon("1"); else WriteCon("0"); |
Kovalev_D | 147:1aed74f19a8f | 999 | } |
Kovalev_D | 147:1aed74f19a8f | 1000 | } |
Kovalev_D | 147:1aed74f19a8f | 1001 | if (Gyro.PLC_Error2Mode) { // выдача технологическая |
Kovalev_D | 195:bcc769f5292b | 1002 | // sprintf(Time,"\r\nPLC_Error2Mode"); |
Kovalev_D | 147:1aed74f19a8f | 1003 | WriteCon(Time); |
Kovalev_D | 147:1aed74f19a8f | 1004 | } |
Kovalev_D | 147:1aed74f19a8f | 1005 | } |
igor_v | 0:8ad47e2b6f00 | 1006 | } |
igor_v | 0:8ad47e2b6f00 | 1007 | |
igor_v | 0:8ad47e2b6f00 | 1008 |