增加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

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