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