补全其他参数的下载参数
运行 停止 暂停的防呆操作
This commit is contained in:
@@ -20,7 +20,32 @@ namespace CapMachine.Wpf.Models
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
public string? Address { get; set; }
|
||||
public string? SvAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Pid_P
|
||||
/// </summary>
|
||||
public string? Pid_PAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Pid_I
|
||||
/// </summary>
|
||||
public string? Pid_IAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Pid_D
|
||||
/// </summary>
|
||||
public string? Pid_DAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Limit_Up
|
||||
/// </summary>
|
||||
public string? Limit_UpAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Limit_Down
|
||||
/// </summary>
|
||||
public string? Limit_DownAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 精度 1,10,100,1000
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CapMachine.Wpf.ChannelModel;
|
||||
using AngleSharp.Dom.Events;
|
||||
using CapMachine.Wpf.ChannelModel;
|
||||
using CapMachine.Wpf.Services;
|
||||
using ImTools;
|
||||
using Masuit.Tools;
|
||||
@@ -34,8 +35,13 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
CycleTimer.AutoReset = true;
|
||||
CycleTimer.Enabled = true;
|
||||
CycleTimer.Start();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否是速度仪表参数
|
||||
/// </summary>
|
||||
public bool IsSpeed { get; set; }=false;
|
||||
|
||||
/// <summary>
|
||||
/// 程序执行管道
|
||||
@@ -96,7 +102,11 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
|
||||
#region 仪表步骤执行时间信息
|
||||
|
||||
public EventHandler<string> RunTimeCallSglEvent;
|
||||
/// <summary>
|
||||
/// 速度运行结束事件
|
||||
/// </summary>
|
||||
public event EventHandler<string> SpeedRunEndEvent;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
@@ -145,12 +155,17 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
//RunEnable = false;
|
||||
//时间到了触发下载下一步步骤
|
||||
|
||||
|
||||
|
||||
//不为空的数据
|
||||
if (NextProStepExe == null)
|
||||
{
|
||||
Console.WriteLine($"【时间】{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")} 【参数名称】:{MeterName} " +
|
||||
$"【Msg】:当前仪表参数全部执行完毕 ");
|
||||
|
||||
//速度执行结束发布事件
|
||||
if (IsSpeed) SpeedRunEndEvent.Invoke(this, "OK");
|
||||
|
||||
//为空时不执行后续的数据
|
||||
RunEnable = false;
|
||||
return;
|
||||
@@ -185,6 +200,18 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
////////发送步骤信息///////////
|
||||
if (NextProStepExe.ExistSlop)
|
||||
{
|
||||
//存在斜坡数据,SV是通过集合陆续打点写入,但是PID和Limit需要判断是否要写入,只要写一次即可
|
||||
ProRunChannel.Writer.WriteAsync(new ProRunChannelData()
|
||||
{
|
||||
MeterName = MeterName,
|
||||
SV = NextProStepExe.EndSV,
|
||||
ProSegName = NextProStepExe.ProSegName,
|
||||
MeterStep = NextProStepExe.MeterStep,
|
||||
CurLoadLimit = LimitResult == true ? new Limit() { Up = (short)NextProStepExe.CurConfigLimitDto.Up, Down = (short)NextProStepExe.CurConfigLimitDto.Down } : new Limit(),
|
||||
CurLoadPID = PidResult == true ? new PID() { P = (short)NextProStepExe.CurConfigPIDDto.P, I = (short)NextProStepExe.CurConfigPIDDto.I, D = (short)NextProStepExe.CurConfigPIDDto.D } : new PID(),
|
||||
RunStepType = GetRunStepType(PidResult, LimitResult, false),
|
||||
});
|
||||
|
||||
//存在坡度数据
|
||||
var SecStepDur = NextProStepExe.EndSV - NextProStepExe.StartSV;
|
||||
var SecStepValue = SecStepDur * 1.0 / NextProStepExe.KeepTime;
|
||||
@@ -256,7 +283,7 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
if (ListProStepExe.Where(x => x.MeterStep == CurProStepExe.MeterStep + 1).Any())
|
||||
{
|
||||
//存在下一步数据
|
||||
NextProStepExe = ListProStepExe.FirstOrDefault(x => x.MeterStep == CurProStepExe.MeterStep + 1);
|
||||
NextProStepExe = ListProStepExe.FirstOrDefault(x => x.MeterStep == CurProStepExe.MeterStep + 1)!;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -312,6 +339,18 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
{
|
||||
return RunStepType.StepSV;
|
||||
}
|
||||
else if (pid && limit)
|
||||
{
|
||||
return RunStepType.LimitPid;
|
||||
}
|
||||
else if (limit)
|
||||
{
|
||||
return RunStepType.Limit;
|
||||
}
|
||||
else if (pid)
|
||||
{
|
||||
return RunStepType.Pid;
|
||||
}
|
||||
else
|
||||
{
|
||||
return RunStepType.Step;
|
||||
|
||||
@@ -35,6 +35,24 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
/// </summary>
|
||||
StepSV = 4,
|
||||
|
||||
/// <summary>
|
||||
/// 正常的步骤信息-Limit 下载数据
|
||||
/// 就是:包括:SV PID和SLIMIT的数据,当然SV PID和SLIMIT跟上次是一样的话,则不需要下载
|
||||
/// </summary>
|
||||
LimitPid = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 正常的步骤信息-Limit 下载数据
|
||||
/// 就是:包括:SV PID和SLIMIT的数据,当然SV PID和SLIMIT跟上次是一样的话,则不需要下载
|
||||
/// </summary>
|
||||
Limit = 6,
|
||||
|
||||
/// <summary>
|
||||
/// 正常的步骤信息-PID 下载数据
|
||||
/// 就是:包括:SV PID和SLIMIT的数据,当然SV PID和SLIMIT跟上次是一样的话,则不需要下载
|
||||
/// </summary>
|
||||
Pid = 7,
|
||||
|
||||
/// <summary>
|
||||
/// 斜率单元
|
||||
/// 带斜率的数据打点执行,只传送SV值
|
||||
|
||||
144
CapMachine.Wpf/Models/ProRunTimeCalc.cs
Normal file
144
CapMachine.Wpf/Models/ProRunTimeCalc.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
using Prism.Mvvm;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace CapMachine.Wpf.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 程序运行时间统计
|
||||
/// </summary>
|
||||
public class ProRunTimeCalc : BindableBase
|
||||
{
|
||||
public ProRunTimeCalc()
|
||||
{
|
||||
//秒触发一次
|
||||
CycleTimer = new System.Timers.Timer(1000);
|
||||
CycleTimer.Elapsed += ProRunCycleAction;
|
||||
CycleTimer.AutoReset = true;
|
||||
CycleTimer.Enabled = true;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 程序运行时间周期统计
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void ProRunCycleAction(object? sender, ElapsedEventArgs e)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
CalcTime();
|
||||
}));
|
||||
|
||||
//CycleTimer.Stop();
|
||||
|
||||
//CycleTimer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 统计时间
|
||||
/// </summary>
|
||||
private void CalcTime()
|
||||
{
|
||||
ProEndDt = DateTime.Now;
|
||||
|
||||
ProRunTimeStr = ConvertSecToDHMS((int)((ProEndDt - ProStartDt).TotalSeconds - PauseTotalSecTime));
|
||||
}
|
||||
|
||||
private string ConvertSecToDHMS(int totalSeconds)
|
||||
{
|
||||
// 驗證非負(可根據需求調整)
|
||||
if (totalSeconds < 0)
|
||||
return "00:00:00:00";
|
||||
|
||||
int days = totalSeconds / 86400; // 1天 = 86400秒
|
||||
int remainingSeconds = totalSeconds % 86400;
|
||||
|
||||
int hours = remainingSeconds / 3600; // 1小時 = 3600秒
|
||||
remainingSeconds %= 3600;
|
||||
|
||||
int minutes = remainingSeconds / 60; // 1分鐘 = 60秒
|
||||
int seconds = remainingSeconds % 60;
|
||||
|
||||
// 格式化輸出,確保時、分、秒為兩位數
|
||||
return $"{days}天:{hours:D2}时:{minutes:D2}分:{seconds:D2}秒";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开始计时
|
||||
/// </summary>
|
||||
public void StartProRunTime()
|
||||
{
|
||||
ProStartDt = DateTime.Now;
|
||||
CycleTimer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 暂停计时
|
||||
/// </summary>
|
||||
public void PauseProRunTime()
|
||||
{
|
||||
CycleTimer.Stop();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 继续计时
|
||||
/// </summary>
|
||||
public void ContinueProRunTime()
|
||||
{
|
||||
CycleTimer.Start();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 结束计时
|
||||
/// </summary>
|
||||
public void EndProRunTime()
|
||||
{
|
||||
CycleTimer.Stop();
|
||||
CalcTime();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 周期定时器
|
||||
/// </summary>
|
||||
private System.Timers.Timer CycleTimer { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 程序开始的时间
|
||||
/// </summary>
|
||||
public DateTime ProStartDt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 程序结束的时间
|
||||
/// </summary>
|
||||
public DateTime ProEndDt { get; set; }
|
||||
|
||||
|
||||
private string? _ProRunTimeStr;
|
||||
/// <summary>
|
||||
/// 程序运行时间字符串
|
||||
/// </summary>
|
||||
public string? ProRunTimeStr
|
||||
{
|
||||
get { return _ProRunTimeStr; }
|
||||
set { _ProRunTimeStr = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 全部的暂停的时间
|
||||
/// 可能暂停多次
|
||||
/// </summary>
|
||||
public int PauseTotalSecTime { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,7 @@ namespace CapMachine.Wpf.Models
|
||||
/// </summary>
|
||||
private void InitConfig()
|
||||
{
|
||||
//未配置触发器 CanFire 返回值 false
|
||||
//状态机初始化
|
||||
StateMachine = new StateMachine<RunState, RunStateTrig>(RunState.Wait);
|
||||
|
||||
@@ -80,54 +81,82 @@ namespace CapMachine.Wpf.Models
|
||||
.PermitIf(RunStateTrig.AlarmTrig, RunState.Alarm, () => AlarmPreValid())
|
||||
.PermitIf(RunStateTrig.StartTrig, RunState.Run, () => RunPreValid())
|
||||
//.Permit(RunStateTrig.StartTrig, RunState.Run)
|
||||
//.Permit(RunStateTrig.ResetTrig, RunState.Wait)
|
||||
.PermitIf(RunStateTrig.EndTrig, RunState.Stop, () => StopPreValid())
|
||||
.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid())
|
||||
.Ignore(RunStateTrig.ResetTrig)
|
||||
.Ignore(RunStateTrig.WaitTrig);
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Stop, () => StopPreValid());
|
||||
//.PermitIf(RunStateTrig.EndTrig, RunState.Stop, () => StopPreValid())
|
||||
//.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid())
|
||||
//.Ignore(RunStateTrig.ResetTrig);
|
||||
//.Ignore(RunStateTrig.ContinueTrig)
|
||||
//.Ignore(RunStateTrig.WaitTrig);
|
||||
|
||||
StateMachine.Configure(RunState.Alarm)
|
||||
.OnEntry(t => AlarmEntryCall())
|
||||
.OnExit(t => AlarmExitCall())
|
||||
.PermitIf(RunStateTrig.WaitTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.StartTrig, RunState.Run, () => RunPreValid())
|
||||
.PermitIf(RunStateTrig.EndTrig, RunState.Stop, () => StopPreValid())
|
||||
.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid())
|
||||
.Ignore(RunStateTrig.AlarmTrig);
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Stop, () => StopPreValid());
|
||||
//.PermitIf(RunStateTrig.StartTrig, RunState.Run, () => RunPreValid())
|
||||
//.PermitIf(RunStateTrig.EndTrig, RunState.Stop, () => StopPreValid())
|
||||
//.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid())
|
||||
//.Ignore(RunStateTrig.ContinueTrig)
|
||||
//.Ignore(RunStateTrig.AlarmTrig);
|
||||
|
||||
StateMachine.Configure(RunState.Run)
|
||||
.OnEntry(t => RunEntryCall())
|
||||
.OnExit(t => RunExitCall())
|
||||
.PermitIf(RunStateTrig.WaitTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Wait, () => WaitPreValid())
|
||||
//.PermitIf(RunStateTrig.WaitTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Stop, () => StopPreValid())
|
||||
.PermitIf(RunStateTrig.AlarmTrig, RunState.Alarm, () => AlarmPreValid())
|
||||
.PermitIf(RunStateTrig.EndTrig, RunState.Stop, () => StopPreValid())
|
||||
.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid())
|
||||
.Ignore(RunStateTrig.StartTrig);
|
||||
.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid());
|
||||
//.PermitIf(RunStateTrig.ContinueTrig, RunState.Stop, () => false)
|
||||
//.Ignore(RunStateTrig.ContinueTrig)
|
||||
//.Ignore(RunStateTrig.StartTrig);
|
||||
|
||||
StateMachine.Configure(RunState.Stop)
|
||||
.OnEntry(t => StopEntryCall())
|
||||
.OnExit(t => StopExitCall())
|
||||
.PermitIf(RunStateTrig.WaitTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.AlarmTrig, RunState.Alarm, () => AlarmPreValid())
|
||||
.PermitIf(RunStateTrig.StartTrig, RunState.Run, () => RunPreValid())
|
||||
.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid())
|
||||
.Ignore(RunStateTrig.EndTrig);
|
||||
.PermitIf(RunStateTrig.StartTrig, RunState.Run, () => RunPreValid());
|
||||
//.PermitIf(RunStateTrig.PauseTrig, RunState.Pause, () => PausePreValid())
|
||||
//.Ignore(RunStateTrig.ContinueTrig)
|
||||
//.Ignore(RunStateTrig.PauseTrig)
|
||||
//.Ignore(RunStateTrig.EndTrig);
|
||||
|
||||
StateMachine.Configure(RunState.Pause)
|
||||
.OnEntry(t => PauseEntryCall())
|
||||
.OnExit(t => PauseExitCall())
|
||||
.PermitIf(RunStateTrig.WaitTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Wait, () => WaitPreValid())
|
||||
.Permit(RunStateTrig.ContinueTrig, RunState.Run)
|
||||
//.PermitIf(RunStateTrig.WaitTrig, RunState.Wait, () => WaitPreValid())
|
||||
.PermitIf(RunStateTrig.ResetTrig, RunState.Stop, () => StopPreValid())
|
||||
.PermitIf(RunStateTrig.AlarmTrig, RunState.Alarm, () => AlarmPreValid())
|
||||
.PermitIf(RunStateTrig.StartTrig, RunState.Run, () => RunPreValid())
|
||||
.PermitIf(RunStateTrig.EndTrig, RunState.Stop, () => StopPreValid())
|
||||
.Ignore(RunStateTrig.PauseTrig);
|
||||
//.PermitIf(RunStateTrig.StartTrig, RunState.Run, () => RunPreValid())
|
||||
.Permit(RunStateTrig.EndTrig, RunState.Stop);
|
||||
//.Ignore(RunStateTrig.PauseTrig);
|
||||
|
||||
}
|
||||
|
||||
private bool _BtnStartState;
|
||||
/// <summary>
|
||||
/// 界面的开始按钮状态
|
||||
/// </summary>
|
||||
public bool BtnStartState
|
||||
{
|
||||
get { return _BtnStartState; }
|
||||
set { _BtnStartState = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
private bool _BtnEndState;
|
||||
/// <summary>
|
||||
/// 界面的结束按钮状态
|
||||
/// </summary>
|
||||
public bool BtnEndState
|
||||
{
|
||||
get { return _BtnEndState; }
|
||||
set { _BtnEndState = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region 验证状态
|
||||
|
||||
/// <summary>
|
||||
@@ -144,7 +173,7 @@ namespace CapMachine.Wpf.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"WaitTrig-没有满足条件");
|
||||
MessageBox.Show($"WaitTrig-没有满足Wait条件");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -155,17 +184,19 @@ namespace CapMachine.Wpf.Models
|
||||
/// <returns></returns>
|
||||
public bool FireAlarm()
|
||||
{
|
||||
var Result = StateMachine.CanFire(RunStateTrig.AlarmTrig);
|
||||
if (Result)
|
||||
{
|
||||
StateMachine.Fire(RunStateTrig.AlarmTrig);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"AlarmTrig-没有满足条件");
|
||||
return false;
|
||||
}
|
||||
StateMachine.Fire(RunStateTrig.AlarmTrig);
|
||||
return true;
|
||||
//var Result = StateMachine.CanFire(RunStateTrig.AlarmTrig);
|
||||
//if (Result)
|
||||
//{
|
||||
// StateMachine.Fire(RunStateTrig.AlarmTrig);
|
||||
// return true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show($"AlarmTrig-没有满足条件");
|
||||
// return false;
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -182,7 +213,7 @@ namespace CapMachine.Wpf.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"ResetTrig-没有满足条件");
|
||||
MessageBox.Show($"ResetTrig-没有满足Reset条件");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -201,7 +232,7 @@ namespace CapMachine.Wpf.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"StartTrig-没有满足条件");
|
||||
MessageBox.Show($"StartTrig-没有满足Start条件");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -220,7 +251,7 @@ namespace CapMachine.Wpf.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"EndTrig-没有满足条件");
|
||||
MessageBox.Show($"EndTrig-没有满足End条件");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -239,12 +270,29 @@ namespace CapMachine.Wpf.Models
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"PauseTrig-没有满足条件");
|
||||
MessageBox.Show($"PauseTrig-没有满足Pause条件");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 进入 Continue 状态
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool FireContinue()
|
||||
{
|
||||
var Result = StateMachine.CanFire(RunStateTrig.ContinueTrig);
|
||||
if (Result)
|
||||
{
|
||||
StateMachine.Fire(RunStateTrig.ContinueTrig);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"ContinueTrig-没有满足Continue条件");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -293,12 +341,13 @@ namespace CapMachine.Wpf.Models
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private bool StopPreValid()
|
||||
{
|
||||
//运行切换到停止
|
||||
if (StateMachine.State == RunState.Run)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
////运行切换到停止
|
||||
//if (StateMachine.State == RunState.Run)
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
//return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -334,6 +383,7 @@ namespace CapMachine.Wpf.Models
|
||||
|
||||
private void StopExitCall()
|
||||
{
|
||||
BtnEndState = false;
|
||||
Console.WriteLine($"{Name}-StopExitCall");
|
||||
}
|
||||
|
||||
@@ -342,6 +392,7 @@ namespace CapMachine.Wpf.Models
|
||||
/// </summary>
|
||||
private void StopEntryCall()
|
||||
{
|
||||
BtnEndState = true;
|
||||
RunStateMsg = "停止";
|
||||
Console.WriteLine($"{Name}-StopEntryCall");
|
||||
|
||||
@@ -350,6 +401,7 @@ namespace CapMachine.Wpf.Models
|
||||
|
||||
private void RunExitCall()
|
||||
{
|
||||
BtnStartState = false;
|
||||
//退出运行状态
|
||||
IsRunState = false;
|
||||
Console.WriteLine($"{Name}-RunExitCall");
|
||||
@@ -360,6 +412,7 @@ namespace CapMachine.Wpf.Models
|
||||
/// </summary>
|
||||
private void RunEntryCall()
|
||||
{
|
||||
BtnStartState = true;
|
||||
RunStateMsg = "运行";
|
||||
Console.WriteLine($"{Name}-RunEntryCall");
|
||||
//进入运行状态
|
||||
|
||||
@@ -40,6 +40,12 @@ namespace CapMachine.Wpf.Models
|
||||
/// 复位 触发
|
||||
/// </summary>
|
||||
ResetTrig = 6,
|
||||
|
||||
/// <summary>
|
||||
/// 继续 触发
|
||||
/// </summary>
|
||||
ContinueTrig = 7,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -117,5 +117,10 @@ namespace CapMachine.Wpf.Models.Tag
|
||||
/// </summary>
|
||||
bool IsMeter { get; set; }
|
||||
string AutoHandSwitchAddress { get; set; }
|
||||
string Pid_PAddress { get; set; }
|
||||
string Pid_IAddress { get; set; }
|
||||
string Pid_DAddress { get; set; }
|
||||
string Limit_UpAddress { get; set; }
|
||||
string Limit_DownAddress { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +122,31 @@ namespace CapMachine.Wpf.Models.Tag
|
||||
/// </summary>
|
||||
public string MVAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Pid_P
|
||||
/// </summary>
|
||||
public string Pid_PAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Pid_I
|
||||
/// </summary>
|
||||
public string Pid_IAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Pid_D
|
||||
/// </summary>
|
||||
public string Pid_DAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Limit_Up
|
||||
/// </summary>
|
||||
public string Limit_UpAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Limit_Down
|
||||
/// </summary>
|
||||
public string Limit_DownAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址信息 Index
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user