更改了变量名称

This commit is contained in:
2025-07-08 15:33:05 +08:00
parent 4e215eec8f
commit 7a365534a5
11 changed files with 236 additions and 230 deletions

View File

@@ -116,7 +116,7 @@ namespace CapMachine.Wpf.CanDrive
/// <summary>
/// Read CAN Index
/// </summary>
public Byte ReadCANIndex { get; set; } = 1;
public Byte ReadCANIndex { get; set; } = 0;
private bool _OpenState;
@@ -550,22 +550,14 @@ namespace CapMachine.Wpf.CanDrive
//释放申请的临时缓冲区
Marshal.FreeHGlobal(msgPtSend);
//CanMsg[0].Flags = 5;
//var CanMsg1 = GetCanMsg(CanMsg,0);
//var CanMsg2 = GetCanMsg(CanMsg,1);
CanMsg[0].Flags = 5;
//CanMsg1[0].Flags = 5;
//CanMsg2[0].Flags = 5;
//发送CAN数据
int SendedNum = USB2CANFD.CANFD_SendMsg(DevHandle, WriteCANIndex, CanMsg, (Int32)CanMsg.Length);
//Thread.Sleep(20);
//int SendedNum2 = USB2CANFD.CANFD_SendMsg(DevHandle, WriteCANIndex, CanMsg2, (Int32)CanMsg2.Length);
if (SendedNum >= 0)
{
//Console.WriteLine("Success send frames:{0}", SendedNum);
IsSendOk = true;
}
else
@@ -573,7 +565,6 @@ namespace CapMachine.Wpf.CanDrive
//Console.WriteLine("Send CAN data failed! {0}", SendedNum);
IsSendOk = false;
}
}
}

View File

@@ -101,9 +101,9 @@ namespace CapMachine.Wpf.Dtos
private double _Cond1Temp;
/// <summary>
/// COND1温度 信息
/// COND1温度 信息 COND循环水温
/// </summary>
[Column("COND1温度(℃)")]
[Column("COND循环水温(℃)")]
public double Cond1Temp
{
get { return _Cond1Temp; }
@@ -112,9 +112,9 @@ namespace CapMachine.Wpf.Dtos
private double _Cond2Temp;
/// <summary>
/// COND2温度 信息
/// COND2温度 信息 H5吸气混合器温度
/// </summary>
[Column("COND2温度(℃)")]
[Column("H5吸气混合器温度(℃)")]
public double Cond2Temp
{
get { return _Cond2Temp; }
@@ -123,9 +123,9 @@ namespace CapMachine.Wpf.Dtos
private double _Cond2Press;
/// <summary>
/// COND2压力 信息
/// COND2压力 信息 吸气混合器出口温度
/// </summary>
[Column("COND2压力(BarA)")]
[Column("吸气混合器出口温度(℃)")]
public double Cond2Press
{
get { return _Cond2Press; }
@@ -156,9 +156,9 @@ namespace CapMachine.Wpf.Dtos
private double _LubePress;
/// <summary>
/// 润滑油压力 信息
/// 润滑油压力 信息 SUBCOOL出口温度
/// </summary>
[Column("润滑油压力(BarA)")]
[Column("SUBCOOL出口温度(℃)")]
public double LubePress
{
get { return _LubePress; }
@@ -200,9 +200,9 @@ namespace CapMachine.Wpf.Dtos
private double _OS2Temp;
/// <summary>
/// OS2温度 信息
/// OS2温度 信息 H1出口温度
/// </summary>
[Column("OS2温度(℃)")]
[Column("H1出口温度(℃)")]
public double OS2Temp
{
get { return _OS2Temp; }
@@ -231,15 +231,26 @@ namespace CapMachine.Wpf.Dtos
set { _PTCFlow = value; RaisePropertyChanged(); }
}
private double _PTCPw;
private double _PTCPw1;
/// <summary>
/// PTC功率 信息
/// PTC功率 信息 PTC功率1
/// </summary>
[Column("PTC功率(W)")]
public double PTCPw
[Column("PTC功率1(W)")]
public double PTCPw1
{
get { return _PTCPw; }
set { _PTCPw = value; RaisePropertyChanged(); }
get { return _PTCPw1; }
set { _PTCPw1 = value; RaisePropertyChanged(); }
}
private double _PTCPw2;
/// <summary>
/// PTC功率 信息 PTC功率2
/// </summary>
[Column("PTC功率2(W)")]
public double PTCPw2
{
get { return _PTCPw2; }
set { _PTCPw2 = value; RaisePropertyChanged(); }
}
private double _EnvRH;
@@ -265,6 +276,16 @@ namespace CapMachine.Wpf.Dtos
}
private double _Dryness;
/// <summary>
/// 干度 信息
/// </summary>
[Column("干度")]
public double Dryness
{
get { return _Dryness; }
set { _Dryness = value; RaisePropertyChanged(); }
}

View File

@@ -56,21 +56,21 @@ namespace CapMachine.Wpf.Models
public double InhTemp { get; set; }
/// <summary>
/// COND1温度[℃]
/// COND1温度[℃] COND循环水温
/// </summary>
[Name("COND1温度[℃]")]
[Name("COND循环水温[℃]")]
public double Cond1Temp { get; set; }
/// <summary>
/// 润滑油压力[BarA]
/// 润滑油压力[BarA] SUBCOOL出口温度
/// </summary>
[Name("润滑油压力[BarA]")]
[Name("SUBCOOL出口温度[℃]")]
public double LubePress { get; set; }
/// <summary>
/// COND2压力[BarA]
/// COND2压力[BarA] 吸气混合器出口温度
/// </summary>
[Name("COND2压力[BarA]")]
[Name("吸气混合器出口温度[℃]")]
public double Cond2Press { get; set; }
/// <summary>
@@ -128,15 +128,15 @@ namespace CapMachine.Wpf.Models
public double OS1Temp { get; set; }
/// <summary>
/// OS2温度[℃]
/// OS2温度[℃] H1出口温度
/// </summary>
[Name("OS2温度[℃]")]
[Name("H1出口温度[℃]")]
public double OS2Temp { get; set; }
/// <summary>
/// COND2温度[℃]
/// COND2温度[℃] H5吸气混合器温度
/// </summary>
[Name("COND2温度[℃]")]
[Name("H5吸气混合器温度[℃]")]
public double Cond2Temp { get; set; }
/// <summary>

View File

@@ -22,9 +22,9 @@ namespace CapMachine.Wpf.Models
Map(m => m.ExPress).Name("排气压力[BarA]");
Map(m => m.InhPress).Name("吸气压力[BarA]");
Map(m => m.InhTemp).Name("吸气温度[℃]");
Map(m => m.Cond1Temp).Name("COND1温度[℃]");
Map(m => m.LubePress).Name("润滑油压力[BarA]");
Map(m => m.Cond2Press).Name("COND2压力[BarA]");
Map(m => m.Cond1Temp).Name("COND循环水温[℃]");
Map(m => m.LubePress).Name("SUBCOOL出口温度[℃]");
Map(m => m.Cond2Press).Name("吸气混合器出口温度[℃]");
Map(m => m.OCR).Name("OCR[%]");
Map(m => m.HV).Name("HV[V]");
Map(m => m.HVCur).Name("HV[A]");
@@ -34,8 +34,8 @@ namespace CapMachine.Wpf.Models
Map(m => m.EnvTemp).Name("环境温度[℃]");
Map(m => m.EnvRH).Name("环境湿度[%]");
Map(m => m.OS1Temp).Name("OS1温度[℃]");
Map(m => m.OS2Temp).Name("OS2温度[℃]");
Map(m => m.Cond2Temp).Name("COND2温度[℃]");
Map(m => m.OS2Temp).Name("H1出口温度[℃]");
Map(m => m.Cond2Temp).Name("H5吸气混合器温度[℃]");
Map(m => m.EVAPExpTemp).Name("EVAP出口温度[℃]");
Map(m => m.VRV).Name("冷媒流量[L/min]");
Map(m => m.LubeFlow).Name("润滑油流量[L/min]");

View File

@@ -209,11 +209,11 @@ namespace CapMachine.Wpf.Models.LightChart
return CurHistoryData.Select(a => new ChartPoint() { Value = a.InhPress, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "吸气温度[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.InhTemp, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "COND1温度[℃]":
case "COND循环水温[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.Cond1Temp, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "润滑油压力[BarA]":
case "SUBCOOL出口温度[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.LubePress, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "COND2压力[BarA]":
case "吸气混合器出口温度[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.Cond2Press, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "OCR[%]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.OCR, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
@@ -233,9 +233,9 @@ namespace CapMachine.Wpf.Models.LightChart
return CurHistoryData.Select(a => new ChartPoint() { Value = a.EnvRH, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "OS1温度[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.OS1Temp, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "OS2温度[℃]":
case "H1出口温度[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.OS2Temp, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "COND2温度[℃]":
case "H5吸气混合器温度[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.Cond2Temp, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
case "EVAP出口温度[℃]":
return CurHistoryData.Select(a => new ChartPoint() { Value = a.EVAPExpTemp, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();

View File

@@ -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

View File

@@ -108,9 +108,9 @@ namespace CapMachine.Wpf.Services
new Columns(){ Name="排气压力[BarA]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="吸气压力[BarA]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="吸气温度[℃]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="COND1温度[℃]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="润滑油压力[BarA]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="COND2压力[BarA]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="COND循环水温[℃]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="SUBCOOL出口温度[℃]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="吸气混合器出口温度[℃]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="OCR[%]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="HV[V]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
new Columns(){ Name="HV[A]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},

View File

@@ -38,6 +38,7 @@ namespace CapMachine.Wpf.Services
public AlarmService AlarmService { get; }
public ConfigService ConfigService { get; }
public CanDriveService CanDriveService { get; }
public CanFdDriveService CanFdDriveService { get; }
public LinDriveService LinDriveService { get; }
public SysRunService SysRunService { get; }
@@ -121,7 +122,7 @@ namespace CapMachine.Wpf.Services
/// </summary>
/// <param name="eventAggregator"></param>
public MachineRtDataService(IEventAggregator eventAggregator, AlarmService alarmService, ConfigService configService,
CanDriveService canDriveService, LinDriveService linDriveService, SysRunService sysRunService)//, AlarmService alarmService
CanDriveService canDriveService, CanFdDriveService canFdDriveService, LinDriveService linDriveService, SysRunService sysRunService)//, AlarmService alarmService
{
//ConcurrentDictionary<DateTime, RecordInfo> keyValuePairs = new ConcurrentDictionary<DateTime, RecordInfo>();
@@ -139,6 +140,7 @@ namespace CapMachine.Wpf.Services
AlarmService = alarmService;
ConfigService = configService;
CanDriveService = canDriveService;
CanFdDriveService = canFdDriveService;
LinDriveService = linDriveService;
SysRunService = sysRunService;
@@ -150,69 +152,6 @@ namespace CapMachine.Wpf.Services
#region
//////三电 Sample
//TagManger.AddTag(new Tag<short>("转速", "转速[rpm]", "Speed", "程序", "VW15000", 100, 0, 1, "rpm", new ShortTagValue(), true) { DecimalPoint = 0, SVAddress = "VW14002" });
//TagManger.AddTag(new Tag<short>("排气压力", "排气压力[BarA]", "ExPress", "程序", "VW15002", 100, 0, 100, "BarA", new ShortTagValue(), true) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("吸气压力", "吸气压力[BarA]", "InhPress", "程序", "VW15004", 100, 0, 100, "BarA", new ShortTagValue(), true) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("吸气温度", "吸气温度[℃]", "InhTemp", "程序", "VW15006", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("COND1温度", "COND1温度[℃]", "Cond1Temp", "程序", "VW15008", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("润滑油压力", "润滑油压力[BarA]", "LubePress", "程序", "VW15010", 100, 0, 100, "BarA", new ShortTagValue(), true) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("COND2压力", "COND2压力[BarA]", "Cond2Press", "程序", "VW15012", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("OCR", "OCR[%]", "OCR", "程序", "VW15014", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("HV[V]", "HV[V]", "HV", "程序", "VW15016", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("HV[A]", "HV[A]", "HVCur", "程序", "VW15018", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("HV[W]", "HV[W]", "HVPw", "程序", "VW15020", 100, 0, 1, "W", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("LV[V]", "LV[V]", "LV", "程序", "VW15022", 100, 0, 10, "V", new ShortTagValue(), true) { DecimalPoint = 2 });
////TagManger.AddTag(new Tag<short>("LV[A]", "LV[A]", "LVCur", "程序", "VW15024", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("LV[A]", "LV[A]", "LVCur", "程序", "VW15024", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 3 });
//TagManger.AddTag(new Tag<short>("环境温度", "环境温度[℃]", "EnvTemp", "程序", "VW15026", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1 });
////TagManger.AddTag(new Tag<short>("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("OS1温度", "OS1温度[℃]", "OS1Temp", "程序", "VW15030", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("OS2温度", "OS2温度[℃]", "OS2Temp", "程序", "VW15032", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("COND2温度", "COND2温度[℃]", "Cond2Temp", "程序", "VW15034", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("EVAP出口温度", "EVAP出口温度[℃]", "EVAPExpTemp", "程序", "VW15036", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
////TagManger.AddTag(new Tag<short>("冷媒流量", "冷媒流量[L/min]", "VRV", "程序", "VW15038", 100, 0, 1, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("冷媒流量", "冷媒流量[L/min]", "VRV", "程序", "VW15038", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("润滑油流量", "润滑油流量[L/min]", "LubeFlow", "程序", "VW15040", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("排气温度", "排气温度[℃]", "ExTemp", "程序", "VW15042", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("膨胀阀前压力", "膨胀阀前压力[BarA]", "TxvFrPress", "程序", "VW15044", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("膨胀阀前温度", "膨胀阀前温度[℃]", "TxvFrTemp", "程序", "VW15046", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("EVAP出口压力", "EVAP出口压力[BarA]", "EVAPExpPress", "程序", "VW15048", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("腔内压力", "腔内压力[BarA]", "IntrplPress", "程序", "VW15050", 100, 0, 100, "BarA", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("压缩机表面温度", "压缩机表面温度[℃]", "CapSurfTemp", "程序", "VW15052", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("PTC流量", "PTC流量[L/min]", "PTCFlow", "程序", "VW15054", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("PTC入水温度", "PTC入水温度[℃]", "PTCEntTemp", "程序", "VW15056", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("PTC出水温度", "PTC出水温度[℃]", "PTCExpTemp", "程序", "VW15058", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
////TagManger.AddTag(new Tag<short>("AT04_01", "AT04_01[℃]", "AT04_01Temp", "程序", "VW70", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
////TagManger.AddTag(new Tag<short>("AT04_02", "AT04_02[℃]", "AT04_02Temp", "程序", "VW72", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp母线电流", "通讯Cmp母线电流[A]", "ComCapBusCur", "程序", "VW15060", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("通讯Cmp母线电压", "通讯Cmp母线电压[V]", "ComCapBusVol", "程序", "VW15062", 100, 0, 1, "V", new ShortTagValue(), false) { DecimalPoint = 0 });
//TagManger.AddTag(new Tag<short>("通讯Cmp逆变器温度", "通讯Cmp逆变器温度[℃]", "ComCapInvTemp", "程序", "VW15064", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0 });
//TagManger.AddTag(new Tag<short>("通讯Cmp相电流", "通讯Cmp相电流[A]", "ComCapPhCur", "程序", "VW15066", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("通讯Cmp功率", "通讯Cmp功率[W]", "ComCapPw", "程序", "VW15068", 100, 0, 1, "W", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯Cmp芯片温度", "通讯Cmp芯片温度[℃]", "ComCapChipTemp", "程序", "VW15070", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0 });
//TagManger.AddTag(new Tag<short>("通讯PTC入水温度", "通讯PTC入水温度[℃]", "ComPTCEntTemp", "程序", "VW15072", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC出水温度", "通讯PTC出水温度[℃]", "ComPTCExpTemp", "程序", "VW15074", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC峰值电流", "通讯PTC峰值电流[A]", "ComPTCPeakCur", "程序", "VW15076", 100, 0, 1, "A", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("通讯PTC母线电流", "通讯PTC母线电流[A]", "ComPTCBusCur", "程序", "VW15078", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2 });
//TagManger.AddTag(new Tag<short>("通讯PTC膜温", "通讯PTC膜温[℃]", "ComPTCFlmTemp", "程序", "VW15080", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0 });
//TagManger.AddTag(new Tag<short>("通讯PTC模块温度", "通讯PTC模块温度[℃]", "ComPTCMdTemp", "程序", "VW15082", 100, 0, 1, "℃", new ShortTagValue(), false) { DecimalPoint = 0 });
//TagManger.AddTag(new Tag<short>("液冷媒流量", "液冷媒流量[L/min]", "LiqRefFlow", "程序", "VW15084", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("干度流量", "干度流量[L/min]", "DryFlow", "程序", "VW15086", 100, 0, 10, "L/min", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("H5吸气混合器温度", "H5吸气混合器温度[℃]", "H5InhMixTemp", "程序", "VW15088", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("COND循环水温", "COND循环水温[℃]", "CONDCirWaterTemp", "程序", "VW15090", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("SUBCOOL出口温度", "SUBCOOL出口温度[℃]", "SubcoolOutTemp", "程序", "VW15092", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("吸气混合器出口温度", "吸气混合器出口温度[℃]", "InhMixOutTemp", "程序", "VW15094", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("H1出口温度", "H1出口温度[℃]", "H1OutTemp", "程序", "VW15096", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("S.C循环水温", "S.C循环水温[℃]", "SCCirWaterTemp", "程序", "VW15098", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("EVAP循环水温", "EVAP循环水温[℃]", "EvapCirWaterTemp", "程序", "VW15100", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 });
//TagManger.AddTag(new Tag<short>("吸气混合器出口压力", "吸气混合器出口压力[BarA]", "InhMixOutPress", "程序", "VW15102", 100, 0, 10, "BarA", new ShortTagValue(), false) { DecimalPoint = 1 });
#region
// 从配置文件加载标签
string tagConfigPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TagConfig", "SysTags.json");
@@ -1500,6 +1439,15 @@ namespace CapMachine.Wpf.Services
//pVModel.EngSrcValue = 0;
}
break;
case CanLinEnum.CANFD:
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC 取消XXX
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? CanfdpVModel))
{
CanfdpVModel!.EngValue = CanFdDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速");
SiemensDrive.Write(CanfdpVModel!.Address!.Replace("W", ""), (short)CanFdDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速"));
//pVModel.EngSrcValue = 0;
}
break;
case CanLinEnum.Lin:
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC 取消XXX
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? LinpVModel))
@@ -1529,6 +1477,12 @@ namespace CapMachine.Wpf.Services
//写入到PLC中
SiemensDrive.Write(pVModel!.Address!.Replace("W", ""), (short)(CanDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit) * itemCanLinGroup.Value.Precision));
break;
case CanLinEnum.CANFD:
//取得压缩机的CANLIN数据到数据集合中
pVModel!.EngValue = CanFdDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit);
//写入到PLC中
SiemensDrive.Write(pVModel!.Address!.Replace("W", ""), (short)(CanFdDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit) * itemCanLinGroup.Value.Precision));
break;
case CanLinEnum.Lin:
//取得压缩机的CANLIN数据
pVModel!.EngValue = LinDriveService.GetLdfValueByName(itemCanLinGroup.Value.NameNoUnit);
@@ -1596,6 +1550,10 @@ namespace CapMachine.Wpf.Services
//获取PLC的使能状态更新到CAN的使能状态
CanDriveService.UpdateCapEnableCmdData(OperateResultValue.Content[0] == 0 ? false : true);
break;
case CanLinEnum.CANFD:
//获取PLC的使能状态更新到CAN的使能状态
CanFdDriveService.UpdateCapEnableCmdData(OperateResultValue.Content[0] == 0 ? false : true);
break;
case CanLinEnum.Lin:
//获取PLC的使能状态更新到LIN的使能状态
LinDriveService.UpdateCapEnableCmdData(OperateResultValue.Content[0] == 0 ? false : true);
@@ -1611,6 +1569,10 @@ namespace CapMachine.Wpf.Services
//获取PLC的使能状态更新到CAN的使能状态
CanDriveService.UpdateSpeedCmdData(OperateResultValue.Content[1]);
break;
case CanLinEnum.CANFD:
//获取PLC的使能状态更新到CAN的使能状态
CanFdDriveService.UpdateSpeedCmdData(OperateResultValue.Content[1]);
break;
case CanLinEnum.Lin:
//获取PLC的使能状态更新到LIN的使能状态
LinDriveService.UpdateSpeedCmdData(OperateResultValue.Content[1]);
@@ -1626,6 +1588,10 @@ namespace CapMachine.Wpf.Services
//获取PLC的功率限制更新到CAN的功率限制
CanDriveService.UpdateCapPwLimitCmdData(OperateResultValue.Content[2]);
break;
case CanLinEnum.CANFD:
//获取PLC的功率限制更新到CAN的功率限制
CanFdDriveService.UpdateCapPwLimitCmdData(OperateResultValue.Content[2]);
break;
case CanLinEnum.Lin:
//获取PLC的功率限制更新到LIN的功率限制
LinDriveService.UpdateCapPwLimitCmdData(OperateResultValue.Content[2]);
@@ -1642,6 +1608,10 @@ namespace CapMachine.Wpf.Services
//获取PLC的 PTC使能更新到CAN的 PTC使能
CanDriveService.UpdateCapPTCEnableCmdData(OperateResultValue.Content[10] == 0 ? false : true);
break;
case CanLinEnum.CANFD:
//获取PLC的 PTC使能更新到CAN的 PTC使能
CanFdDriveService.UpdateCapPTCEnableCmdData(OperateResultValue.Content[10] == 0 ? false : true);
break;
case CanLinEnum.Lin:
//获取PLC的 PTC使能更新到LIN的 PTC使能
LinDriveService.UpdateCapPTCEnableCmdData(OperateResultValue.Content[10] == 0 ? false : true);
@@ -1657,6 +1627,10 @@ namespace CapMachine.Wpf.Services
//获取PLC的 PTC功率更新到CAN的 PTC功率
CanDriveService.UpdateCapPTCPwCmdData(OperateResultValue.Content[11]);
break;
case CanLinEnum.CANFD:
//获取PLC的 PTC功率更新到CAN的 PTC功率
CanFdDriveService.UpdateCapPTCPwCmdData(OperateResultValue.Content[11]);
break;
case CanLinEnum.Lin:
//获取PLC的 PTC功率更新到LIN的 PTC功率
LinDriveService.UpdateCapPTCPwCmdData(OperateResultValue.Content[11]);
@@ -1670,7 +1644,11 @@ namespace CapMachine.Wpf.Services
{
case CanLinEnum.Can:
//获取PLC的 PTC水流量信号更新到CAN的 PTC水流量信号
CanDriveService.UpdateCapPTCFlowCmdData(OperateResultValue.Content[12]*1.0/100);
CanDriveService.UpdateCapPTCFlowCmdData(OperateResultValue.Content[12] * 1.0 / 100);
break;
case CanLinEnum.CANFD:
//获取PLC的 PTC水流量信号更新到CAN的 PTC水流量信号
CanFdDriveService.UpdateCapPTCFlowCmdData(OperateResultValue.Content[12] * 1.0 / 100);
break;
case CanLinEnum.Lin:
//获取PLC的 PTC水流量信号更新到LIN的 PTC水流量信号
@@ -1687,6 +1665,10 @@ namespace CapMachine.Wpf.Services
//获取PLC的 PTC水温更新到CAN的 PTC水温
CanDriveService.UpdateCapPTCWaterTempCmdData(OperateResultValue.Content[13]);
break;
case CanLinEnum.CANFD:
//获取PLC的 PTC水温更新到CAN的 PTC水温
CanFdDriveService.UpdateCapPTCWaterTempCmdData(OperateResultValue.Content[13]);
break;
case CanLinEnum.Lin:
//获取PLC的 PTC水温更新到LIN的 PTC水温
LinDriveService.UpdateCapPTCWaterTempCmdData(OperateResultValue.Content[13]);

View File

@@ -89,8 +89,8 @@
},
{
"Id": 50,
"Name": "COND1温度[℃]",
"NameNoUnit": "COND1温度",
"Name": "COND循环水温[℃]",
"NameNoUnit": "COND循环水温",
"EnName": "Cond1Temp",
"Group": "采集",
"MinValue": 0,
@@ -111,8 +111,8 @@
},
{
"Id": 60,
"Name": "润滑油压力[BarA]",
"NameNoUnit": "润滑油压力",
"Name": "SUBCOOL出口温度[℃]",
"NameNoUnit": "SUBCOOL出口温度",
"EnName": "LubePress",
"Group": "采集",
"MinValue": 0,
@@ -120,7 +120,7 @@
"IsMeter": false,
"DecimalPoint": 0,
"Precision": 100,
"Unit": "BarA",
"Unit": "",
"DataType": "Short",
"RWInfo": "PLCRead",
"PVModel": {
@@ -133,8 +133,8 @@
},
{
"Id": 70,
"Name": "COND2压力[BarA]",
"NameNoUnit": "COND2压力",
"Name": "吸气混合器出口温度[℃]",
"NameNoUnit": "吸气混合器出口温度",
"EnName": "Cond2Press",
"Group": "采集",
"MinValue": 0,
@@ -142,7 +142,7 @@
"IsMeter": false,
"DecimalPoint": 0,
"Precision": 100,
"Unit": "BarA",
"Unit": "",
"DataType": "Short",
"RWInfo": "PLCRead",
"PVModel": {
@@ -353,8 +353,8 @@
},
{
"Id": 170,
"Name": "OS2温度[℃]",
"NameNoUnit": "OS2温度",
"Name": "H1出口温度[℃]",
"NameNoUnit": "H1出口温度",
"EnName": "OS2Temp",
"Group": "采集",
"MinValue": 0,
@@ -375,8 +375,8 @@
},
{
"Id": 180,
"Name": "COND2温度[℃]",
"NameNoUnit": "COND2温度",
"Name": "H5吸气混合器温度[℃]",
"NameNoUnit": "H5吸气混合器温度",
"EnName": "Cond2Temp",
"Group": "采集",
"MinValue": 0,

View File

@@ -180,17 +180,17 @@
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
HeaderText="COND1温度(℃)"
HeaderText="COND循环水温(℃)"
MappingName="Cond1Temp"
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
HeaderText="润滑油压力(BarA)"
HeaderText="SUBCOOL出口温度(℃)"
MappingName="LubePress"
NumberDecimalDigits="2" />
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
HeaderText="COND2压力(BarA)"
HeaderText="吸气混合器出口温度(℃)"
MappingName="Cond2Press"
NumberDecimalDigits="2" />
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
HeaderText="OCR(%)"
MappingName="OCR"
@@ -216,7 +216,7 @@
MappingName="OS1Temp"
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
HeaderText="OS2温度(℃)"
HeaderText="H1出口温度(℃)"
MappingName="OS2Temp"
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
@@ -224,7 +224,7 @@
MappingName="EVAPExpTemp"
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
HeaderText="COND2温度(℃)"
HeaderText="H5吸气混合器温度(℃)"
MappingName="Cond2Temp"
NumberDecimalDigits="1" />
@@ -251,10 +251,17 @@
MappingName="PTCFlow"
NumberDecimalDigits="1" />
<syncfusion:GridNumericColumn
HeaderText="PTC功率(W)"
MappingName="PTCPw"
HeaderText="PTC功率1(W)"
MappingName="PTCPw1"
NumberDecimalDigits="0" />
<syncfusion:GridNumericColumn
HeaderText="PTC功率2(W)"
MappingName="PTCPw2"
NumberDecimalDigits="0" />
<syncfusion:GridNumericColumn
HeaderText="干度"
MappingName="Dryness"
NumberDecimalDigits="0" />
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
<Grid Grid.Row="1">