一些更改
This commit is contained in:
@@ -98,7 +98,7 @@ namespace CapMachine.Wpf
|
|||||||
//containerRegistry.RegisterSingleton<IAppStartService, AppStartService>();
|
//containerRegistry.RegisterSingleton<IAppStartService, AppStartService>();
|
||||||
//containerRegistry.RegisterSingleton<IApplicationContext, ApplicationContext>();
|
//containerRegistry.RegisterSingleton<IApplicationContext, ApplicationContext>();
|
||||||
|
|
||||||
containerRegistry.RegisterSingleton<SysRunService>();
|
|
||||||
containerRegistry.RegisterSingleton<ConfigService>();
|
containerRegistry.RegisterSingleton<ConfigService>();
|
||||||
containerRegistry.RegisterSingleton<AlarmService>();
|
containerRegistry.RegisterSingleton<AlarmService>();
|
||||||
////注册设备服务
|
////注册设备服务
|
||||||
@@ -109,7 +109,7 @@ namespace CapMachine.Wpf
|
|||||||
containerRegistry.RegisterSingleton<DataRecordService>();
|
containerRegistry.RegisterSingleton<DataRecordService>();
|
||||||
containerRegistry.RegisterSingleton<HighSpeedDataService>();
|
containerRegistry.RegisterSingleton<HighSpeedDataService>();
|
||||||
containerRegistry.RegisterSingleton<PPCService>();
|
containerRegistry.RegisterSingleton<PPCService>();
|
||||||
|
containerRegistry.RegisterSingleton<SysRunService>();
|
||||||
|
|
||||||
containerRegistry.RegisterSingleton<ComActionService>();
|
containerRegistry.RegisterSingleton<ComActionService>();
|
||||||
|
|
||||||
@@ -211,7 +211,6 @@ namespace CapMachine.Wpf
|
|||||||
//appStart.CreateShell();
|
//appStart.CreateShell();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#region 初版
|
//#region 初版
|
||||||
|
|
||||||
//Thread.CurrentThread.CurrentCulture = new CultureInfo("zh-CN");
|
//Thread.CurrentThread.CurrentCulture = new CultureInfo("zh-CN");
|
||||||
@@ -262,7 +261,7 @@ namespace CapMachine.Wpf
|
|||||||
|
|
||||||
//给当前的全局异常捕捉服务使用
|
//给当前的全局异常捕捉服务使用
|
||||||
LogService = ContainerLocator.Container.Resolve<ILogService>();
|
LogService = ContainerLocator.Container.Resolve<ILogService>();
|
||||||
LogService.Error("ex.ToString()");
|
LogService.Error("Start-->OnInitialized");
|
||||||
base.OnInitialized();
|
base.OnInitialized();
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
29
CapMachine.Wpf/Converts/BoolFinishStrConvert.cs
Normal file
29
CapMachine.Wpf/Converts/BoolFinishStrConvert.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace CapMachine.Wpf.Converts
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Bool到完成字符串转换
|
||||||
|
/// </summary>
|
||||||
|
public class BoolFinishStrConvert : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
if (value == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return (bool)value == true ? "完成" : "无";
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -53,6 +53,11 @@ namespace CapMachine.Wpf.Models
|
|||||||
/// 字节
|
/// 字节
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Byte = 0,
|
Byte = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 字节
|
||||||
|
/// </summary>
|
||||||
|
Bool = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace CapMachine.Wpf.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实例化
|
/// 实例化
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public MachineRunState(string name, IEventAggregator eventAggregator, ConfigService configService)
|
public MachineRunState(string name, IEventAggregator eventAggregator, ConfigService configService, CanDriveService canDriveService, LinDriveService linDriveService)
|
||||||
{
|
{
|
||||||
Name = name;
|
Name = name;
|
||||||
EventAggregator = eventAggregator;
|
EventAggregator = eventAggregator;
|
||||||
@@ -29,7 +29,7 @@ namespace CapMachine.Wpf.Models
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _RunStateMsg="等待";
|
private string _RunStateMsg = "等待";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 运行状态
|
/// 运行状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -39,10 +39,27 @@ namespace CapMachine.Wpf.Models
|
|||||||
set { _RunStateMsg = value; RaisePropertyChanged(); }
|
set { _RunStateMsg = value; RaisePropertyChanged(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _IsRunState;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否运行状态
|
||||||
|
/// </summary>
|
||||||
|
public bool IsRunState
|
||||||
|
{
|
||||||
|
get { return _IsRunState; }
|
||||||
|
set { _IsRunState = value; RaisePropertyChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool _IsProLoad;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PLC程序是否下载
|
/// PLC程序是否下载
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsProLoad { get; set; }
|
public bool IsProLoad
|
||||||
|
{
|
||||||
|
get { return _IsProLoad; }
|
||||||
|
set { _IsProLoad = value; RaisePropertyChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态机
|
/// 状态机
|
||||||
@@ -320,22 +337,33 @@ namespace CapMachine.Wpf.Models
|
|||||||
Console.WriteLine($"{Name}-StopExitCall");
|
Console.WriteLine($"{Name}-StopExitCall");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 进入停止状态
|
||||||
|
/// </summary>
|
||||||
private void StopEntryCall()
|
private void StopEntryCall()
|
||||||
{
|
{
|
||||||
RunStateMsg = "停止";
|
RunStateMsg = "停止";
|
||||||
Console.WriteLine($"{Name}-StopEntryCall");
|
Console.WriteLine($"{Name}-StopEntryCall");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RunExitCall()
|
private void RunExitCall()
|
||||||
{
|
{
|
||||||
|
//退出运行状态
|
||||||
|
IsRunState = false;
|
||||||
Console.WriteLine($"{Name}-RunExitCall");
|
Console.WriteLine($"{Name}-RunExitCall");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 进入运行状态
|
||||||
|
/// </summary>
|
||||||
private void RunEntryCall()
|
private void RunEntryCall()
|
||||||
{
|
{
|
||||||
RunStateMsg = "运行";
|
RunStateMsg = "运行";
|
||||||
Console.WriteLine($"{Name}-RunEntryCall");
|
Console.WriteLine($"{Name}-RunEntryCall");
|
||||||
|
//进入运行状态
|
||||||
|
IsRunState = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AlarmExitCall()
|
private void AlarmExitCall()
|
||||||
@@ -376,5 +404,7 @@ namespace CapMachine.Wpf.Models
|
|||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public IEventAggregator EventAggregator { get; }
|
public IEventAggregator EventAggregator { get; }
|
||||||
public ConfigService ConfigService { get; }
|
public ConfigService ConfigService { get; }
|
||||||
|
public CanDriveService CanDriveService { get; }
|
||||||
|
public LinDriveService LinDriveService { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
39
CapMachine.Wpf/Models/SysExdBoolInfo.cs
Normal file
39
CapMachine.Wpf/Models/SysExdBoolInfo.cs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
using CapMachine.Wpf.Models.Tag;
|
||||||
|
using HslCommunication.Profinet.Siemens;
|
||||||
|
using Prism.Mvvm;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace CapMachine.Wpf.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 布尔的拓展信息
|
||||||
|
/// </summary>
|
||||||
|
public class SysExdBoolInfo:BindableBase
|
||||||
|
{
|
||||||
|
public SysExdBoolInfo(SiemensS7Net siemensS7Net)
|
||||||
|
{
|
||||||
|
QuickTags = new List<QuickTag>()
|
||||||
|
{
|
||||||
|
new QuickTag(siemensS7Net) { Name = "开始状态", Group = "状态", Unit = "", ValueAddress = "V40.0", Precision = 0, ValueType = ComEnum.DataType.Bool, ByteLength = 1 },
|
||||||
|
};
|
||||||
|
|
||||||
|
StartRunStateQuickTag = QuickTags.Find(a=>a.Name== "开始状态")!;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 快速标签
|
||||||
|
/// </summary>
|
||||||
|
public List<QuickTag> QuickTags { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开始运行状态标签
|
||||||
|
/// </summary>
|
||||||
|
public QuickTag StartRunStateQuickTag { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,14 +47,19 @@ namespace CapMachine.Wpf.Models.Tag
|
|||||||
private object? _Value;
|
private object? _Value;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实时值
|
/// 实时值
|
||||||
|
/// 这样会不会导致内存泄露
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object? Value
|
public object? Value
|
||||||
{
|
{
|
||||||
get { return _Value; }
|
get { return _Value; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_Value = value;
|
if (!value.Equals(_Value) )
|
||||||
ValueStr = value?.ToString();
|
{
|
||||||
|
_Value = value;
|
||||||
|
RaisePropertyChanged();
|
||||||
|
ValueStr = value?.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,6 +86,9 @@ namespace CapMachine.Wpf.Models.Tag
|
|||||||
case DataType.Byte:
|
case DataType.Byte:
|
||||||
Value = SiemensS7Net.ByteTransform.TransByte(value!.Content, 0);
|
Value = SiemensS7Net.ByteTransform.TransByte(value!.Content, 0);
|
||||||
break;
|
break;
|
||||||
|
case DataType.Bool:
|
||||||
|
Value = SiemensS7Net.ByteTransform.TransBool(value!.Content, 0);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,6 +198,16 @@ namespace CapMachine.Wpf.ProPars
|
|||||||
//siemensS7NetStance.Write();
|
//siemensS7NetStance.Write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 循环次数下载给PLC
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="siemensS7NetStance"></param>
|
||||||
|
/// <param name="Cycle"></param>
|
||||||
|
public static void LoadProCycleToPlc(SiemensS7Net siemensS7NetStance,int Cycle)
|
||||||
|
{
|
||||||
|
siemensS7NetStance.Write("VW230", (short)Cycle);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单步骤程序解析
|
/// 单步骤程序解析
|
||||||
/// 单步骤里面包括多个仪表参数的配置信息
|
/// 单步骤里面包括多个仪表参数的配置信息
|
||||||
|
|||||||
@@ -143,9 +143,21 @@ namespace CapMachine.Wpf.Services
|
|||||||
{
|
{
|
||||||
SpeedCanCmdData.SignalCmdValue = SpeedData;
|
SpeedCanCmdData.SignalCmdValue = SpeedData;
|
||||||
}
|
}
|
||||||
|
//if (EnableCanCmdData != null)
|
||||||
|
//{
|
||||||
|
// EnableCanCmdData.SignalCmdValue = 1;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新压缩机使能数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="IsEnable"></param>
|
||||||
|
public void UpdateCapEnableCmdData(bool IsEnable)
|
||||||
|
{
|
||||||
if (EnableCanCmdData != null)
|
if (EnableCanCmdData != null)
|
||||||
{
|
{
|
||||||
EnableCanCmdData.SignalCmdValue = 1;
|
EnableCanCmdData.SignalCmdValue = IsEnable ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,10 +118,15 @@ namespace CapMachine.Wpf.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _IsExpInfoOk;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 试验信息是否OK
|
/// 试验信息是否OK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsExpInfoOk { get; set; }
|
public bool IsExpInfoOk
|
||||||
|
{
|
||||||
|
get { return _IsExpInfoOk; }
|
||||||
|
set { _IsExpInfoOk = value; RaisePropertyChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// 当前的试验信息
|
///// 当前的试验信息
|
||||||
|
|||||||
@@ -141,9 +141,22 @@ namespace CapMachine.Wpf.Services
|
|||||||
{
|
{
|
||||||
SpeedLinCmdData.SignalCmdValue = SpeedData;
|
SpeedLinCmdData.SignalCmdValue = SpeedData;
|
||||||
}
|
}
|
||||||
|
//if (EnableLinCmdData != null)
|
||||||
|
//{
|
||||||
|
// EnableLinCmdData.SignalCmdValue = 1;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新压缩机使能数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="IsEnable"></param>
|
||||||
|
public void UpdateCapEnableCmdData(bool IsEnable)
|
||||||
|
{
|
||||||
if (EnableLinCmdData != null)
|
if (EnableLinCmdData != null)
|
||||||
{
|
{
|
||||||
EnableLinCmdData.SignalCmdValue = 1;
|
EnableLinCmdData.SignalCmdValue = IsEnable ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ using CapMachine.Wpf.Models.Tag;
|
|||||||
using CapMachine.Wpf.PrismEvent;
|
using CapMachine.Wpf.PrismEvent;
|
||||||
using HslCommunication;
|
using HslCommunication;
|
||||||
using HslCommunication.Profinet.Siemens;
|
using HslCommunication.Profinet.Siemens;
|
||||||
using ImTools;
|
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
|
||||||
using NPOI.HSSF.Record.Chart;
|
|
||||||
using NPOI.SS.Formula.Atp;
|
|
||||||
using Prism.Events;
|
using Prism.Events;
|
||||||
using Prism.Mvvm;
|
using Prism.Mvvm;
|
||||||
using System;
|
using System;
|
||||||
@@ -81,6 +77,11 @@ namespace CapMachine.Wpf.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public SysExdInfo CurSysExdInfo { get; set; }
|
public SysExdInfo CurSysExdInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 布尔拓展信息
|
||||||
|
/// </summary>
|
||||||
|
public SysExdBoolInfo SysExdBoolInfos { get; set; }
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// Tag数据集合
|
///// Tag数据集合
|
||||||
///// </summary>
|
///// </summary>
|
||||||
@@ -708,7 +709,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
SVAddress = "",
|
SVAddress = "",
|
||||||
MVAddress = "",
|
MVAddress = "",
|
||||||
IsMeter = false,
|
IsMeter = false,
|
||||||
Precision = 1,
|
Precision = 1000,
|
||||||
DecimalPoint = 2,
|
DecimalPoint = 2,
|
||||||
Samp = 1,
|
Samp = 1,
|
||||||
ValueType = typeof(short),
|
ValueType = typeof(short),
|
||||||
@@ -820,9 +821,9 @@ namespace CapMachine.Wpf.Services
|
|||||||
ListHandSwitchData = new List<HandSwitchData>()
|
ListHandSwitchData = new List<HandSwitchData>()
|
||||||
{
|
{
|
||||||
new HandSwitchData(){Name="自动",ActionAddress="M0.0",StateAddress="M0.0" },
|
new HandSwitchData(){Name="自动",ActionAddress="M0.0",StateAddress="M0.0" },
|
||||||
new HandSwitchData(){Name="抽真空",ActionAddress="M0.1",StateAddress="M0.1" },
|
new HandSwitchData(){Name="抽真空",ActionAddress="M0.1",StateAddress="V15.2" },
|
||||||
new HandSwitchData(){Name="复位",ActionAddress="M0.2",StateAddress="M0.2" },
|
//new HandSwitchData(){Name="复位",ActionAddress="M0.2",StateAddress="M0.2" },放到上侧的按钮区域了
|
||||||
new HandSwitchData(){Name="消音",ActionAddress="M0.3",StateAddress="M0.3" },
|
//new HandSwitchData(){Name="消音",ActionAddress="M0.3",StateAddress="M0.3" },放到上侧的按钮区域了
|
||||||
new HandSwitchData(){Name="HV电源",ActionAddress="M1.1",StateAddress="Q0.1" },
|
new HandSwitchData(){Name="HV电源",ActionAddress="M1.1",StateAddress="Q0.1" },
|
||||||
new HandSwitchData(){Name="HV启动",ActionAddress="M1.2",StateAddress="Q0.6" },
|
new HandSwitchData(){Name="HV启动",ActionAddress="M1.2",StateAddress="Q0.6" },
|
||||||
new HandSwitchData(){Name="LV电源",ActionAddress="M1.3",StateAddress="Q0.2" },
|
new HandSwitchData(){Name="LV电源",ActionAddress="M1.3",StateAddress="Q0.2" },
|
||||||
@@ -866,7 +867,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
|
|
||||||
//拓展的参数信息
|
//拓展的参数信息
|
||||||
CurSysExdInfo = new SysExdInfo(SiemensDrive);
|
CurSysExdInfo = new SysExdInfo(SiemensDrive);
|
||||||
|
SysExdBoolInfos = new SysExdBoolInfo(SiemensDrive);
|
||||||
//PubRtDataStart();
|
//PubRtDataStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -958,21 +959,44 @@ namespace CapMachine.Wpf.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 程序暂停
|
/// 程序暂停
|
||||||
|
/// 取反
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool SysPause()
|
public bool SysPause()
|
||||||
{
|
{
|
||||||
var Result = SiemensDrive.Write("M0.6", true);
|
var StateResult = SiemensDrive.ReadBool("M0.6");
|
||||||
if (Result.IsSuccess)
|
if (StateResult.IsSuccess)
|
||||||
{
|
{
|
||||||
return true;
|
if (StateResult.Content == true)
|
||||||
}
|
{
|
||||||
else
|
var Result = SiemensDrive.Write("M0.6", false);
|
||||||
{
|
if (Result.IsSuccess)
|
||||||
return false;
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var Result = SiemensDrive.Write("M0.6", true);
|
||||||
|
if (Result.IsSuccess)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -1069,6 +1093,11 @@ namespace CapMachine.Wpf.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private OperateResult<bool[]> OperateResultAlarm { get; set; }
|
private OperateResult<bool[]> OperateResultAlarm { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CAP的使能状态
|
||||||
|
/// </summary>
|
||||||
|
private OperateResult<bool> OperateResultCapEnable { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 时间诊断
|
/// 时间诊断
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1155,18 +1184,18 @@ namespace CapMachine.Wpf.Services
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(itemTag.Value.NameNoUnit == "通讯母线电压")
|
else if (itemTag.Value.NameNoUnit == "通讯母线电压")
|
||||||
{
|
{
|
||||||
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||||
{
|
{
|
||||||
case CanLinEnum.Can:
|
case CanLinEnum.Can:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯母线电压"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(CanDriveService.GetDbcValueByName("通讯母线电压") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
case CanLinEnum.Lin:
|
case CanLinEnum.Lin:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯母线电压"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(LinDriveService.GetLdfValueByName("通讯母线电压") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1179,12 +1208,12 @@ namespace CapMachine.Wpf.Services
|
|||||||
{
|
{
|
||||||
case CanLinEnum.Can:
|
case CanLinEnum.Can:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯母线电流"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(CanDriveService.GetDbcValueByName("通讯母线电流") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
case CanLinEnum.Lin:
|
case CanLinEnum.Lin:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯母线电流"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(LinDriveService.GetLdfValueByName("通讯母线电流") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1197,12 +1226,12 @@ namespace CapMachine.Wpf.Services
|
|||||||
{
|
{
|
||||||
case CanLinEnum.Can:
|
case CanLinEnum.Can:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯相电流"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(CanDriveService.GetDbcValueByName("通讯相电流") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
case CanLinEnum.Lin:
|
case CanLinEnum.Lin:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯相电流"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(LinDriveService.GetLdfValueByName("通讯相电流") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1215,12 +1244,12 @@ namespace CapMachine.Wpf.Services
|
|||||||
{
|
{
|
||||||
case CanLinEnum.Can:
|
case CanLinEnum.Can:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯功率"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(CanDriveService.GetDbcValueByName("通讯功率") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
case CanLinEnum.Lin:
|
case CanLinEnum.Lin:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯功率"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(LinDriveService.GetLdfValueByName("通讯功率") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1233,12 +1262,12 @@ namespace CapMachine.Wpf.Services
|
|||||||
{
|
{
|
||||||
case CanLinEnum.Can:
|
case CanLinEnum.Can:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)CanDriveService.GetDbcSpeedValueBySpeedName("通讯芯片温度"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(CanDriveService.GetDbcValueByName("通讯芯片温度") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
case CanLinEnum.Lin:
|
case CanLinEnum.Lin:
|
||||||
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
//通信转速 Dbc中间配置名称的转速数据读取出来 给PLC
|
||||||
SiemensDrive.Write(itemTag.Value.PVAddress, (short)LinDriveService.GetLdfSpeedValueBySpeedName("通讯芯片温度"));
|
SiemensDrive.Write(itemTag.Value.PVAddress, (short)(LinDriveService.GetLdfValueByName("通讯芯片温度") * itemTag.Value.Precision));
|
||||||
//itemTag.Value.EngPvValue = 0;
|
//itemTag.Value.EngPvValue = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1300,8 +1329,23 @@ namespace CapMachine.Wpf.Services
|
|||||||
//在运行时,更新速度的SV的值
|
//在运行时,更新速度的SV的值
|
||||||
if (itemTag.Value.Name == "转速[rpm]" && SysRunService.MachineRunState1.RunStateMsg == "运行")
|
if (itemTag.Value.Name == "转速[rpm]" && SysRunService.MachineRunState1.RunStateMsg == "运行")
|
||||||
{
|
{
|
||||||
//更新SV的速度值
|
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||||
CanDriveService.UpdateSpeedCmdData(TagManger.GetTagByName<short>(itemTag.Value.Name)!.EngSvValue);
|
{
|
||||||
|
case CanLinEnum.Can:
|
||||||
|
//获取PLC的SV数据 更新SV的速度值到压缩机
|
||||||
|
CanDriveService.UpdateSpeedCmdData(itemTag!.Value.EngSvValue);
|
||||||
|
//itemTag.Value.EngPvValue = 0;
|
||||||
|
break;
|
||||||
|
case CanLinEnum.Lin:
|
||||||
|
//获取PLC的SV数据 更新SV的速度值到压缩机
|
||||||
|
LinDriveService.UpdateSpeedCmdData(itemTag!.Value.EngSvValue);
|
||||||
|
//itemTag.Value.EngPvValue = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
////更新SV的速度值
|
||||||
|
//CanDriveService.UpdateSpeedCmdData(TagManger.GetTagByName<short>(itemTag.Value.Name)!.EngSvValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1356,6 +1400,25 @@ namespace CapMachine.Wpf.Services
|
|||||||
if (item.StateOperateResult.IsSuccess)
|
if (item.StateOperateResult.IsSuccess)
|
||||||
{
|
{
|
||||||
item.State = item.StateOperateResult.Content;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1365,6 +1428,11 @@ namespace CapMachine.Wpf.Services
|
|||||||
itemQuickTag.OperateResultSource = SiemensDrive.Read(itemQuickTag.ValueAddress, itemQuickTag.ByteLength);
|
itemQuickTag.OperateResultSource = SiemensDrive.Read(itemQuickTag.ValueAddress, itemQuickTag.ByteLength);
|
||||||
}
|
}
|
||||||
CurSysExdInfo.SumRunTime();
|
CurSysExdInfo.SumRunTime();
|
||||||
|
//布尔拓展信息的展示
|
||||||
|
foreach (var itemQuickTag in SysExdBoolInfos.QuickTags)
|
||||||
|
{
|
||||||
|
itemQuickTag.OperateResultSource = SiemensDrive.Read(itemQuickTag.ValueAddress, itemQuickTag.ByteLength);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -1374,7 +1442,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
DiagnosticsTime.Stop();
|
DiagnosticsTime.Stop();
|
||||||
ConfigService.PlcCycleTime = (int)DiagnosticsTime.Elapsed.TotalMilliseconds-300;
|
ConfigService.PlcCycleTime = (int)DiagnosticsTime.Elapsed.TotalMilliseconds - 300;
|
||||||
//Console.WriteLine($"扫描时间:{DiagnosticsTime.Elapsed.TotalMilliseconds.ToString()}");
|
//Console.WriteLine($"扫描时间:{DiagnosticsTime.Elapsed.TotalMilliseconds.ToString()}");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1394,21 +1462,21 @@ namespace CapMachine.Wpf.Services
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await Task.Delay(1000);
|
await Task.Delay(1000);
|
||||||
_EventAggregator.GetEvent<ChartRtEvent>().Publish(new List<Models.ChartRtValue>()
|
//_EventAggregator.GetEvent<ChartRtEvent>().Publish(new List<Models.ChartRtValue>()
|
||||||
{
|
//{
|
||||||
new Models.ChartRtValue(){Name="EVA风量",Value=random.NextDouble()*100,Unit="℃"},
|
// new Models.ChartRtValue(){Name="EVA风量",Value=random.NextDouble()*100,Unit="℃"},
|
||||||
new Models.ChartRtValue(){Name="中间轴转速",Value=random.NextDouble()*100,Unit="℃"},
|
// new Models.ChartRtValue(){Name="中间轴转速",Value=random.NextDouble()*100,Unit="℃"},
|
||||||
new Models.ChartRtValue(){Name="加热电力",Value=random.NextDouble()*100,Unit="℃"},
|
// new Models.ChartRtValue(){Name="加热电力",Value=random.NextDouble()*100,Unit="℃"},
|
||||||
new Models.ChartRtValue(){Name="加湿电力",Value=random.NextDouble()*100,Unit="℃"},
|
// new Models.ChartRtValue(){Name="加湿电力",Value=random.NextDouble()*100,Unit="℃"},
|
||||||
new Models.ChartRtValue(){Name="EMPCV电流",Value=random.NextDouble()*100,Unit="℃"},
|
// new Models.ChartRtValue(){Name="EMPCV电流",Value=random.NextDouble()*100,Unit="℃"},
|
||||||
new Models.ChartRtValue(){Name="INJ压力",Value=random.NextDouble()*100,Unit="℃"},
|
// new Models.ChartRtValue(){Name="INJ压力",Value=random.NextDouble()*100,Unit="℃"},
|
||||||
new Models.ChartRtValue(){Name="冷媒流量",Value=random.NextDouble()*100,Unit="℃"},
|
// new Models.ChartRtValue(){Name="冷媒流量",Value=random.NextDouble()*100,Unit="℃"},
|
||||||
});
|
//});
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
var dd = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class SysRunService : BindableBase
|
public class SysRunService : BindableBase
|
||||||
{
|
{
|
||||||
public SysRunService(IEventAggregator eventAggregator,ConfigService configService)
|
public SysRunService(IEventAggregator eventAggregator,ConfigService configService,CanDriveService canDriveService,LinDriveService linDriveService)
|
||||||
{
|
{
|
||||||
// 创建一个定时器,设置间隔时间为2000毫秒(即2秒)
|
// 创建一个定时器,设置间隔时间为2000毫秒(即2秒)
|
||||||
CurTimer = new System.Timers.Timer(5000);
|
CurTimer = new System.Timers.Timer(5000);
|
||||||
@@ -26,7 +26,9 @@ namespace CapMachine.Wpf.Services
|
|||||||
|
|
||||||
EventAggregator = eventAggregator;
|
EventAggregator = eventAggregator;
|
||||||
ConfigService = configService;
|
ConfigService = configService;
|
||||||
MachineRunState1 = new MachineRunState("M1", EventAggregator, ConfigService);
|
CanDriveService = canDriveService;
|
||||||
|
LinDriveService = linDriveService;
|
||||||
|
MachineRunState1 = new MachineRunState("M1", EventAggregator, ConfigService,canDriveService,linDriveService);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +38,6 @@ namespace CapMachine.Wpf.Services
|
|||||||
public MachineRunState MachineRunState1 { get; set; }
|
public MachineRunState MachineRunState1 { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void CurTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
private void CurTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
CurDateTime = DateTime.Now;
|
CurDateTime = DateTime.Now;
|
||||||
@@ -63,5 +64,7 @@ namespace CapMachine.Wpf.Services
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IEventAggregator EventAggregator { get; }
|
public IEventAggregator EventAggregator { get; }
|
||||||
public ConfigService ConfigService { get; }
|
public ConfigService ConfigService { get; }
|
||||||
|
public CanDriveService CanDriveService { get; }
|
||||||
|
public LinDriveService LinDriveService { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -827,8 +827,13 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
{
|
{
|
||||||
//打开连接
|
//打开连接
|
||||||
CanDriveService.ToomossCanDrive.StartCanDrive();
|
CanDriveService.ToomossCanDrive.StartCanDrive();
|
||||||
//系统使用了CAN
|
//成功后状态显示
|
||||||
ConfigService.CanLinRunStateModel.CurSysSelectedCanLin = CanLinEnum.Can;
|
if (CanDriveService.ToomossCanDrive.OpenState)
|
||||||
|
{
|
||||||
|
//系统使用了CAN
|
||||||
|
ConfigService.CanLinRunStateModel.CurSysSelectedCanLin = CanLinEnum.Can;
|
||||||
|
}
|
||||||
|
|
||||||
//CAN DBC配置 有DBC配置的话,则直接加载DBC信息
|
//CAN DBC配置 有DBC配置的话,则直接加载DBC信息
|
||||||
if (!string.IsNullOrEmpty(SelectCanLinConfigPro.CANConfigExd.DbcPath))
|
if (!string.IsNullOrEmpty(SelectCanLinConfigPro.CANConfigExd.DbcPath))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,16 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
set { name = value; RaisePropertyChanged(); }
|
set { name = value; RaisePropertyChanged(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int _ProRepeat;
|
||||||
|
/// <summary>
|
||||||
|
/// 程序的循环次数
|
||||||
|
/// </summary>
|
||||||
|
public int ProRepeat
|
||||||
|
{
|
||||||
|
get { return _ProRepeat; }
|
||||||
|
set { _ProRepeat = value; RaisePropertyChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
private DelegateCommand saveCmd;
|
private DelegateCommand saveCmd;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存命令
|
/// 保存命令
|
||||||
@@ -56,7 +66,8 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
|
|
||||||
DialogParameters pars = new DialogParameters
|
DialogParameters pars = new DialogParameters
|
||||||
{
|
{
|
||||||
{ "Name", Name }
|
{ "Name", Name },
|
||||||
|
{ "ProRepeat", ProRepeat }
|
||||||
};
|
};
|
||||||
|
|
||||||
RaiseRequestClose(new DialogResult(ButtonResult.OK, pars));
|
RaiseRequestClose(new DialogResult(ButtonResult.OK, pars));
|
||||||
@@ -97,6 +108,7 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
public override void OnDialogOpened(IDialogParameters parameters)
|
public override void OnDialogOpened(IDialogParameters parameters)
|
||||||
{
|
{
|
||||||
Name = parameters.GetValue<string>("Name");
|
Name = parameters.GetValue<string>("Name");
|
||||||
|
ProRepeat= parameters.GetValue<int>("ProRepeat");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
DataRecordService = dataRecordService;
|
DataRecordService = dataRecordService;
|
||||||
ConfigService = configService;
|
ConfigService = configService;
|
||||||
MachineRtDataService = machineRtDataService;
|
MachineRtDataService = machineRtDataService;
|
||||||
SysService = sysService;
|
SysRunService = sysService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataRecordService DataRecordService { get; }
|
public DataRecordService DataRecordService { get; }
|
||||||
public ConfigService ConfigService { get; }
|
public ConfigService ConfigService { get; }
|
||||||
public MachineRtDataService MachineRtDataService { get; }
|
public MachineRtDataService MachineRtDataService { get; }
|
||||||
public SysRunService SysService { get; }
|
public SysRunService SysRunService { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -818,8 +818,13 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
{
|
{
|
||||||
//打开连接
|
//打开连接
|
||||||
LinDriveService.ToomossLinDrive.StartLinDrive();
|
LinDriveService.ToomossLinDrive.StartLinDrive();
|
||||||
//系统使用了LIN
|
//成功后状态显示
|
||||||
ConfigService.CanLinRunStateModel.CurSysSelectedCanLin = CanLinEnum.Lin;
|
if (LinDriveService.ToomossLinDrive.OpenState)
|
||||||
|
{
|
||||||
|
//系统使用了LIN
|
||||||
|
ConfigService.CanLinRunStateModel.CurSysSelectedCanLin = CanLinEnum.Lin;
|
||||||
|
}
|
||||||
|
|
||||||
//LIN LDF配置 有LDF配置的话,则直接加载LDF信息
|
//LIN LDF配置 有LDF配置的话,则直接加载LDF信息
|
||||||
if (!string.IsNullOrEmpty(SelectCanLinConfigPro.LINConfigExd.LdfPath))
|
if (!string.IsNullOrEmpty(SelectCanLinConfigPro.LINConfigExd.LdfPath))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using Prism.Events;
|
|||||||
using Prism.Services.Dialogs;
|
using Prism.Services.Dialogs;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Windows.Controls.Primitives;
|
using System.Windows.Controls.Primitives;
|
||||||
|
using static CapMachine.Wpf.Models.ComEnum;
|
||||||
|
|
||||||
namespace CapMachine.Wpf.ViewModels
|
namespace CapMachine.Wpf.ViewModels
|
||||||
{
|
{
|
||||||
@@ -26,7 +27,7 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
/// <param name="machineRtDataService"></param>
|
/// <param name="machineRtDataService"></param>
|
||||||
/// <param name="dialogService"></param>
|
/// <param name="dialogService"></param>
|
||||||
public MonitorViewModel(ConfigService configService, IEventAggregator eventAggregator,
|
public MonitorViewModel(ConfigService configService, IEventAggregator eventAggregator,
|
||||||
DataRecordService dataRecordService, SysRunService sysRunService, AlarmService alarmService,PPCService pPCService,
|
DataRecordService dataRecordService, SysRunService sysRunService, AlarmService alarmService, PPCService pPCService,CanDriveService canDriveService,LinDriveService linDriveService,
|
||||||
MachineRtDataService machineRtDataService, IDialogService dialogService)
|
MachineRtDataService machineRtDataService, IDialogService dialogService)
|
||||||
{
|
{
|
||||||
ConfigService = configService;
|
ConfigService = configService;
|
||||||
@@ -36,6 +37,8 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
SysRunServer = sysRunService;
|
SysRunServer = sysRunService;
|
||||||
AlarmService = alarmService;
|
AlarmService = alarmService;
|
||||||
PPCService = pPCService;
|
PPCService = pPCService;
|
||||||
|
CanDriveService = canDriveService;
|
||||||
|
LinDriveService = linDriveService;
|
||||||
MachineRtDataService = machineRtDataService;
|
MachineRtDataService = machineRtDataService;
|
||||||
DialogService = dialogService;
|
DialogService = dialogService;
|
||||||
TagManager = MachineRtDataService.TagManger;
|
TagManager = MachineRtDataService.TagManger;
|
||||||
@@ -71,6 +74,8 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
public SysRunService SysRunServer { get; }
|
public SysRunService SysRunServer { get; }
|
||||||
public AlarmService AlarmService { get; }
|
public AlarmService AlarmService { get; }
|
||||||
public PPCService PPCService { get; }
|
public PPCService PPCService { get; }
|
||||||
|
public CanDriveService CanDriveService { get; }
|
||||||
|
public LinDriveService LinDriveService { get; }
|
||||||
public MachineRtDataService MachineRtDataService { get; }
|
public MachineRtDataService MachineRtDataService { get; }
|
||||||
public IDialogService DialogService { get; }
|
public IDialogService DialogService { get; }
|
||||||
public List<ChartRtValue> ListChartRtValue { get; set; } = new List<ChartRtValue>()
|
public List<ChartRtValue> ListChartRtValue { get; set; } = new List<ChartRtValue>()
|
||||||
@@ -230,17 +235,60 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
|
|
||||||
this.SysRunServer.MachineRunState1.FireEnd();
|
this.SysRunServer.MachineRunState1.FireEnd();
|
||||||
DataRecordService.EndRecord();
|
DataRecordService.EndRecord();
|
||||||
|
|
||||||
|
//结束运行的时候,需要将压缩机的速度值设置为0
|
||||||
|
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||||
|
{
|
||||||
|
case CanLinEnum.Can:
|
||||||
|
//获取PLC的SV数据 更新SV的速度值到压缩机
|
||||||
|
CanDriveService.UpdateSpeedCmdData(0);
|
||||||
|
//itemTag.Value.EngPvValue = 0;
|
||||||
|
break;
|
||||||
|
case CanLinEnum.Lin:
|
||||||
|
//获取PLC的SV数据 更新SV的速度值到压缩机
|
||||||
|
LinDriveService.UpdateSpeedCmdData(0);
|
||||||
|
//itemTag.Value.EngPvValue = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "复位":
|
case "复位":
|
||||||
MachineRtDataService.SysReset();
|
MachineRtDataService.SysReset();
|
||||||
|
|
||||||
this.SysRunServer.MachineRunState1.FireReset();
|
this.SysRunServer.MachineRunState1.FireReset();
|
||||||
DataRecordService.EndRecord();
|
DataRecordService.EndRecord();
|
||||||
|
|
||||||
|
//结束运行的时候,需要将压缩机的速度值设置为0
|
||||||
|
switch (ConfigService.CanLinRunStateModel.CurSysSelectedCanLin)
|
||||||
|
{
|
||||||
|
case CanLinEnum.Can:
|
||||||
|
//获取PLC的SV数据 更新SV的速度值到压缩机
|
||||||
|
CanDriveService.UpdateSpeedCmdData(0);
|
||||||
|
//itemTag.Value.EngPvValue = 0;
|
||||||
|
break;
|
||||||
|
case CanLinEnum.Lin:
|
||||||
|
//获取PLC的SV数据 更新SV的速度值到压缩机
|
||||||
|
LinDriveService.UpdateSpeedCmdData(0);
|
||||||
|
//itemTag.Value.EngPvValue = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "消音":
|
case "消音":
|
||||||
|
|
||||||
MachineRtDataService.SysMute();
|
MachineRtDataService.SysMute();
|
||||||
|
|
||||||
|
//ShowDialogExpInfo();
|
||||||
|
break;
|
||||||
|
case "暂停":
|
||||||
|
|
||||||
|
MachineRtDataService.SysPause();
|
||||||
|
|
||||||
//ShowDialogExpInfo();
|
//ShowDialogExpInfo();
|
||||||
break;
|
break;
|
||||||
case "试验信息":
|
case "试验信息":
|
||||||
|
|||||||
@@ -389,23 +389,26 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
//弹窗
|
//弹窗
|
||||||
DialogService.ShowDialog("DialogEditProView", new DialogParameters() { { "Name", SelectedProgramSeg.Name } }, (par) =>
|
DialogService.ShowDialog("DialogEditProView", new DialogParameters() { { "Name", SelectedProgramSeg.Name }, { "ProRepeat", SelectedProgramSeg.ProRepeat } }, (par) =>
|
||||||
{
|
{
|
||||||
if (par.Result == ButtonResult.OK)
|
if (par.Result == ButtonResult.OK)
|
||||||
{
|
{
|
||||||
//程序名称
|
//程序名称
|
||||||
var ReturnValue = par.Parameters.GetValue<string>("Name");
|
var ReturnValue = par.Parameters.GetValue<string>("Name");
|
||||||
//查询是否重复
|
var ReturnProRepeat = par.Parameters.GetValue<int>("ProRepeat");
|
||||||
var count = FreeSql.Select<ProgramSeg>().Where(a => a.Name == ReturnValue).Count();
|
|
||||||
if (count > 0)
|
////查询是否重复,可能只更改了次数,所以不再校验名称是否改变
|
||||||
{
|
//var count = FreeSql.Select<ProgramSeg>().Where(a => a.Name == ReturnValue).Count();
|
||||||
MessageBox.Show("名称已经存在了");
|
//if (count > 0)
|
||||||
return;
|
//{
|
||||||
}
|
// MessageBox.Show("名称已经存在了");
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
//开始修改
|
//开始修改
|
||||||
var InsertedData = FreeSql.Update<ProgramSeg>()
|
var InsertedData = FreeSql.Update<ProgramSeg>()
|
||||||
.Set(a => a.Name, ReturnValue)
|
.Set(a => a.Name, ReturnValue)
|
||||||
|
.Set(a => a.ProRepeat, ReturnProRepeat)
|
||||||
.Where(a => a.Id == SelectedProgramSeg.Id)
|
.Where(a => a.Id == SelectedProgramSeg.Id)
|
||||||
.ExecuteUpdated();
|
.ExecuteUpdated();
|
||||||
|
|
||||||
@@ -2355,7 +2358,8 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
{
|
{
|
||||||
//执行程序的步骤集合数据
|
//执行程序的步骤集合数据
|
||||||
ReturnPlcParsData = ProParsSongZhiHelper.GetPlcParsData(FindData.ProSteps, FindData.ProRepeat);
|
ReturnPlcParsData = ProParsSongZhiHelper.GetPlcParsData(FindData.ProSteps, FindData.ProRepeat);
|
||||||
|
//把次数给PLC,那么此时应该是最后一个程序给PLC了
|
||||||
|
ProParsSongZhiHelper.LoadProCycleToPlc(MachineRtDataService.SiemensDrive, FindData.ProRepeat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2365,6 +2369,7 @@ namespace CapMachine.Wpf.ViewModels
|
|||||||
ReturnPlcParsData = ProParsSongZhiHelper.LoadPlcCellAddress(ReturnPlcParsData);
|
ReturnPlcParsData = ProParsSongZhiHelper.LoadPlcCellAddress(ReturnPlcParsData);
|
||||||
|
|
||||||
ProParsSongZhiHelper.LoadDataToPLC(MachineRtDataService.SiemensDrive, ReturnPlcParsData);
|
ProParsSongZhiHelper.LoadDataToPLC(MachineRtDataService.SiemensDrive, ReturnPlcParsData);
|
||||||
|
|
||||||
//下载完成的话,则标记状态
|
//下载完成的话,则标记状态
|
||||||
SysRunService.MachineRunState1.IsProLoad = true;
|
SysRunService.MachineRunState1.IsProLoad = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -933,7 +933,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="1">
|
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="1">
|
||||||
<Setter Property="Background" Value="GreenYellow" />
|
<Setter Property="Background" Value="LightGreen" />
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="2">
|
<DataTrigger Binding="{Binding IsSeletedInfo}" Value="2">
|
||||||
<Setter Property="Background" Value="SkyBlue" />
|
<Setter Property="Background" Value="SkyBlue" />
|
||||||
|
|||||||
@@ -14,31 +14,63 @@
|
|||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="70"
|
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Orientation="Horizontal">
|
VerticalAlignment="Center"
|
||||||
<TextBlock
|
Orientation="Vertical">
|
||||||
Margin="10,0,5,0"
|
<StackPanel
|
||||||
VerticalAlignment="Center"
|
Margin="70,10"
|
||||||
FontFamily="/Assets/Fonts/#iconfont"
|
|
||||||
FontSize="24"
|
|
||||||
Foreground="Blue"
|
|
||||||
Text="" />
|
|
||||||
<TextBlock
|
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
Orientation="Horizontal">
|
||||||
FontSize="24"
|
<TextBlock
|
||||||
Text="程序名称:"
|
Margin="10,0,5,0"
|
||||||
TextAlignment="Center" />
|
VerticalAlignment="Center"
|
||||||
<TextBox
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
Width="300"
|
FontSize="24"
|
||||||
VerticalAlignment="Center"
|
Foreground="Blue"
|
||||||
BorderBrush="Gray"
|
Text="" />
|
||||||
BorderThickness="1"
|
<TextBlock
|
||||||
FontSize="24"
|
HorizontalAlignment="Center"
|
||||||
Text="{Binding Name}" />
|
VerticalAlignment="Center"
|
||||||
|
FontSize="24"
|
||||||
|
Text="程序名称:"
|
||||||
|
TextAlignment="Center" />
|
||||||
|
<TextBox
|
||||||
|
Width="300"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="Gray"
|
||||||
|
BorderThickness="1"
|
||||||
|
FontSize="24"
|
||||||
|
Text="{Binding Name}" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel
|
||||||
|
Margin="70,10"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
Margin="10,0,5,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
|
FontSize="24"
|
||||||
|
Foreground="Blue"
|
||||||
|
Text="" />
|
||||||
|
<TextBlock
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="24"
|
||||||
|
Text="循环次数:"
|
||||||
|
TextAlignment="Center" />
|
||||||
|
<TextBox
|
||||||
|
Width="300"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
BorderBrush="Gray"
|
||||||
|
BorderThickness="1"
|
||||||
|
FontSize="24"
|
||||||
|
Text="{Binding ProRepeat}" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<convert:BoolOkStrConvert x:Key="BoolOkStrConvert" />
|
<convert:BoolOkStrConvert x:Key="BoolOkStrConvert" />
|
||||||
<convert:BoolStateStrConvert x:Key="BoolStateStrConvert" />
|
<convert:BoolStateStrConvert x:Key="BoolStateStrConvert" />
|
||||||
|
<convert:BoolFinishStrConvert x:Key="BoolFinishStrConvert" />
|
||||||
<Style x:Key="BoardStyle" TargetType="Border">
|
<Style x:Key="BoardStyle" TargetType="Border">
|
||||||
<Setter Property="Background" Value="Gray" />
|
<Setter Property="Background" Value="Gray" />
|
||||||
<Setter Property="Margin" Value="5,1" />
|
<Setter Property="Margin" Value="5,1" />
|
||||||
@@ -42,6 +43,96 @@
|
|||||||
Visibility="Visible" />
|
Visibility="Visible" />
|
||||||
</Border>
|
</Border>
|
||||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||||
|
<Border>
|
||||||
|
<Border.Style>
|
||||||
|
<Style BasedOn="{StaticResource BoardStyle}" TargetType="Border">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding SysRunService.MachineRunState1.IsRunState}" Value="true">
|
||||||
|
<Setter Property="Background" Value="LimeGreen" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<StackPanel Style="{StaticResource StackPanelStyle}">
|
||||||
|
<TextBlock
|
||||||
|
Margin="5,0,5,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text=" " />
|
||||||
|
<TextBlock
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text="系统状态:" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="5,0"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text="{Binding SysRunService.MachineRunState1.RunStateMsg}" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border>
|
||||||
|
<Border.Style>
|
||||||
|
<Style BasedOn="{StaticResource BoardStyle}" TargetType="Border">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding SysRunService.MachineRunState1.IsProLoad}" Value="true">
|
||||||
|
<Setter Property="Background" Value="LimeGreen" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<StackPanel Style="{StaticResource StackPanelStyle}">
|
||||||
|
<TextBlock
|
||||||
|
Margin="5,0,5,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text=" " />
|
||||||
|
<TextBlock
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text="程序下载:" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="5,0"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text="{Binding SysRunService.MachineRunState1.IsProLoad, Converter={StaticResource BoolFinishStrConvert}}" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<Border>
|
||||||
|
<Border.Style>
|
||||||
|
<Style BasedOn="{StaticResource BoardStyle}" TargetType="Border">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ConfigService.IsExpInfoOk}" Value="true">
|
||||||
|
<Setter Property="Background" Value="LimeGreen" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<StackPanel Style="{StaticResource StackPanelStyle}">
|
||||||
|
<TextBlock
|
||||||
|
Margin="5,0,5,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text=" " />
|
||||||
|
<TextBlock
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text="试验名称:" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="5,0"
|
||||||
|
FontSize="16"
|
||||||
|
Foreground="White"
|
||||||
|
Text="{Binding ConfigService.CurExpInfo.Name}" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
<Border>
|
<Border>
|
||||||
<Border.Style>
|
<Border.Style>
|
||||||
<Style BasedOn="{StaticResource BoardStyle}" TargetType="Border">
|
<Style BasedOn="{StaticResource BoardStyle}" TargetType="Border">
|
||||||
|
|||||||
@@ -346,7 +346,7 @@
|
|||||||
Command="{Binding OperCmd}"
|
Command="{Binding OperCmd}"
|
||||||
CommandParameter="开始"
|
CommandParameter="开始"
|
||||||
GroupName="OpRunStop"
|
GroupName="OpRunStop"
|
||||||
IsChecked="False"
|
IsChecked="{Binding MachineRtDataService.SysExdBoolInfos.StartRunStateQuickTag.Value}"
|
||||||
Style="{StaticResource MaterialDesignChoiceChipSecondaryRadioButton}">
|
Style="{StaticResource MaterialDesignChoiceChipSecondaryRadioButton}">
|
||||||
<RadioButton.Content>
|
<RadioButton.Content>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
@@ -415,6 +415,22 @@
|
|||||||
<TextBlock Text="复位" />
|
<TextBlock Text="复位" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
Margin="5,0"
|
||||||
|
Command="{Binding OperCmd}"
|
||||||
|
CommandParameter="暂停"
|
||||||
|
Foreground="White">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock
|
||||||
|
Margin="2,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontFamily="/Assets/Fonts/#iconfont"
|
||||||
|
FontSize="14"
|
||||||
|
Foreground="White"
|
||||||
|
Text="" />
|
||||||
|
<TextBlock Text="暂停" />
|
||||||
|
</StackPanel>
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
Margin="5,0"
|
Margin="5,0"
|
||||||
Command="{Binding OperCmd}"
|
Command="{Binding OperCmd}"
|
||||||
@@ -447,12 +463,12 @@
|
|||||||
<TextBlock Text="试验信息" />
|
<TextBlock Text="试验信息" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<!--<Button
|
||||||
Margin="5,0"
|
Margin="5,0"
|
||||||
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
|
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
|
||||||
CommandParameter="{x:Static Dock.Left}"
|
CommandParameter="{x:Static Dock.Left}"
|
||||||
Content="{materialDesign:PackIcon Kind=ArrowUp}"
|
Content="{materialDesign:PackIcon Kind=ArrowUp}"
|
||||||
Foreground="White" />
|
Foreground="White" />-->
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</materialDesign:Card>
|
</materialDesign:Card>
|
||||||
@@ -952,7 +968,7 @@
|
|||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
CellTitle="功率"
|
CellTitle="功率"
|
||||||
CellUnit="Kw"
|
CellUnit="{Binding ComCapPwTag.Unit}"
|
||||||
CellValue="{Binding ComCapPwTag.EngPvValueStr}" />
|
CellValue="{Binding ComCapPwTag.EngPvValueStr}" />
|
||||||
<Controls:ValueShow
|
<Controls:ValueShow
|
||||||
Canvas.Left="105"
|
Canvas.Left="105"
|
||||||
|
|||||||
@@ -1273,7 +1273,7 @@
|
|||||||
<TextBox Style="{StaticResource txtboxStyle}" Text="{Binding SelectedSlopMeterSpeed.ParNo}" />
|
<TextBox Style="{StaticResource txtboxStyle}" Text="{Binding SelectedSlopMeterSpeed.ParNo}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Grid.Column="2" HorizontalAlignment="Center">
|
<StackPanel Grid.Column="2" HorizontalAlignment="Center">
|
||||||
<TextBlock FontSize="12" Text="EV(1~2)" />
|
<TextBlock FontSize="12" Text="EV(1~3)" />
|
||||||
<TextBox Style="{StaticResource txtboxStyle}" Text="{Binding SelectedSlopMeterSpeed.Ev}" />
|
<TextBox Style="{StaticResource txtboxStyle}" Text="{Binding SelectedSlopMeterSpeed.Ev}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Grid.Column="3" HorizontalAlignment="Center">
|
<StackPanel Grid.Column="3" HorizontalAlignment="Center">
|
||||||
|
|||||||
Reference in New Issue
Block a user