增加SV和MV的模型数据

This commit is contained in:
2025-01-01 20:57:31 +08:00
parent f1cac2fb77
commit 6ff9103fa2
10 changed files with 287 additions and 229 deletions

View File

@@ -434,7 +434,7 @@ namespace CapMachine.Wpf.Services
//CycleTimer.Stop(); //先关闭定时器
var DataInfo = MachineRtDataService.TagManger.DicTags
.ToDictionary(kvp => kvp.Key, kvp => (object)kvp.Value.EngValue);
.ToDictionary(kvp => kvp.Key, kvp => (object)kvp.Value.EngPvValue);
DataInfo.Add("创建时间", DateTime.Now);
var RecordData = new RecordChannelData()

View File

@@ -181,7 +181,7 @@ namespace CapMachine.Wpf.Services
Unit = "rpm",
PVAddress = "VW100",//地址信息
SVAddress = "VW200",
MVAddress = "VW250",
MVAddress = "VW242",
IsMeter = true,
AutoHandSwitchAddress = "VW240",
Precision = 1,
@@ -201,7 +201,7 @@ namespace CapMachine.Wpf.Services
Unit = "MpaA",
PVAddress = "VW102",//地址信息
SVAddress = "VW202",
MVAddress = "VW252",
MVAddress = "VW246",
IsMeter = true,
AutoHandSwitchAddress = "VW244",
Precision = 1000,
@@ -221,7 +221,7 @@ namespace CapMachine.Wpf.Services
Unit = "MpaA",
PVAddress = "VW104",//地址信息
SVAddress = "VW204",
MVAddress = "VW254",
MVAddress = "VW250",
IsMeter = true,
AutoHandSwitchAddress = "VW248",
Precision = 1000,
@@ -241,7 +241,7 @@ namespace CapMachine.Wpf.Services
Unit = "℃",
PVAddress = "VW106",//地址信息
SVAddress = "VW206",
MVAddress = "VW256",
MVAddress = "VW254",
IsMeter = true,
AutoHandSwitchAddress = "VW252",
Precision = 10,
@@ -281,7 +281,7 @@ namespace CapMachine.Wpf.Services
Unit = "℃",
PVAddress = "VW110",//地址信息
SVAddress = "VW210",
MVAddress = "VW260",
MVAddress = "VW262",
IsMeter = true,
AutoHandSwitchAddress = "VW260",
Precision = 10,
@@ -954,7 +954,7 @@ namespace CapMachine.Wpf.Services
{
//case ConstShortType:
// //TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value = SiemensDrive.ReadInt16(itemTag.Value.Address).Content;
// TagManger.GetTagByName<short>(itemTag.Value.Name).EngValue = TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
// TagManger.GetTagByName<short>(itemTag.Value.Name).EngPvValue = TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
// break;
case ConstShortType:
@@ -962,7 +962,7 @@ namespace CapMachine.Wpf.Services
////仿真数据
//TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value = (short)Random.Next(1, 100);
//TagManger.GetTagByName<short>(itemTag.Value.Name).EngValue = (short)Random.Next(1, 100) * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
//TagManger.GetTagByName<short>(itemTag.Value.Name).EngPvValue = (short)Random.Next(1, 100) * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
//LinkState = false;
//PLC 数据
@@ -972,7 +972,7 @@ namespace CapMachine.Wpf.Services
if (OperateResultShort.IsSuccess)
{
TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value = SiemensDrive.ReadInt16(itemTag.Value.PVAddress).Content;
TagManger.GetTagByName<short>(itemTag.Value.Name).EngValue = TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
TagManger.GetTagByName<short>(itemTag.Value.Name).EngPvValue = TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
LinkState = true;
}
else
@@ -987,7 +987,7 @@ namespace CapMachine.Wpf.Services
if (OperateResultSVShort.IsSuccess)
{
TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value = OperateResultSVShort.Content;
TagManger.GetTagByName<short>(itemTag.Value.Name).EngSVValue = TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
TagManger.GetTagByName<short>(itemTag.Value.Name).EngSvValue = TagManger.GetTagInfoValueByName<short>(itemTag.Value.Name)!.Value * 1.0 / TagManger.GetTagByName<short>(itemTag.Value.Name)!.Precision;
LinkState = true;
}
else

View File

@@ -195,21 +195,21 @@ namespace CapMachine.Wpf.Services
IRefProp64.WMOLdll(x, ref wm);
//p = Convert.ToDouble(textBox2.Text) * 1000.0;//textBox2 Comp.吸气压力Mpa
p = (InhPressTag.EngValue) * 1000.0;//textBox2 Comp.吸气压力Mpa
p = (InhPressTag.EngPvValue) * 1000.0;//textBox2 Comp.吸气压力Mpa
kph = 1;
p1 = (TxvFrPressTag.EngValue) * 1000.0;//textBox3 Evap.膨胀阀前压力Mpa
p1 = (TxvFrPressTag.EngPvValue) * 1000.0;//textBox3 Evap.膨胀阀前压力Mpa
//p1 = Convert.ToDouble(textBox3.Text) * 1000.0;//textBox3 Evap.膨胀阀前压力Mpa
IRefProp64.SATPdll(ref p, x, ref kph, ref te, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
if (iErr == 0)
Superheat = InhTempTag.EngValue - (te - 273.15);
Superheat = InhTempTag.EngPvValue - (te - 273.15);
//textBox5.Text = String.Format("{0:n4}", Convert.ToDouble(textBox1.Text) - (te - 273.15));//textBox1 Comp.吸气温度(℃)
else
Superheat = 0;
IRefProp64.SATPdll(ref p1, x, ref kph, ref te1, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
if (iErr == 0)
Subcool = TxvFrTempTag.EngValue - (te1 - 273.15);//textBox4 Evap.膨胀阀前温度(℃)
Subcool = TxvFrTempTag.EngPvValue - (te1 - 273.15);//textBox4 Evap.膨胀阀前温度(℃)
//GuoLengDu = (te1 - 273.15) - ListKRLogCellValue.Find(a => a.Name == "膨胀阀前温度").Value;//textBox4 Evap.膨胀阀前温度(℃)
//textBox6.Text = String.Format("{0:n4}", Convert.ToDouble(textBox4.Text) - (te1 - 273.15));//textBox4 Evap.膨胀阀前温度(℃)
else
@@ -294,11 +294,11 @@ namespace CapMachine.Wpf.Services
//p = Convert.ToDouble(textBox2.Text) * 1000.0;//textBox2 Comp.吸气压力Mpa
//p = (ListRtKPMeter.Find(a => a.MeterName == "吸入压力").RtPV) * 1000.0;//textBox2 Comp.吸气压力Mpa
p = (InhPressTag.EngValue) * 1000.0;//textBox2 Comp.吸气压力Mpa
p = (InhPressTag.EngPvValue) * 1000.0;//textBox2 Comp.吸气压力Mpa
kph = 1;
//p1 = (ListKRLogCellValue.Find(a => a.Name == "膨胀阀前压力").Value) * 1000.0;//textBox3 Evap.膨胀阀前压力Mpa
p1 = (TxvFrPressTag.EngValue) * 1000.0;//textBox3 Evap.膨胀阀前压力Mpa
p1 = (TxvFrPressTag.EngPvValue) * 1000.0;//textBox3 Evap.膨胀阀前压力Mpa
//p1 = Convert.ToDouble(textBox3.Text) * 1000.0;//textBox3 Evap.膨胀阀前压力Mpa
@@ -307,7 +307,7 @@ namespace CapMachine.Wpf.Services
if (iErr == 0)
//GuoReDu = ListRtKPMeter.Find(a => a.MeterName == "吸入温度").RtPV - (te - 273.15);
Superheat = InhTempTag.EngValue - (te - 273.15);
Superheat = InhTempTag.EngPvValue - (te - 273.15);
//textBox5.Text = String.Format("{0:n4}", Convert.ToDouble(textBox1.Text) - (te - 273.15));//textBox1 Comp.吸气温度(℃)
else
Superheat = 0;
@@ -315,7 +315,7 @@ namespace CapMachine.Wpf.Services
IRefProp64.SATPdll(ref p1, x, ref kph, ref te1, ref Dl, ref Dv, xliq, xvap, ref iErr, ref herr, ref herrLen);
if (iErr == 0)
//GuoLengDu = ListKRLogCellValue.Find(a => a.Name == "膨胀阀前温度").Value - (te1 - 273.15);//textBox4 Evap.膨胀阀前温度(℃)
Subcool = TxvFrTempTag.EngValue - (te1 - 273.15);//textBox4 Evap.膨胀阀前温度(℃)
Subcool = TxvFrTempTag.EngPvValue - (te1 - 273.15);//textBox4 Evap.膨胀阀前温度(℃)
//textBox6.Text = String.Format("{0:n4}", Convert.ToDouble(textBox4.Text) - (te1 - 273.15));//textBox4 Evap.膨胀阀前温度(℃)