速度的拓展参数对应

This commit is contained in:
2025-04-14 10:33:49 +08:00
parent 4a07d45b25
commit 43e0ff62e7
10 changed files with 470 additions and 52 deletions

View File

@@ -38,8 +38,8 @@ namespace CapMachine.Wpf.Services
/// <summary>
/// 实例化函数
/// </summary>
public ProRuntimeService(IFreeSql freeSql, IMapper mapper, IEventAggregator eventAggregator,
MachineRtDataService machineRtDataService,ConfigService configService, CanDriveService canDriveService, LinDriveService linDriveService,
public ProRuntimeService(IFreeSql freeSql, IMapper mapper, IEventAggregator eventAggregator,
MachineRtDataService machineRtDataService, ConfigService configService, CanDriveService canDriveService, LinDriveService linDriveService,
ILogService logService)
{
FreeSql = freeSql;
@@ -165,7 +165,7 @@ namespace CapMachine.Wpf.Services
ListPlcLoadConfigCell.Add(new PlcLoadConfigCell()
{
Name = itemKeyValue.Key,
SvAddress = MachineRtDataService.TagManger.TryGetSVModel(itemKeyValue.Value.Name,out MeterValueAttrCell? controlAttrCell)==true? controlAttrCell!.Address:"",
SvAddress = MachineRtDataService.TagManger.TryGetSVModel(itemKeyValue.Value.Name, out MeterValueAttrCell? controlAttrCell) == true ? controlAttrCell!.Address : "",
Limit_UpAddress = MachineRtDataService.TagManger.TryGetLimitUpModel(itemKeyValue.Value.Name, out MeterExdAttrCell? controlAttrCell2) == true ? controlAttrCell2!.Address : "",
Limit_DownAddress = MachineRtDataService.TagManger.TryGetLimitDownModel(itemKeyValue.Value.Name, out MeterExdAttrCell? controlAttrCell3) == true ? controlAttrCell3!.Address : "",
Pid_PAddress = MachineRtDataService.TagManger.TryGetPidPModel(itemKeyValue.Value.Name, out MeterExdAttrCell? controlAttrCell4) == true ? controlAttrCell4!.Address : "",
@@ -359,6 +359,14 @@ namespace CapMachine.Wpf.Services
CurConfigLimitDto = Mapper.Map<ConfigLimitDto>(Limit),
CurConfigAlarmDto = Mapper.Map<ConfigAlarmDto>(Alarm),
ListStepExd = new List<StepExd>()
{
new StepExd(){ Name="输出锁定",Value=itemMeterValueCell.OutLock,ValueType=ExdValueType.Bool},
new StepExd(){ Name="吸排气阀",Value=itemMeterValueCell.InhExhValve,ValueType=ExdValueType.Bool},
new StepExd(){ Name="EV",Value=(short)itemMeterValueCell.Ev,ValueType=ExdValueType.Short},
new StepExd(){ Name="压缩机使能",Value=itemMeterValueCell.CapEnable,ValueType=ExdValueType.Bool},
},
ProStepInfo = $"{itemStep.StepNo}-{itemMeterValueCell.StepNo}",
});
@@ -416,6 +424,14 @@ namespace CapMachine.Wpf.Services
CurConfigLimitDto = Mapper.Map<ConfigLimitDto>(Limit),
CurConfigAlarmDto = Mapper.Map<ConfigAlarmDto>(Alarm),
ListStepExd = new List<StepExd>()
{
new StepExd(){ Name="输出锁定",Value=itemMeterValueCell.OutLock,ValueType=ExdValueType.Bool},
new StepExd(){ Name="吸排气阀",Value=itemMeterValueCell.InhExhValve,ValueType=ExdValueType.Bool},
new StepExd(){ Name="EV",Value=(short)itemMeterValueCell.Ev,ValueType=ExdValueType.Short},
new StepExd(){ Name="压缩机使能",Value=itemMeterValueCell.CapEnable,ValueType=ExdValueType.Bool},
},
ProStepInfo = $"{itemStep.StepNo}-{itemMeterValueCell.StepNo}",
MeterName = CurMeterName,
});
@@ -3220,7 +3236,7 @@ namespace CapMachine.Wpf.Services
{
Console.WriteLine($"【时间】{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")} 【Msg】程序运行结束 《《《《-------------------");
//EndProRun();
EventAggregator.GetEvent<ProRunEvent>().Publish(new ProRunEventMsg() { Machine = "M1", Msg = "执行完毕" });
MachineRunState1.RunStateMsg = "执行完毕";