速度的拓展参数对应
This commit is contained in:
@@ -41,7 +41,7 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
/// <summary>
|
||||
/// 是否是速度仪表参数
|
||||
/// </summary>
|
||||
public bool IsSpeed { get; set; }=false;
|
||||
public bool IsSpeed { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 程序执行管道
|
||||
@@ -155,7 +155,7 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
//RunEnable = false;
|
||||
//时间到了触发下载下一步步骤
|
||||
|
||||
|
||||
|
||||
|
||||
//不为空的数据
|
||||
if (NextProStepExe == null)
|
||||
@@ -210,6 +210,9 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
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),
|
||||
|
||||
ListStepExd = GetStepExds(NextProStepExe),//拓展参数
|
||||
|
||||
});
|
||||
|
||||
//存在坡度数据
|
||||
@@ -247,6 +250,8 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
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, true),
|
||||
|
||||
ListStepExd = GetStepExds(NextProStepExe),//拓展参数
|
||||
});
|
||||
Console.WriteLine($"【时间】{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")} 【参数名称】:{MeterName} " +
|
||||
$"【程序Seg】{CurProStepExe.ProSegName} " +
|
||||
@@ -309,6 +314,21 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取拓展信息
|
||||
/// 一般是速度有这些参数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<StepExd> GetStepExds(ProStepExe proStepExe)
|
||||
{
|
||||
if (proStepExe.ListStepExd != null && proStepExe.ListStepExd.Count() > 0)
|
||||
{
|
||||
return proStepExe.ListStepExd;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当前步骤已经运行时长-秒
|
||||
/// </summary>
|
||||
|
||||
@@ -135,5 +135,12 @@ namespace CapMachine.Wpf.Models.ProModelPars
|
||||
/// AlarmNo的配置信息
|
||||
/// </summary>
|
||||
public ConfigAlarmDto? CurConfigAlarmDto { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拓展参数集合
|
||||
/// 比如:速度参数拓展的输出锁定、吸排气阀,压缩机使能等这些拓展参数
|
||||
/// 也可以是其他参数附带的拓展信息
|
||||
/// </summary>
|
||||
public List<StepExd>? ListStepExd { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
50
CapMachine.Wpf/Models/ProModelPars/StepExd.cs
Normal file
50
CapMachine.Wpf/Models/ProModelPars/StepExd.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapMachine.Wpf.Models.ProModelPars
|
||||
{
|
||||
/// <summary>
|
||||
/// ProStepExe 参数执行的拓展参数
|
||||
/// 比如:速度参数拓展的输出锁定、吸排气阀,压缩机使能等这些拓展参数
|
||||
/// </summary>
|
||||
public class StepExd
|
||||
{
|
||||
/// <summary>
|
||||
/// 参数名称
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值信息
|
||||
/// </summary>
|
||||
public object? Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 值类型
|
||||
/// </summary>
|
||||
public ExdValueType ValueType { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 值类型
|
||||
/// </summary>
|
||||
public enum ExdValueType
|
||||
{
|
||||
/// <summary>
|
||||
/// 布尔
|
||||
/// </summary>
|
||||
Bool=1,
|
||||
/// <summary>
|
||||
/// 整型数据
|
||||
/// </summary>
|
||||
Short=2,
|
||||
/// <summary>
|
||||
/// 浮点数
|
||||
/// </summary>
|
||||
Double=3,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user