diff --git a/CapMachine.Wpf/ProPars/ProParsHelperQuick.cs b/CapMachine.Wpf/ProPars/ProParsHelperQuick.cs index 7abf0b7..e23e2c6 100644 --- a/CapMachine.Wpf/ProPars/ProParsHelperQuick.cs +++ b/CapMachine.Wpf/ProPars/ProParsHelperQuick.cs @@ -75,6 +75,9 @@ namespace CapMachine.Wpf.ProPars CurStep++; } + //防止上一次下载的程序多余当前的步骤,为了清空多余的步骤数据,增加一行的数据 + ListPlcParsDataQuick = AddNullData(ListPlcParsDataQuick); + LoadDataToPLC(siemensS7NetStance, ListPlcParsDataQuick); //装载地址 VW1000 @@ -147,6 +150,22 @@ namespace CapMachine.Wpf.ProPars //siemensS7NetStance.Write(); } + + /// + /// 增加一行空的数据,作为终止的执行 + /// + public static List AddNullData(List plcParsDatas) + { + var NewStep = new QuickMeterStepDto() + { + + }; + + return LoadPlcParsData(NewStep, plcParsDatas, plcParsDatas.First().Steps.Count()+1); + + } + + /// /// 单步骤程序解析 /// 单步骤里面包括多个仪表参数的配置信息 diff --git a/CapMachine.Wpf/ReportFile/快速程序模版.xlsx b/CapMachine.Wpf/ReportFile/快速程序模版.xlsx index b4889df..8c4eb15 100644 Binary files a/CapMachine.Wpf/ReportFile/快速程序模版.xlsx and b/CapMachine.Wpf/ReportFile/快速程序模版.xlsx differ diff --git a/CapMachine.Wpf/Services/MachineRtDataService.cs b/CapMachine.Wpf/Services/MachineRtDataService.cs index 828333b..72b6117 100644 --- a/CapMachine.Wpf/Services/MachineRtDataService.cs +++ b/CapMachine.Wpf/Services/MachineRtDataService.cs @@ -156,7 +156,7 @@ namespace CapMachine.Wpf.Services TagManger.AddTag(new Tag("LV[A]", "LV[A]", "LVCur", "程序", "VW15024", 100, 0, 100, "A", new ShortTagValue(), false) { DecimalPoint = 2 }); TagManger.AddTag(new Tag("环境温度", "环境温度[℃]", "EnvTemp", "程序", "VW15026", 100, 0, 10, "℃", new ShortTagValue(), true) { DecimalPoint = 1 }); //TagManger.AddTag(new Tag("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 10, "%", new ShortTagValue(), true) { DecimalPoint = 1 }); - TagManger.AddTag(new Tag("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 1, "%", new ShortTagValue(), true) { DecimalPoint = 0 }); + TagManger.AddTag(new Tag("环境湿度", "环境湿度[%]", "EnvRH", "程序", "VW15028", 100, 0, 1, "%", new ShortTagValue(), true) { DecimalPoint = 1 }); TagManger.AddTag(new Tag("OS1温度", "OS1温度[℃]", "OS1Temp", "程序", "VW15030", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 }); TagManger.AddTag(new Tag("OS2温度", "OS2温度[℃]", "OS2Temp", "程序", "VW15032", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 }); TagManger.AddTag(new Tag("COND2温度", "COND2温度[℃]", "Cond2Temp", "程序", "VW15034", 100, 0, 10, "℃", new ShortTagValue(), false) { DecimalPoint = 1 }); diff --git a/CapMachine.Wpf/ViewModels/QuickMeterStepViewModel.cs b/CapMachine.Wpf/ViewModels/QuickMeterStepViewModel.cs index c335d98..9a59dbf 100644 --- a/CapMachine.Wpf/ViewModels/QuickMeterStepViewModel.cs +++ b/CapMachine.Wpf/ViewModels/QuickMeterStepViewModel.cs @@ -326,6 +326,7 @@ namespace CapMachine.Wpf.ViewModels } ProParsHelperQuick.GetPlcParsData(ListQuickMeterStepDto.ToList(), this.MachineRtDataService.SiemensDrive); + //下载完成的话,则标记状态 SysRunService.MachineRunState1.IsProLoad = true; }