Explorar o código

DAC 제어 소수점 둘째자리 까지 제어 할 수 있도록 수정

YJ %!s(int64=6) %!d(string=hai) anos
pai
achega
10fd85c0f6
Modificáronse 2 ficheiros con 35 adicións e 32 borrados
  1. 16 16
      Basic_Terminal/Wnd/Main_Form.Designer.cs
  2. 19 16
      Basic_Terminal/Wnd/Main_Form.cs

+ 16 - 16
Basic_Terminal/Wnd/Main_Form.Designer.cs

@@ -2087,12 +2087,12 @@
2087
             // 
2087
             // 
2088
             // numericUpDown_DAC_VoltCtrl_A
2088
             // numericUpDown_DAC_VoltCtrl_A
2089
             // 
2089
             // 
2090
-            this.numericUpDown_DAC_VoltCtrl_A.DecimalPlaces = 1;
2090
+            this.numericUpDown_DAC_VoltCtrl_A.DecimalPlaces = 2;
2091
             this.numericUpDown_DAC_VoltCtrl_A.Increment = new decimal(new int[] {
2091
             this.numericUpDown_DAC_VoltCtrl_A.Increment = new decimal(new int[] {
2092
             1,
2092
             1,
2093
             0,
2093
             0,
2094
             0,
2094
             0,
2095
-            65536});
2095
+            131072});
2096
             this.numericUpDown_DAC_VoltCtrl_A.Location = new System.Drawing.Point(95, 55);
2096
             this.numericUpDown_DAC_VoltCtrl_A.Location = new System.Drawing.Point(95, 55);
2097
             this.numericUpDown_DAC_VoltCtrl_A.Maximum = new decimal(new int[] {
2097
             this.numericUpDown_DAC_VoltCtrl_A.Maximum = new decimal(new int[] {
2098
             4,
2098
             4,
@@ -2108,12 +2108,12 @@
2108
             // 
2108
             // 
2109
             // numericUpDown_DAC_VoltCtrl_E
2109
             // numericUpDown_DAC_VoltCtrl_E
2110
             // 
2110
             // 
2111
-            this.numericUpDown_DAC_VoltCtrl_E.DecimalPlaces = 1;
2111
+            this.numericUpDown_DAC_VoltCtrl_E.DecimalPlaces = 2;
2112
             this.numericUpDown_DAC_VoltCtrl_E.Increment = new decimal(new int[] {
2112
             this.numericUpDown_DAC_VoltCtrl_E.Increment = new decimal(new int[] {
2113
             1,
2113
             1,
2114
             0,
2114
             0,
2115
             0,
2115
             0,
2116
-            65536});
2116
+            131072});
2117
             this.numericUpDown_DAC_VoltCtrl_E.Location = new System.Drawing.Point(95, 84);
2117
             this.numericUpDown_DAC_VoltCtrl_E.Location = new System.Drawing.Point(95, 84);
2118
             this.numericUpDown_DAC_VoltCtrl_E.Maximum = new decimal(new int[] {
2118
             this.numericUpDown_DAC_VoltCtrl_E.Maximum = new decimal(new int[] {
2119
             4,
2119
             4,
@@ -2223,12 +2223,12 @@
2223
             // 
2223
             // 
2224
             // numericUpDown_DAC_VoltCtrl_H
2224
             // numericUpDown_DAC_VoltCtrl_H
2225
             // 
2225
             // 
2226
-            this.numericUpDown_DAC_VoltCtrl_H.DecimalPlaces = 1;
2226
+            this.numericUpDown_DAC_VoltCtrl_H.DecimalPlaces = 2;
2227
             this.numericUpDown_DAC_VoltCtrl_H.Increment = new decimal(new int[] {
2227
             this.numericUpDown_DAC_VoltCtrl_H.Increment = new decimal(new int[] {
2228
             1,
2228
             1,
2229
             0,
2229
             0,
2230
             0,
2230
             0,
2231
-            65536});
2231
+            131072});
2232
             this.numericUpDown_DAC_VoltCtrl_H.Location = new System.Drawing.Point(836, 84);
2232
             this.numericUpDown_DAC_VoltCtrl_H.Location = new System.Drawing.Point(836, 84);
2233
             this.numericUpDown_DAC_VoltCtrl_H.Maximum = new decimal(new int[] {
2233
             this.numericUpDown_DAC_VoltCtrl_H.Maximum = new decimal(new int[] {
2234
             4,
2234
             4,
@@ -2244,12 +2244,12 @@
2244
             // 
2244
             // 
2245
             // numericUpDown_DAC_VoltCtrl_F
2245
             // numericUpDown_DAC_VoltCtrl_F
2246
             // 
2246
             // 
2247
-            this.numericUpDown_DAC_VoltCtrl_F.DecimalPlaces = 1;
2247
+            this.numericUpDown_DAC_VoltCtrl_F.DecimalPlaces = 2;
2248
             this.numericUpDown_DAC_VoltCtrl_F.Increment = new decimal(new int[] {
2248
             this.numericUpDown_DAC_VoltCtrl_F.Increment = new decimal(new int[] {
2249
             1,
2249
             1,
2250
             0,
2250
             0,
2251
             0,
2251
             0,
2252
-            65536});
2252
+            131072});
2253
             this.numericUpDown_DAC_VoltCtrl_F.Location = new System.Drawing.Point(342, 84);
2253
             this.numericUpDown_DAC_VoltCtrl_F.Location = new System.Drawing.Point(342, 84);
2254
             this.numericUpDown_DAC_VoltCtrl_F.Maximum = new decimal(new int[] {
2254
             this.numericUpDown_DAC_VoltCtrl_F.Maximum = new decimal(new int[] {
2255
             4,
2255
             4,
@@ -2265,12 +2265,12 @@
2265
             // 
2265
             // 
2266
             // numericUpDown_DAC_VoltCtrl_G
2266
             // numericUpDown_DAC_VoltCtrl_G
2267
             // 
2267
             // 
2268
-            this.numericUpDown_DAC_VoltCtrl_G.DecimalPlaces = 1;
2268
+            this.numericUpDown_DAC_VoltCtrl_G.DecimalPlaces = 2;
2269
             this.numericUpDown_DAC_VoltCtrl_G.Increment = new decimal(new int[] {
2269
             this.numericUpDown_DAC_VoltCtrl_G.Increment = new decimal(new int[] {
2270
             1,
2270
             1,
2271
             0,
2271
             0,
2272
             0,
2272
             0,
2273
-            65536});
2273
+            131072});
2274
             this.numericUpDown_DAC_VoltCtrl_G.Location = new System.Drawing.Point(589, 84);
2274
             this.numericUpDown_DAC_VoltCtrl_G.Location = new System.Drawing.Point(589, 84);
2275
             this.numericUpDown_DAC_VoltCtrl_G.Maximum = new decimal(new int[] {
2275
             this.numericUpDown_DAC_VoltCtrl_G.Maximum = new decimal(new int[] {
2276
             4,
2276
             4,
@@ -2286,12 +2286,12 @@
2286
             // 
2286
             // 
2287
             // numericUpDown_DAC_VoltCtrl_D
2287
             // numericUpDown_DAC_VoltCtrl_D
2288
             // 
2288
             // 
2289
-            this.numericUpDown_DAC_VoltCtrl_D.DecimalPlaces = 1;
2289
+            this.numericUpDown_DAC_VoltCtrl_D.DecimalPlaces = 2;
2290
             this.numericUpDown_DAC_VoltCtrl_D.Increment = new decimal(new int[] {
2290
             this.numericUpDown_DAC_VoltCtrl_D.Increment = new decimal(new int[] {
2291
             1,
2291
             1,
2292
             0,
2292
             0,
2293
             0,
2293
             0,
2294
-            65536});
2294
+            131072});
2295
             this.numericUpDown_DAC_VoltCtrl_D.Location = new System.Drawing.Point(836, 55);
2295
             this.numericUpDown_DAC_VoltCtrl_D.Location = new System.Drawing.Point(836, 55);
2296
             this.numericUpDown_DAC_VoltCtrl_D.Maximum = new decimal(new int[] {
2296
             this.numericUpDown_DAC_VoltCtrl_D.Maximum = new decimal(new int[] {
2297
             4,
2297
             4,
@@ -2307,12 +2307,12 @@
2307
             // 
2307
             // 
2308
             // numericUpDown_DAC_VoltCtrl_B
2308
             // numericUpDown_DAC_VoltCtrl_B
2309
             // 
2309
             // 
2310
-            this.numericUpDown_DAC_VoltCtrl_B.DecimalPlaces = 1;
2310
+            this.numericUpDown_DAC_VoltCtrl_B.DecimalPlaces = 2;
2311
             this.numericUpDown_DAC_VoltCtrl_B.Increment = new decimal(new int[] {
2311
             this.numericUpDown_DAC_VoltCtrl_B.Increment = new decimal(new int[] {
2312
             1,
2312
             1,
2313
             0,
2313
             0,
2314
             0,
2314
             0,
2315
-            65536});
2315
+            131072});
2316
             this.numericUpDown_DAC_VoltCtrl_B.Location = new System.Drawing.Point(342, 55);
2316
             this.numericUpDown_DAC_VoltCtrl_B.Location = new System.Drawing.Point(342, 55);
2317
             this.numericUpDown_DAC_VoltCtrl_B.Maximum = new decimal(new int[] {
2317
             this.numericUpDown_DAC_VoltCtrl_B.Maximum = new decimal(new int[] {
2318
             4,
2318
             4,
@@ -2328,12 +2328,12 @@
2328
             // 
2328
             // 
2329
             // numericUpDown_DAC_VoltCtrl_C
2329
             // numericUpDown_DAC_VoltCtrl_C
2330
             // 
2330
             // 
2331
-            this.numericUpDown_DAC_VoltCtrl_C.DecimalPlaces = 1;
2331
+            this.numericUpDown_DAC_VoltCtrl_C.DecimalPlaces = 2;
2332
             this.numericUpDown_DAC_VoltCtrl_C.Increment = new decimal(new int[] {
2332
             this.numericUpDown_DAC_VoltCtrl_C.Increment = new decimal(new int[] {
2333
             1,
2333
             1,
2334
             0,
2334
             0,
2335
             0,
2335
             0,
2336
-            65536});
2336
+            131072});
2337
             this.numericUpDown_DAC_VoltCtrl_C.Location = new System.Drawing.Point(589, 55);
2337
             this.numericUpDown_DAC_VoltCtrl_C.Location = new System.Drawing.Point(589, 55);
2338
             this.numericUpDown_DAC_VoltCtrl_C.Maximum = new decimal(new int[] {
2338
             this.numericUpDown_DAC_VoltCtrl_C.Maximum = new decimal(new int[] {
2339
             4,
2339
             4,

+ 19 - 16
Basic_Terminal/Wnd/Main_Form.cs

@@ -336,64 +336,67 @@ namespace RF_TRIO_PLL_ZIG
336
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] << 8;
336
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] << 8;
337
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L]) / 10);
337
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L]) / 10);
338
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_UL, temp_val.ToString());
338
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_UL, temp_val.ToString());
339
-
339
+                    /***********************DAC A Sector**********************************/
340
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_H] << 8;
340
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_H] << 8;
341
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_L]) );
341
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_L]) );
342
                     ret = (temp_val & 0x0FFF) * 4;
342
                     ret = (temp_val & 0x0FFF) * 4;
343
                     ret = ret / 4095;
343
                     ret = ret / 4095;
344
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
344
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
345
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_A, ret.ToString());
345
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_A, ret.ToString());
346
-
346
+                    /***********************DAC B Sector**********************************/
347
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_H] << 8;
347
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_H] << 8;
348
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_L]) );
348
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_L]) );
349
                     ret = (temp_val & 0x0FFF) * 4;
349
                     ret = (temp_val & 0x0FFF) * 4;
350
                     ret = ret / 4095;
350
                     ret = ret / 4095;
351
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
351
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
352
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_B, ret.ToString());
352
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_B, ret.ToString());
353
-
353
+                    /***********************DAC C Sector**********************************/
354
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_H] << 8;
354
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_H] << 8;
355
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_L]) );
355
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_L]) );
356
                     ret = (temp_val & 0x0FFF) * 4;
356
                     ret = (temp_val & 0x0FFF) * 4;
357
                     ret = ret / 4095;
357
                     ret = ret / 4095;
358
-                    ret = Math.Round(Convert.ToDouble(ret ), 1);
358
+                    ret = Math.Round(Convert.ToDouble(ret ), 2);
359
 
359
 
360
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_C, ret.ToString());
360
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_C, ret.ToString());
361
-
361
+                    /***********************DAC D Sector**********************************/
362
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_H] << 8;
362
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_H] << 8;
363
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_L]) );
363
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_L]) );
364
                     ret = (temp_val & 0x0FFF) * 4;
364
                     ret = (temp_val & 0x0FFF) * 4;
365
                     ret = ret / 4095;
365
                     ret = ret / 4095;
366
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
366
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
367
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_D, ret.ToString());
367
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_D, ret.ToString());
368
-
368
+                    /***********************DAC E Sector**********************************/
369
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_H] << 8;
369
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_H] << 8;
370
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_L]) );
370
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_L]) );
371
                     ret = (temp_val & 0x0FFF) * 4;
371
                     ret = (temp_val & 0x0FFF) * 4;
372
                     ret = ret / 4095;
372
                     ret = ret / 4095;
373
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
373
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
374
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_E, ret.ToString());
374
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_E, ret.ToString());
375
-
375
+                    /***********************DAC F Sector**********************************/
376
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_H] << 8;
376
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_H] << 8;
377
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_L]) );
377
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_L]) );
378
                     ret = (temp_val & 0x0FFF) * 4;
378
                     ret = (temp_val & 0x0FFF) * 4;
379
                     ret = ret / 4095;
379
                     ret = ret / 4095;
380
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
380
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
381
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_F, ret.ToString());
381
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_F, ret.ToString());
382
-
382
+                    /***********************DAC G Sector**********************************/
383
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_H] << 8;
383
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_H] << 8;
384
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_L]) );
384
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_L]) );
385
                     ret = (temp_val & 0x0FFF) * 4;
385
                     ret = (temp_val & 0x0FFF) * 4;
386
                     ret = ret / 4095;
386
                     ret = ret / 4095;
387
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
387
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
388
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_G, ret.ToString());
388
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_G, ret.ToString());
389
-
389
+                    /***********************DAC H Sector**********************************/
390
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_H] << 8;
390
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_H] << 8;
391
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_L]) );
391
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_L]) );
392
                     ret = (temp_val & 0x0FFF) * 4;
392
                     ret = (temp_val & 0x0FFF) * 4;
393
                     ret = ret / 4095;
393
                     ret = ret / 4095;
394
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
394
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
395
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_H, ret.ToString());
395
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_H, ret.ToString());
396
 
396
 
397
+
398
+
399
+
397
                     PictureBox pic_on;
400
                     PictureBox pic_on;
398
                     PictureBox pic_off;
401
                     PictureBox pic_off;
399
                     pic_on = pictureBox_PATH_1_8G_DL_ON;
402
                     pic_on = pictureBox_PATH_1_8G_DL_ON;