CAN FD 波特率等参数的增加和联动配置
This commit is contained in:
@@ -1435,7 +1435,7 @@ namespace CapMachine.Wpf.Services
|
||||
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? CanpVModel))
|
||||
{
|
||||
CanpVModel!.EngValue = CanDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速");
|
||||
SiemensDrive.Write(CanpVModel!.Address!.Replace("W", ""), (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速"));
|
||||
SiemensDrive.Write(CanpVModel!.ReWritePLCAddress!, (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速"));
|
||||
//pVModel.EngSrcValue = 0;
|
||||
}
|
||||
break;
|
||||
@@ -1444,7 +1444,7 @@ namespace CapMachine.Wpf.Services
|
||||
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? CanfdpVModel))
|
||||
{
|
||||
CanfdpVModel!.EngValue = CanFdDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速");
|
||||
SiemensDrive.Write(CanfdpVModel!.Address!.Replace("W", ""), (short)CanFdDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速"));
|
||||
SiemensDrive.Write(CanfdpVModel!.ReWritePLCAddress!, (short)CanFdDriveService.GetDbcSpeedValueBySpeedName("通讯Cmp转速"));
|
||||
//pVModel.EngSrcValue = 0;
|
||||
}
|
||||
break;
|
||||
@@ -1453,7 +1453,7 @@ namespace CapMachine.Wpf.Services
|
||||
if (TagManger.TryGetPVModel(itemCanLinGroup.Key, out MeterValueAttrCell? LinpVModel))
|
||||
{
|
||||
LinpVModel!.EngValue = LinDriveService.GetLdfSpeedValueBySpeedName("通讯Cmp转速");
|
||||
SiemensDrive.Write(LinpVModel!.Address!.Replace("W", ""), (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯Cmp转速"));
|
||||
SiemensDrive.Write(LinpVModel!.ReWritePLCAddress!, (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯Cmp转速"));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -1469,25 +1469,28 @@ namespace CapMachine.Wpf.Services
|
||||
//尝试获取模型信息
|
||||
if (TagManger.TryGetCapPVModelByShortValueTag(itemCanLinGroup.Key, out MeterValueAttrCell? pVModel))
|
||||
{
|
||||
//没有这个地址则跳过
|
||||
if (String.IsNullOrEmpty(pVModel!.ReWritePLCAddress)) continue;
|
||||
|
||||
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||
{
|
||||
case CanLinEnum.Can:
|
||||
//取得压缩机的CANLIN数据到数据集合中
|
||||
pVModel!.EngValue = CanDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit);
|
||||
//写入到PLC中
|
||||
SiemensDrive.Write(pVModel!.Address!.Replace("W", ""), (short)(CanDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit) * itemCanLinGroup.Value.Precision));
|
||||
SiemensDrive.Write(pVModel!.ReWritePLCAddress!, (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));
|
||||
SiemensDrive.Write(pVModel!.ReWritePLCAddress!, (short)(CanFdDriveService.GetDbcValueByName(itemCanLinGroup.Value.NameNoUnit) * itemCanLinGroup.Value.Precision));
|
||||
break;
|
||||
case CanLinEnum.Lin:
|
||||
//取得压缩机的CANLIN数据
|
||||
pVModel!.EngValue = LinDriveService.GetLdfValueByName(itemCanLinGroup.Value.NameNoUnit);
|
||||
//写入到PLC中
|
||||
SiemensDrive.Write(pVModel!.Address!.Replace("W", ""), (short)(LinDriveService.GetLdfValueByName(itemCanLinGroup.Value.NameNoUnit) * itemCanLinGroup.Value.Precision));
|
||||
SiemensDrive.Write(pVModel!.ReWritePLCAddress!, (short)(LinDriveService.GetLdfValueByName(itemCanLinGroup.Value.NameNoUnit) * itemCanLinGroup.Value.Precision));
|
||||
break;
|
||||
case CanLinEnum.No:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user