diff --git a/CapMachine.Wpf/Services/CanDriveService.cs b/CapMachine.Wpf/Services/CanDriveService.cs index 22ea787..cfb1546 100644 --- a/CapMachine.Wpf/Services/CanDriveService.cs +++ b/CapMachine.Wpf/Services/CanDriveService.cs @@ -85,6 +85,18 @@ namespace CapMachine.Wpf.Services #region 程序驱动CAN + + private int _AutoSpeedSv; + /// + /// 转速SV + /// + public int AutoSpeedSv + { + get { return _AutoSpeedSv; } + set { _AutoSpeedSv = value; RaisePropertyChanged(); } + } + + /// /// 转速 指令数据 实例 /// @@ -143,6 +155,8 @@ namespace CapMachine.Wpf.Services { if (SpeedCanCmdData != null) { + AutoSpeedSv = (int)SpeedData; + //首先是否判断是有斜率 if (SpeedCanCmdData.LogicRuleDto == null) { @@ -153,7 +167,7 @@ namespace CapMachine.Wpf.Services { //LogicRuleService.ApplyExpressionFast(SpeedData, SpeedCanCmdData.LogicRuleDto); SpeedCanCmdData.SignalCmdValue = LogicRuleService.ApplyExpressionFast(SpeedData, SpeedCanCmdData.LogicRuleDto); - Console.WriteLine($"实时转换后转速值:{SpeedCanCmdData.SignalCmdValue}-SV值:{SpeedData}" ); + Console.WriteLine($"实时转换后转速值:{SpeedCanCmdData.SignalCmdValue}-SV值:{SpeedData}"); } } diff --git a/CapMachine.Wpf/Services/LinDriveService.cs b/CapMachine.Wpf/Services/LinDriveService.cs index 6363025..fef1c02 100644 --- a/CapMachine.Wpf/Services/LinDriveService.cs +++ b/CapMachine.Wpf/Services/LinDriveService.cs @@ -80,6 +80,18 @@ namespace CapMachine.Wpf.Services #region 程序驱动CAN + + private int _AutoSpeedSv; + /// + /// 转速SV + /// + public int AutoSpeedSv + { + get { return _AutoSpeedSv; } + set { _AutoSpeedSv = value; RaisePropertyChanged(); } + } + + /// /// 转速 指令数据 实例 /// @@ -139,6 +151,7 @@ namespace CapMachine.Wpf.Services { if (SpeedLinCmdData != null) { + AutoSpeedSv = (int)SpeedData; SpeedLinCmdData.SignalCmdValue = SpeedData; } //if (EnableLinCmdData != null) diff --git a/CapMachine.Wpf/Services/MachineRtDataService.cs b/CapMachine.Wpf/Services/MachineRtDataService.cs index 6deb045..a7756cc 100644 --- a/CapMachine.Wpf/Services/MachineRtDataService.cs +++ b/CapMachine.Wpf/Services/MachineRtDataService.cs @@ -2285,7 +2285,7 @@ namespace CapMachine.Wpf.Services /// public bool SysReset() { - return true; + //return true; //取消XXX var FindData = ListHandSwitchData.Where(a => a.Name == "复位"); @@ -2310,7 +2310,7 @@ namespace CapMachine.Wpf.Services /// public bool SysMute() { - return true; + //return true; //取消XXX var FindData = ListHandSwitchData.Where(a => a.Name == "消音"); @@ -2336,18 +2336,18 @@ namespace CapMachine.Wpf.Services /// public bool SysStart() { - return true; + //return true; //取消XXX - //var Result = SiemensDrive.Write("M0.4", true); - //if (Result.IsSuccess) - //{ - // return true; - //} - //else - //{ - // return false; - //} + var Result = SiemensDrive.Write("M0.4", true); + if (Result.IsSuccess) + { + return true; + } + else + { + return false; + } } @@ -2357,7 +2357,7 @@ namespace CapMachine.Wpf.Services /// public bool SysEnd() { - return true; + //return true; //取消XXX var Result = SiemensDrive.Write("M0.7", true); @@ -2379,7 +2379,7 @@ namespace CapMachine.Wpf.Services /// public bool SysPause() { - return true; + //return true; //取消XXX var StateResult = SiemensDrive.ReadBool("M0.6"); diff --git a/CapMachine.Wpf/Views/CANConfigView.xaml b/CapMachine.Wpf/Views/CANConfigView.xaml index adc557e..1ed62c6 100644 --- a/CapMachine.Wpf/Views/CANConfigView.xaml +++ b/CapMachine.Wpf/Views/CANConfigView.xaml @@ -569,6 +569,28 @@ + + + + + diff --git a/CapMachine.Wpf/Views/LINConfigView.xaml b/CapMachine.Wpf/Views/LINConfigView.xaml index bec5411..696ba79 100644 --- a/CapMachine.Wpf/Views/LINConfigView.xaml +++ b/CapMachine.Wpf/Views/LINConfigView.xaml @@ -573,6 +573,29 @@ + + + + + + diff --git a/CapMachine.Wpf/Views/MonitorView.xaml b/CapMachine.Wpf/Views/MonitorView.xaml index 3bf3f83..1ee7088 100644 --- a/CapMachine.Wpf/Views/MonitorView.xaml +++ b/CapMachine.Wpf/Views/MonitorView.xaml @@ -875,7 +875,7 @@ --> - +