|
@@ -32,6 +32,13 @@ namespace Tps_LQ_Transmitter.models
|
|
|
return false;
|
|
|
}
|
|
|
*/
|
|
|
+ OpenExcel("测试过程值", out Spire.Xls.Workbook workbook, out Spire.Xls.Worksheet sheet);
|
|
|
+ if (sheet == null)
|
|
|
+ {
|
|
|
+ ShowMessage(MsgType.Error, "找不到"+ tps.TestProject + "模板.xlsx");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
ConfigParameter PowerPara = new ConfigParameter();
|
|
|
PowerPara.IntervalTime = parameters.Parameters.GetParameter<int>("相对时间");//min
|
|
|
PowerPara.TestTime = parameters.Parameters.GetParameter<int>("测试次数");//min
|
|
@@ -44,10 +51,17 @@ namespace Tps_LQ_Transmitter.models
|
|
|
{
|
|
|
currentTime1 = DateTime.Now;
|
|
|
TimesCounter.Restart();
|
|
|
- tps.SetTestTableCellValue(time, 3, true, currentTime1.Hour.ToString()+":"+ currentTime1.Minute.ToString());//测试时间
|
|
|
- tps.SetTestTableCellValue(time + PowerPara.TestTime, 3, true, currentTime1.Hour.ToString() + ":" + currentTime1.Minute.ToString());//测试时间
|
|
|
- MainTest(parameters,time);
|
|
|
|
|
|
+ //tps.SetTestTableCellValue(time, 3, true, currentTime1.Hour.ToString()+":"+ currentTime1.Minute.ToString());//测试时间
|
|
|
+ //tps.SetTestTableCellValue(time + PowerPara.TestTime, 3, true, currentTime1.Hour.ToString() + ":" + currentTime1.Minute.ToString());//测试时间
|
|
|
+ tps.TestTableAddCell("绝对时间","/", "/", currentTime1.Hour.ToString() + ":" + currentTime1.Minute.ToString(), "/");
|
|
|
+ WriteExcelData(sheet, 1 + time * 10, 1,"绝对时间", "/", "/", currentTime1.Hour.ToString() + ":" + currentTime1.Minute.ToString(), "/");
|
|
|
+
|
|
|
+ MainTest(parameters,time,workbook,sheet);
|
|
|
+ if (time == 3)
|
|
|
+ {
|
|
|
+ IntervalTime = IntervalTime * 2;
|
|
|
+ }
|
|
|
while (TimesCounter.Elapsed.TotalSeconds <= IntervalTime && time!= PowerPara.TestTime-1)
|
|
|
{
|
|
|
Thread.Sleep(100);
|
|
@@ -60,10 +74,11 @@ namespace Tps_LQ_Transmitter.models
|
|
|
TimesCounter.Stop();
|
|
|
time = time + 1;
|
|
|
}
|
|
|
-
|
|
|
+ SaveExcel(workbook);
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
- public bool MainTest(TestNode parameters,int time)
|
|
|
+ public bool MainTest(TestNode parameters,int time, Spire.Xls.Workbook workbook, Spire.Xls.Worksheet sheet)
|
|
|
{
|
|
|
|
|
|
Random random = new Random();
|
|
@@ -149,7 +164,7 @@ namespace Tps_LQ_Transmitter.models
|
|
|
}
|
|
|
int channel = 0;
|
|
|
int point = 0;
|
|
|
- bool Result;
|
|
|
+ string Result;
|
|
|
double CenterFreq;
|
|
|
double[] PowerDelt = new double[PowerPara.FrequencyNumber];
|
|
|
Data.Power = new double[PowerPara.FrequencyNumber];
|
|
@@ -188,6 +203,7 @@ namespace Tps_LQ_Transmitter.models
|
|
|
#region 电压、电流测试
|
|
|
//Data.VoltVal[point] = DC.Query("读取电压");
|
|
|
//Data.CurrentVal[point] = DC.Query("读取电流");
|
|
|
+ VoltDataPrint.Test_name = "通道" + (channel+1).ToString() + "-" + "电压测试-" + CenterFreq.ToString() + "MHz";
|
|
|
VoltDataPrint.Lower = PowerPara.VoltLower;
|
|
|
VoltDataPrint.Upper = PowerPara.VoltUpper;
|
|
|
//VoltDataPrint.TestVal = double.Parse(Data.VoltVal[point]);
|
|
@@ -195,6 +211,7 @@ namespace Tps_LQ_Transmitter.models
|
|
|
Judge(VoltDataPrint.Lower, VoltDataPrint.Upper, VoltDataPrint.TestVal, out Result);
|
|
|
VoltDataPrint.Result = Result;
|
|
|
|
|
|
+ CurrentDataPrint.Test_name = "通道" + (channel + 1).ToString() + "-" + "电流测试-" + CenterFreq.ToString() + "MHz";
|
|
|
CurrentDataPrint.Lower = PowerPara.CurrentLower;
|
|
|
CurrentDataPrint.Upper = PowerPara.CurrentUpper;
|
|
|
//CurrentDataPrint.TestVal = double.Parse(Data.CurrentVal[point]);
|
|
@@ -210,14 +227,17 @@ namespace Tps_LQ_Transmitter.models
|
|
|
// PsaPeakValue_Tracedata(SA, out y_value, out x_value, true);
|
|
|
// Data.Power[point] = y_value + PowerPara.OutLoss;//功率
|
|
|
Data.Power[point] = random.Next(3000, 4000) / 100.0;//随机数
|
|
|
-
|
|
|
+
|
|
|
+ PowerPrint.Test_name = "通道" + (channel + 1).ToString() + "-" + "功率测试(W)-" + CenterFreq.ToString() + "MHz";
|
|
|
+ PowerPrint.Lower = PowerPara.PowerLower;
|
|
|
+ PowerPrint.Upper = PowerPara.PowerUpper;
|
|
|
PowerPrint.TestVal = Math.Round(Math.Pow(10, (Data.Power[point] / 10)) / 1000, 2);//功率W
|
|
|
- Judge(PowerPara.PowerLower, PowerPara.PowerUpper, PowerPrint.TestVal, out Result);
|
|
|
+ Judge(PowerPrint.Lower, PowerPrint.Upper, PowerPrint.TestVal, out Result);
|
|
|
PowerPrint.Result = Result;
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+ FreqPrint.Test_name = "通道" + (channel + 1).ToString() + "-" + "频率测试(MHz)-" + CenterFreq.ToString() + "MHz";
|
|
|
FreqPrint.Lower = 0 - ((PowerPara.FreqAccuracyUpper * CenterFreq) + CenterFreq);
|
|
|
FreqPrint.Upper = (PowerPara.FreqAccuracyUpper * CenterFreq) + CenterFreq;
|
|
|
// FreqPrint.TestVal = Math.Round(x_value / 1000000, 3);//实测频率
|
|
@@ -246,42 +266,58 @@ namespace Tps_LQ_Transmitter.models
|
|
|
Data.MaxFreqOffset[point] = CfigModuParas.GetFreqOffsetParameter(RelativeVal);//最大频偏kHz
|
|
|
Data.DBMaxFreqOffset[point] = PowerDelt[point].ToString();//最大频偏dB
|
|
|
|
|
|
-
|
|
|
+
|
|
|
//ModulationIndexPrint.TestVal = double.Parse(Data.ModulationIndex[point]);
|
|
|
//Judge (PowerPara.ModulationIndexLower, PowerPara.ModulationIndexUpper, ModulationIndexPrint.TestVal, out Result);
|
|
|
//ModulationIndexPrint.Result = Result;
|
|
|
|
|
|
-
|
|
|
+ MaxFreqOffsetPrint.Test_name = "通道" + (channel + 1).ToString() + "-" + "调制频偏(KHz)-" + CenterFreq.ToString() + "MHz";
|
|
|
+ DBMaxFreqOffsetPrint.Test_name = "通道" + (channel + 1).ToString() + "-" + "调制频偏(dB)-" + CenterFreq.ToString() + "MHz";
|
|
|
+ MaxFreqOffsetPrint.Lower = PowerPara.MaxFreqOffsetLower;
|
|
|
+ MaxFreqOffsetPrint.Upper = PowerPara.MaxFreqOffsetUpper;
|
|
|
MaxFreqOffsetPrint.TestVal = double.Parse(Data.MaxFreqOffset[point]);
|
|
|
DBMaxFreqOffsetPrint.TestVal = double.Parse(Data.DBMaxFreqOffset[point]);
|
|
|
|
|
|
- Judge(PowerPara.MaxFreqOffsetLower, PowerPara.MaxFreqOffsetUpper, MaxFreqOffsetPrint.TestVal, out Result);
|
|
|
+ Judge(MaxFreqOffsetPrint.Lower, MaxFreqOffsetPrint.Upper, MaxFreqOffsetPrint.TestVal, out Result);
|
|
|
MaxFreqOffsetPrint.Result = Result;
|
|
|
DBMaxFreqOffsetPrint.Result = Result;
|
|
|
-
|
|
|
+ tps.TestTableAddCell(VoltDataPrint.Test_name, VoltDataPrint.Lower.ToString(), VoltDataPrint.Upper.ToString(), VoltDataPrint.TestVal.ToString(), VoltDataPrint.Result);
|
|
|
+ tps.TestTableAddCell(CurrentDataPrint.Test_name, CurrentDataPrint.Lower.ToString(), CurrentDataPrint.Upper.ToString(), CurrentDataPrint.TestVal.ToString(), CurrentDataPrint.Result);
|
|
|
+ tps.TestTableAddCell(FreqPrint.Test_name, FreqPrint.Lower.ToString(), FreqPrint.Upper.ToString(), FreqPrint.TestVal.ToString(), FreqPrint.Result);
|
|
|
+ tps.TestTableAddCell(DBMaxFreqOffsetPrint.Test_name, DBMaxFreqOffsetPrint.Lower.ToString(), DBMaxFreqOffsetPrint.Upper.ToString(), DBMaxFreqOffsetPrint.TestVal.ToString(), DBMaxFreqOffsetPrint.Result);
|
|
|
+ tps.TestTableAddCell(MaxFreqOffsetPrint.Test_name, MaxFreqOffsetPrint.Lower.ToString(), MaxFreqOffsetPrint.Upper.ToString(), MaxFreqOffsetPrint.TestVal.ToString(), MaxFreqOffsetPrint.Result);
|
|
|
+ tps.TestTableAddCell(PowerPrint.Test_name, PowerPrint.Lower.ToString(), PowerPrint.Upper.ToString(), PowerPrint.TestVal.ToString(), PowerPrint.Result);
|
|
|
#endregion
|
|
|
if (channel == 0)
|
|
|
{
|
|
|
- // tps.SetTestTableCellValue(point, 2, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//相对时间(min)
|
|
|
- // tps.SetTestTableCellValue(point, 3, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//绝对时间
|
|
|
- tps.SetTestTableCellValue(point + time, 4, VoltDataPrint.Result, VoltDataPrint.TestVal);//供电电压(V)
|
|
|
- tps.SetTestTableCellValue(point + time, 5, CurrentDataPrint.Result, CurrentDataPrint.TestVal);//消耗电流(A)
|
|
|
- tps.SetTestTableCellValue(point + time, 6, FreqPrint.Result, FreqPrint.TestVal);//输出频率(kHz)
|
|
|
- tps.SetTestTableCellValue(point + time, 7, DBMaxFreqOffsetPrint.Result, DBMaxFreqOffsetPrint.TestVal);//调制频偏(dB)
|
|
|
- tps.SetTestTableCellValue(point + time, 8, MaxFreqOffsetPrint.Result, MaxFreqOffsetPrint.TestVal);//调制频偏(kHz)
|
|
|
- tps.SetTestTableCellValue(point + time, 9, PowerPrint.Result, PowerPrint.TestVal);//输出功率(W)
|
|
|
+ WriteExcelData(sheet, point + 2 + time * 10, 1, VoltDataPrint.Test_name, VoltDataPrint.Lower.ToString(), VoltDataPrint.Upper.ToString(), VoltDataPrint.TestVal.ToString(), VoltDataPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 3 + time * 10, 1, CurrentDataPrint.Test_name, CurrentDataPrint.Lower.ToString(), CurrentDataPrint.Upper.ToString(), CurrentDataPrint.TestVal.ToString(), CurrentDataPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 4 + time * 10, 1, FreqPrint.Test_name, FreqPrint.Lower.ToString(), FreqPrint.Upper.ToString(), FreqPrint.TestVal.ToString(), FreqPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 5 + time * 10, 1, DBMaxFreqOffsetPrint.Test_name, DBMaxFreqOffsetPrint.Lower.ToString(), DBMaxFreqOffsetPrint.Upper.ToString(), DBMaxFreqOffsetPrint.TestVal.ToString(), DBMaxFreqOffsetPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 6 + time * 10, 1, MaxFreqOffsetPrint.Test_name, MaxFreqOffsetPrint.Lower.ToString(), MaxFreqOffsetPrint.Upper.ToString(), MaxFreqOffsetPrint.TestVal.ToString(), MaxFreqOffsetPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 7 + time * 10, 1, PowerPrint.Test_name, PowerPrint.Lower.ToString(), PowerPrint.Upper.ToString(), PowerPrint.TestVal.ToString(), PowerPrint.Result);
|
|
|
+ //tps.SetTestTableCellValue(point + time, 4, VoltDataPrint.Result, VoltDataPrint.TestVal);//供电电压(V)
|
|
|
+ //tps.SetTestTableCellValue(point + time, 5, CurrentDataPrint.Result, CurrentDataPrint.TestVal);//消耗电流(A)
|
|
|
+ //tps.SetTestTableCellValue(point + time, 6, FreqPrint.Result, FreqPrint.TestVal);//输出频率(kHz)
|
|
|
+ //tps.SetTestTableCellValue(point + time, 7, DBMaxFreqOffsetPrint.Result, DBMaxFreqOffsetPrint.TestVal);//调制频偏(dB)
|
|
|
+ //tps.SetTestTableCellValue(point + time, 8, MaxFreqOffsetPrint.Result, MaxFreqOffsetPrint.TestVal);//调制频偏(kHz)
|
|
|
+ //tps.SetTestTableCellValue(point + time, 9, PowerPrint.Result, PowerPrint.TestVal);//输出功率(W)
|
|
|
|
|
|
}
|
|
|
else if (channel == 1)
|
|
|
{
|
|
|
- // tps.SetTestTableCellValue(point + 5, 2, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//相对时间(min)
|
|
|
- // tps.SetTestTableCellValue(point + 5, 3, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//绝对时间
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 4, VoltDataPrint.Result, VoltDataPrint.TestVal);//供电电压(V)
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 5, CurrentDataPrint.Result, CurrentDataPrint.TestVal);//消耗电流(A)
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 6, FreqPrint.Result, FreqPrint.TestVal);//输出频率(kHz)
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 7, DBMaxFreqOffsetPrint.Result, DBMaxFreqOffsetPrint.TestVal);//调制频偏(dB)
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 8, MaxFreqOffsetPrint.Result, MaxFreqOffsetPrint.TestVal);//调制频偏(kHz)
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 9, PowerPrint.Result, PowerPrint.TestVal);//输出功率(W)
|
|
|
+ WriteExcelData(sheet, point + 2 + time * 10, 2, VoltDataPrint.Test_name, VoltDataPrint.Lower.ToString(), VoltDataPrint.Upper.ToString(), VoltDataPrint.TestVal.ToString(), VoltDataPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 3 + time * 10, 2, CurrentDataPrint.Test_name, CurrentDataPrint.Lower.ToString(), CurrentDataPrint.Upper.ToString(), CurrentDataPrint.TestVal.ToString(), CurrentDataPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 4 + time * 10, 2, FreqPrint.Test_name, FreqPrint.Lower.ToString(), FreqPrint.Upper.ToString(), FreqPrint.TestVal.ToString(), FreqPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 5 + time * 10, 2, DBMaxFreqOffsetPrint.Test_name, DBMaxFreqOffsetPrint.Lower.ToString(), DBMaxFreqOffsetPrint.Upper.ToString(), DBMaxFreqOffsetPrint.TestVal.ToString(), DBMaxFreqOffsetPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 6 + time * 10, 2, MaxFreqOffsetPrint.Test_name, MaxFreqOffsetPrint.Lower.ToString(), MaxFreqOffsetPrint.Upper.ToString(), MaxFreqOffsetPrint.TestVal.ToString(), MaxFreqOffsetPrint.Result);
|
|
|
+ WriteExcelData(sheet, point + 7 + time * 10, 2, PowerPrint.Test_name, PowerPrint.Lower.ToString(), PowerPrint.Upper.ToString(), PowerPrint.TestVal.ToString(), PowerPrint.Result);
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 4, VoltDataPrint.Result, VoltDataPrint.TestVal);//供电电压(V)
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 5, CurrentDataPrint.Result, CurrentDataPrint.TestVal);//消耗电流(A)
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 6, FreqPrint.Result, FreqPrint.TestVal);//输出频率(kHz)
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 7, DBMaxFreqOffsetPrint.Result, DBMaxFreqOffsetPrint.TestVal);//调制频偏(dB)
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 8, MaxFreqOffsetPrint.Result, MaxFreqOffsetPrint.TestVal);//调制频偏(kHz)
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 9, PowerPrint.Result, PowerPrint.TestVal);//输出功率(W)
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -318,20 +354,24 @@ namespace Tps_LQ_Transmitter.models
|
|
|
//SA.Write("STOP", PowerPara.RightStop.ToString()); SA.Query("OPC");
|
|
|
//PsaPeakValue_Tracedata(SA, out y_value, out x_value, false);
|
|
|
//PowerRigth = Power - y_value;
|
|
|
+ SpuriousSuppressionPrint.Test_name = "通道" + (channel + 1).ToString() + "-" + "杂波抑制测试(KHz)-" + CenterFreq.ToString() + "MHz";
|
|
|
SpuriousSuppressionPrint.Lower = PowerPara.SpuriousSuppressionLower;
|
|
|
//SpuriousSuppressionPrint.TestVal = Math.Round(Math.Min(PowerLeft, PowerRigth), 2);
|
|
|
SpuriousSuppressionPrint.TestVal = random.Next(4000, 12000) / 100.0;//随机数
|
|
|
Judge(SpuriousSuppressionPrint.Lower, 201, SpuriousSuppressionPrint.TestVal, out Result);
|
|
|
SpuriousSuppressionPrint.Result = Result;
|
|
|
+ tps.TestTableAddCell(SpuriousSuppressionPrint.Test_name, SpuriousSuppressionPrint.Lower.ToString(), SpuriousSuppressionPrint.Upper.ToString(), SpuriousSuppressionPrint.TestVal.ToString(), SpuriousSuppressionPrint.Result);
|
|
|
if (channel == 0)
|
|
|
{
|
|
|
- tps.SetTestTableCellValue(point + time, 10, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//杂波抑制(dBc)
|
|
|
-
|
|
|
+ WriteExcelData(sheet, point + 8 + time * 10, 1, SpuriousSuppressionPrint.Test_name, SpuriousSuppressionPrint.Lower.ToString(), SpuriousSuppressionPrint.Upper.ToString(), SpuriousSuppressionPrint.TestVal.ToString(), SpuriousSuppressionPrint.Result);
|
|
|
+ //tps.SetTestTableCellValue(point + time, 10, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//杂波抑制(dBc)
|
|
|
+
|
|
|
}
|
|
|
else if (channel == 1)
|
|
|
{
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 10, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//杂波抑制(dBc)
|
|
|
-
|
|
|
+ WriteExcelData(sheet, point + 8 + time * 10, 2, SpuriousSuppressionPrint.Test_name, SpuriousSuppressionPrint.Lower.ToString(), SpuriousSuppressionPrint.Upper.ToString(), SpuriousSuppressionPrint.TestVal.ToString(), SpuriousSuppressionPrint.Result);
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 10, SpuriousSuppressionPrint.Result, SpuriousSuppressionPrint.TestVal);//杂波抑制(dBc)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -378,25 +418,28 @@ namespace Tps_LQ_Transmitter.models
|
|
|
//{
|
|
|
// HarmonicMinTimeVal = HarmonicTimeVal[0];
|
|
|
//}
|
|
|
+ HarmonicSuppressionPrint.Test_name = "通道" + (channel + 1).ToString() + "-" + "谐波抑制测试(KHz)-" + CenterFreq.ToString() + "MHz";
|
|
|
HarmonicSuppressionPrint.Lower = PowerPara.HarmonicSuppressionLower;
|
|
|
HarmonicSuppressionPrint.TestVal = HarmonicMinTimeVal;
|
|
|
HarmonicSuppressionPrint.TestVal = random.Next(4000, 12000) / 100.0;//随机数
|
|
|
Judge(HarmonicSuppressionPrint.Lower, 201, HarmonicSuppressionPrint.TestVal, out Result);
|
|
|
HarmonicSuppressionPrint.Result = Result;
|
|
|
+ tps.TestTableAddCell(HarmonicSuppressionPrint.Test_name, HarmonicSuppressionPrint.Lower.ToString(), HarmonicSuppressionPrint.Upper.ToString(), HarmonicSuppressionPrint.TestVal.ToString(), HarmonicSuppressionPrint.Result);
|
|
|
if (channel == 0)
|
|
|
{
|
|
|
-
|
|
|
- tps.SetTestTableCellValue(point + time, 11, HarmonicSuppressionPrint.Result, HarmonicSuppressionPrint.TestVal);//谐波抑制(dBc)
|
|
|
+ WriteExcelData(sheet, point + 9 + time * 10, 1, HarmonicSuppressionPrint.Test_name, HarmonicSuppressionPrint.Lower.ToString(), HarmonicSuppressionPrint.Upper.ToString(), HarmonicSuppressionPrint.TestVal.ToString(), HarmonicSuppressionPrint.Result);
|
|
|
+ //tps.SetTestTableCellValue(point + time, 11, HarmonicSuppressionPrint.Result, HarmonicSuppressionPrint.TestVal);//谐波抑制(dBc)
|
|
|
}
|
|
|
else if (channel == 1)
|
|
|
{
|
|
|
-
|
|
|
- tps.SetTestTableCellValue(point + time + 5, 11, HarmonicSuppressionPrint.Result, HarmonicSuppressionPrint.TestVal);//谐波抑制(dBc)
|
|
|
+ WriteExcelData(sheet, point + 9 + time * 10, 2, HarmonicSuppressionPrint.Test_name, HarmonicSuppressionPrint.Lower.ToString(), HarmonicSuppressionPrint.Upper.ToString(), HarmonicSuppressionPrint.TestVal.ToString(), HarmonicSuppressionPrint.Result);
|
|
|
+ //tps.SetTestTableCellValue(point + time + 5, 11, HarmonicSuppressionPrint.Result, HarmonicSuppressionPrint.TestVal);//谐波抑制(dBc)
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
+
|
|
|
return true;
|
|
|
|
|
|
}
|
|
@@ -404,39 +447,39 @@ namespace Tps_LQ_Transmitter.models
|
|
|
/// 判断上下限
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public void Judge(double Lower,double Upper,double TestValue,out bool JudgeResult)
|
|
|
+ public void Judge(double Lower,double Upper,double TestValue,out string JudgeResult)
|
|
|
{
|
|
|
if (Upper >= 200)
|
|
|
{
|
|
|
if (TestValue >= Lower)
|
|
|
{
|
|
|
- JudgeResult = true;
|
|
|
+ JudgeResult = "是";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- JudgeResult = false;
|
|
|
+ JudgeResult = "否";
|
|
|
}
|
|
|
}
|
|
|
else if (Lower <= -200)
|
|
|
{
|
|
|
if (TestValue <= Upper)
|
|
|
{
|
|
|
- JudgeResult = true;
|
|
|
+ JudgeResult = "是";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- JudgeResult = false;
|
|
|
+ JudgeResult = "否";
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
if (TestValue >= Lower && TestValue <= Upper)
|
|
|
{
|
|
|
- JudgeResult = true;
|
|
|
+ JudgeResult = "是";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- JudgeResult = false;
|
|
|
+ JudgeResult = "否";
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -767,32 +810,7 @@ namespace Tps_LQ_Transmitter.models
|
|
|
|
|
|
|
|
|
}
|
|
|
- public class DataType
|
|
|
- {
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 测试名称
|
|
|
- /// </summary>
|
|
|
- public string Test_name { set; get; }
|
|
|
- /// <summary>
|
|
|
- /// 指标下限
|
|
|
- /// </summary>
|
|
|
- public double Lower { set; get; }
|
|
|
- /// <summary>
|
|
|
- /// 指标上限
|
|
|
- /// </summary>
|
|
|
- public double Upper { set; get; }
|
|
|
- /// <summary>
|
|
|
- /// 测试值
|
|
|
- /// </summary>
|
|
|
- public double TestVal { set; get; }
|
|
|
- /// <summary>
|
|
|
- /// 判断结果
|
|
|
- /// </summary>
|
|
|
- public bool Result { set; get; }
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|