更改了新增的6个物性计算的数据记录方面和显示
This commit is contained in:
@@ -319,6 +319,18 @@ namespace CapMachine.Wpf.Models.LightChart
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.Subcooling, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
case "过热度[K]":
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.Superheat, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
case "制热量Qh[W]":
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.HeatingCapacity, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
case "压缩机性能系数(制热)":
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.COPHeat, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
case "等熵效率ns[%]":
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.IsentrpEff, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
case "制冷量Qc[W]":
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.CoolCapacity, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
case "压缩机性能系数(制冷)":
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.COPCool, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
case "容积效率nv[%]":
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.VoltricEff, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
default:
|
||||
return CurHistoryData.Select(a => new ChartPoint() { Value = a.Speed, Time = a.CreateTime }).OrderBy(a => a.Time).ToList();
|
||||
break;
|
||||
|
||||
@@ -165,6 +165,13 @@ namespace CapMachine.Wpf.Services
|
||||
new Columns(){ Name="过冷度[K]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
new Columns(){ Name="过热度[K]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
|
||||
new Columns(){ Name="制热量Qh[W]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
new Columns(){ Name="压缩机性能系数(制热)",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
new Columns(){ Name="等熵效率ns[%]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
new Columns(){ Name="制冷量Qc[W]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
new Columns(){ Name="压缩机性能系数(制冷)",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
new Columns(){ Name="容积效率nv[%]",MapType=typeof(float).ToString(),IsIdentity=false,IsPrimary=false},
|
||||
|
||||
new Columns(){ Name="创建时间",MapType="System.DateTime",IsIdentity=false,IsPrimary=false},
|
||||
}
|
||||
}
|
||||
@@ -461,9 +468,10 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
//如果Execute执行的是一个很耗时的方法,会导致方法未执行完毕,定时器又启动了一个线程来执行Execute方法
|
||||
//CycleTimer.Stop(); //先关闭定时器
|
||||
|
||||
|
||||
var DataInfo = MachineRtDataService.TagManger.DicTags
|
||||
.ToDictionary(kvp => kvp.Key, kvp => (object)MachineRtDataService.TagManger.TryGetRecordPVValue(kvp.Value.Name));
|
||||
//.ToDictionary(kvp => kvp.Key, kvp => (object)MachineRtDataService.TagManger.TryGetRecordPVValue(kvp.Value.Name));
|
||||
.ToDictionary(kvp => kvp.Key, kvp => (object)MachineRtDataService.TagManger.TryGetRecordPVValue(kvp.Key));
|
||||
DataInfo.Add("创建时间", DateTime.Now);
|
||||
|
||||
var RecordData = new RecordChannelData()
|
||||
|
||||
@@ -492,7 +492,7 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(thermoErr))
|
||||
{
|
||||
Logger?.Error($"六个物性结果计算警告: {thermoErr}");
|
||||
Logger?.Warn($"六个物性结果计算警告: {thermoErr}");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1210,6 +1210,50 @@ namespace CapMachine.Wpf.Services
|
||||
return false;
|
||||
}
|
||||
|
||||
if (HVPwTag == null)
|
||||
{
|
||||
error = "缺少 HV[W] 功率标签";
|
||||
return false;
|
||||
}
|
||||
|
||||
var w_W = HVPwTag.PVModel.EngValue;
|
||||
if (!double.IsNaN(w_W) && !double.IsInfinity(w_W) && w_W == 0)
|
||||
{
|
||||
HeatingCapacityQh_kW = 0;
|
||||
CoolingCapacityQc_kW = 0;
|
||||
COPHeating = 0;
|
||||
COPCooling = 0;
|
||||
IsentropicEfficiencyPct = 0;
|
||||
VolumetricEfficiencyPct = 0;
|
||||
|
||||
if (HeatingCapacityTag != null)
|
||||
{
|
||||
HeatingCapacityTag.PVModel.EngValue = 0;
|
||||
}
|
||||
if (COPHeatTag != null)
|
||||
{
|
||||
COPHeatTag.PVModel.EngValue = 0;
|
||||
}
|
||||
if (IsentrpEffTag != null)
|
||||
{
|
||||
IsentrpEffTag.PVModel.EngValue = 0;
|
||||
}
|
||||
if (CoolCapacityTag != null)
|
||||
{
|
||||
CoolCapacityTag.PVModel.EngValue = 0;
|
||||
}
|
||||
if (COPCoolTag != null)
|
||||
{
|
||||
COPCoolTag.PVModel.EngValue = 0;
|
||||
}
|
||||
if (VoltricEffTag != null)
|
||||
{
|
||||
VoltricEffTag.PVModel.EngValue = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!TryGetCompressorPower_kW(out var w_kW, out var wErr))
|
||||
{
|
||||
error = wErr;
|
||||
|
||||
Reference in New Issue
Block a user