更改了变量名称
This commit is contained in:
@@ -22,9 +22,9 @@ namespace CapMachine.Wpf.ProPars
|
||||
List<PlcParsDataQuick> ListPlcParsDataQuick = new List<PlcParsDataQuick>()
|
||||
{
|
||||
new PlcParsDataQuick(){ Name="速度",EnName="Speed",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=1,Unit="",ValueStartAddress=1006, },
|
||||
new PlcParsDataQuick(){ Name="COND1温度 ",EnName="Cond1Temp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="",ValueStartAddress=1014, },
|
||||
new PlcParsDataQuick(){ Name="COND2温度",EnName="Cond2Temp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1034, },
|
||||
new PlcParsDataQuick(){ Name="COND2压力",EnName="Cond2Press",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=100,Unit="" ,ValueStartAddress=1018, },
|
||||
new PlcParsDataQuick(){ Name="COND循环水温 ",EnName="Cond1Temp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="",ValueStartAddress=1014, },
|
||||
new PlcParsDataQuick(){ Name="H5吸气混合器温度",EnName="Cond2Temp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1034, },
|
||||
new PlcParsDataQuick(){ Name="吸气混合器出口温度",EnName="Cond2Press",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1018, },
|
||||
new PlcParsDataQuick(){ Name="EVAP出口温度",EnName="EVAPExpTemp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1036, },
|
||||
new PlcParsDataQuick(){ Name="排气压力",EnName="ExPress",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=100,Unit="" ,ValueStartAddress=1008, },
|
||||
|
||||
@@ -34,18 +34,20 @@ namespace CapMachine.Wpf.ProPars
|
||||
|
||||
new PlcParsDataQuick(){ Name="吸气温度",EnName="InhTemp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1012, },
|
||||
|
||||
new PlcParsDataQuick(){ Name="润滑油压力",EnName="LubePress",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=100,Unit="" ,ValueStartAddress=1016, },
|
||||
new PlcParsDataQuick(){ Name="SUBCOOL出口温度",EnName="LubePress",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1016, },
|
||||
|
||||
new PlcParsDataQuick(){ Name="LV电压",EnName="LVVol",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1024, },
|
||||
|
||||
new PlcParsDataQuick(){ Name="OCR",EnName="OCR",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1020, },
|
||||
|
||||
new PlcParsDataQuick(){ Name="OS1温度",EnName="OS1Temp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1030, },
|
||||
new PlcParsDataQuick(){ Name="OS2温度",EnName="OS2Temp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1032, },
|
||||
new PlcParsDataQuick(){ Name="H1出口温度",EnName="OS2Temp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1032, },
|
||||
|
||||
new PlcParsDataQuick(){ Name="PTC入口温度",EnName="PTCEntTemp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1054, },
|
||||
new PlcParsDataQuick(){ Name="PTC流量",EnName="PTCFlow",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1052, },
|
||||
new PlcParsDataQuick(){ Name="PTC功率",EnName="PTCPw",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=1,Unit="" ,ValueStartAddress=1050, },
|
||||
new PlcParsDataQuick(){ Name="PTC功率1",EnName="PTCPw1",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=1,Unit="" ,ValueStartAddress=1050, },
|
||||
new PlcParsDataQuick(){ Name="PTC功率2",EnName="PTCPw2",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=1,Unit="" ,ValueStartAddress=1056, },
|
||||
new PlcParsDataQuick(){ Name="干度",EnName="Dryness",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=1,Unit="" ,ValueStartAddress=1058, },
|
||||
|
||||
new PlcParsDataQuick(){ Name="压缩机环境湿度",EnName="EnvRH",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1028, },
|
||||
new PlcParsDataQuick(){ Name="压缩机环境温度",EnName="EnvTemp",Step=100,Steps=new List<PlcMeterStepCellQuick>(),Ratio=10,Unit="" ,ValueStartAddress=1026, },
|
||||
@@ -229,8 +231,11 @@ namespace CapMachine.Wpf.ProPars
|
||||
case "PTCFlow":
|
||||
item.Steps.Add(new PlcMeterStepCellQuick() { Step = CurStep, Value = proStep.PTCFlow, Address = GetAddress(item.ValueStartAddress, CurStep, item.Step) });
|
||||
break;
|
||||
case "PTCPw":
|
||||
item.Steps.Add(new PlcMeterStepCellQuick() { Step = CurStep, Value = proStep.PTCPw, Address = GetAddress(item.ValueStartAddress, CurStep, item.Step) });
|
||||
case "PTCPw1":
|
||||
item.Steps.Add(new PlcMeterStepCellQuick() { Step = CurStep, Value = proStep.PTCPw1, Address = GetAddress(item.ValueStartAddress, CurStep, item.Step) });
|
||||
break;
|
||||
case "PTCPw2":
|
||||
item.Steps.Add(new PlcMeterStepCellQuick() { Step = CurStep, Value = proStep.PTCPw2, Address = GetAddress(item.ValueStartAddress, CurStep, item.Step) });
|
||||
break;
|
||||
case "EnvRH":
|
||||
item.Steps.Add(new PlcMeterStepCellQuick() { Step = CurStep, Value = proStep.EnvRH, Address = GetAddress(item.ValueStartAddress, CurStep, item.Step) });
|
||||
@@ -458,90 +463,90 @@ namespace CapMachine.Wpf.ProPars
|
||||
return BlockDatas;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据名称获取Index信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetIndexByName(DataGridColumn dataGridColumn)
|
||||
{
|
||||
var headerText = (dataGridColumn.Header as TextBlock).Text;
|
||||
if (headerText.Contains("COND1温度 "))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (headerText.Contains("COND2温度"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (headerText.Contains("COND2压力"))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
else if (headerText.Contains("EVAP出口温度"))
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
else if (headerText.Contains("排气压力"))
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
else if (headerText.Contains("HV电压"))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
else if (headerText.Contains("吸气压力"))
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
else if (headerText.Contains("吸气温度"))
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
else if (headerText.Contains("润滑油压力"))
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
else if (headerText.Contains("LV电压"))
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
else if (headerText.Contains("OCR"))
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
else if (headerText.Contains("OS1温度"))
|
||||
{
|
||||
return 11;
|
||||
}
|
||||
else if (headerText.Contains("OS2温度"))
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
else if (headerText.Contains("PTC入口温度"))
|
||||
{
|
||||
return 13;
|
||||
}
|
||||
else if (headerText.Contains("PTC流量"))
|
||||
{
|
||||
return 14;
|
||||
}
|
||||
else if (headerText.Contains("PTC功率"))
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
else if (headerText.Contains("试验箱湿度"))
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
else if (headerText.Contains("试验箱温度"))
|
||||
{
|
||||
return 17;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
///// <summary>
|
||||
///// 根据名称获取Index信息
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public static int GetIndexByName(DataGridColumn dataGridColumn)
|
||||
//{
|
||||
// var headerText = (dataGridColumn.Header as TextBlock).Text;
|
||||
// if (headerText.Contains("COND1温度 "))
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
// else if (headerText.Contains("COND2温度"))
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
// else if (headerText.Contains("COND2压力"))
|
||||
// {
|
||||
// return 2;
|
||||
// }
|
||||
// else if (headerText.Contains("EVAP出口温度"))
|
||||
// {
|
||||
// return 3;
|
||||
// }
|
||||
// else if (headerText.Contains("排气压力"))
|
||||
// {
|
||||
// return 4;
|
||||
// }
|
||||
// else if (headerText.Contains("HV电压"))
|
||||
// {
|
||||
// return 5;
|
||||
// }
|
||||
// else if (headerText.Contains("吸气压力"))
|
||||
// {
|
||||
// return 6;
|
||||
// }
|
||||
// else if (headerText.Contains("吸气温度"))
|
||||
// {
|
||||
// return 7;
|
||||
// }
|
||||
// else if (headerText.Contains("润滑油压力"))
|
||||
// {
|
||||
// return 8;
|
||||
// }
|
||||
// else if (headerText.Contains("LV电压"))
|
||||
// {
|
||||
// return 9;
|
||||
// }
|
||||
// else if (headerText.Contains("OCR"))
|
||||
// {
|
||||
// return 10;
|
||||
// }
|
||||
// else if (headerText.Contains("OS1温度"))
|
||||
// {
|
||||
// return 11;
|
||||
// }
|
||||
// else if (headerText.Contains("OS2温度"))
|
||||
// {
|
||||
// return 12;
|
||||
// }
|
||||
// else if (headerText.Contains("PTC入口温度"))
|
||||
// {
|
||||
// return 13;
|
||||
// }
|
||||
// else if (headerText.Contains("PTC流量"))
|
||||
// {
|
||||
// return 14;
|
||||
// }
|
||||
// else if (headerText.Contains("PTC功率"))
|
||||
// {
|
||||
// return 15;
|
||||
// }
|
||||
// else if (headerText.Contains("试验箱湿度"))
|
||||
// {
|
||||
// return 16;
|
||||
// }
|
||||
// else if (headerText.Contains("试验箱温度"))
|
||||
// {
|
||||
// return 17;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
#region 获取数据
|
||||
|
||||
Reference in New Issue
Block a user