CAN的更改
This commit is contained in:
@@ -2272,7 +2272,7 @@ namespace CapMachine.Wpf.Services
|
||||
|
||||
//dynamic dad=10;
|
||||
|
||||
|
||||
|
||||
InitialPLCCom();
|
||||
|
||||
//拓展的参数信息
|
||||
@@ -2741,25 +2741,25 @@ namespace CapMachine.Wpf.Services
|
||||
if (item.StateOperateResult.IsSuccess)
|
||||
{
|
||||
item.State = item.StateOperateResult.Content;
|
||||
//根据PLC得到执行的步骤数据,更新到CAN和LIN的数据
|
||||
if (item.Name!.Equals("使能"))
|
||||
{
|
||||
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||
{
|
||||
case CanLinEnum.Can:
|
||||
//获取PLC的使能状态,更新到CAN的使能状态
|
||||
CanDriveService.UpdateCapEnableCmdData(item.State);
|
||||
//itemTag.Value.EngPvValue = 0;
|
||||
break;
|
||||
case CanLinEnum.Lin:
|
||||
//获取PLC的使能状态,更新到LIN的使能状态
|
||||
LinDriveService.UpdateCapEnableCmdData(item.State);
|
||||
//itemTag.Value.EngPvValue = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//根据PLC得到执行的步骤数据,更新到CAN和LIN的数据,压缩的使能时来自于程序的步骤配置,不再接受PLC的指令数据
|
||||
//if (item.Name!.Equals("使能"))
|
||||
//{
|
||||
// switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||
// {
|
||||
// case CanLinEnum.Can:
|
||||
// //获取PLC的使能状态,更新到CAN的使能状态
|
||||
// CanDriveService.UpdateCapEnableCmdData(item.State);
|
||||
// //itemTag.Value.EngPvValue = 0;
|
||||
// break;
|
||||
// case CanLinEnum.Lin:
|
||||
// //获取PLC的使能状态,更新到LIN的使能状态
|
||||
// LinDriveService.UpdateCapEnableCmdData(item.State);
|
||||
// //itemTag.Value.EngPvValue = 0;
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3062,6 +3062,13 @@ namespace CapMachine.Wpf.Services
|
||||
{
|
||||
foreach (var itemStepExd in ProRunChannelData.ListStepExd)
|
||||
{
|
||||
//压缩机使能的参数直接给压缩机触发
|
||||
if (itemStepExd.Name.Contains("压缩机使能"))
|
||||
{
|
||||
CanDriveService.UpdateCapEnableCmdData((bool)itemStepExd.Value);
|
||||
continue;
|
||||
}
|
||||
|
||||
var DataAdrees = ListPlcExdConfigCell.FirstOrDefault(a => a.Name == itemStepExd.Name);
|
||||
if (DataAdrees != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user