Commit c48ddd92 authored by 潘栩锋's avatar 潘栩锋 🚴

IBC, 称重 参数设置界面添加密码, 都添加 Desp 的 attribute, 用于 PLC写入记录

parent 9eecefea
...@@ -200,6 +200,10 @@ ...@@ -200,6 +200,10 @@
<Project>{a539505d-9ac0-426b-a9a0-197df50598b0}</Project> <Project>{a539505d-9ac0-426b-a9a0-197df50598b0}</Project>
<Name>OBJComponents</Name> <Name>OBJComponents</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.Thick.Base\FLY.Thick.Base.UI\FLY.Thick.Base.UI.csproj">
<Project>{ec84265e-4196-4834-8ac0-81956777c5e9}</Project>
<Name>FLY.Thick.Base.UI</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.UI.Module\FLY.UI.Module\FLY.UI.Module.csproj"> <ProjectReference Include="..\..\thick_public\Project.FLY.UI.Module\FLY.UI.Module\FLY.UI.Module.csproj">
<Project>{4df79671-e814-49bd-864d-8257d6c6e072}</Project> <Project>{4df79671-e814-49bd-864d-8257d6c6e072}</Project>
<Name>FLY.UI.Module</Name> <Name>FLY.UI.Module</Name>
......
...@@ -31,10 +31,13 @@ namespace FLY.IBC.UI.Client ...@@ -31,10 +31,13 @@ namespace FLY.IBC.UI.Client
} }
private void button_system_Click(object sender, RoutedEventArgs e) private void button_system_Click(object sender, RoutedEventArgs e)
{
if (ThickTcpUiInWindow.Window_Password.Authorize(1))
{ {
Page_System p = new Page_System(); Page_System p = new Page_System();
NavigationService.Navigate(p); NavigationService.Navigate(p);
} }
}
private void button_error_Click(object sender, RoutedEventArgs e) private void button_error_Click(object sender, RoutedEventArgs e)
{ {
......
...@@ -329,6 +329,10 @@ ...@@ -329,6 +329,10 @@
<Project>{a539505d-9ac0-426b-a9a0-197df50598b0}</Project> <Project>{a539505d-9ac0-426b-a9a0-197df50598b0}</Project>
<Name>OBJComponents</Name> <Name>OBJComponents</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.Thick.Base\FLY.Thick.Base.UI\FLY.Thick.Base.UI.csproj">
<Project>{ec84265e-4196-4834-8ac0-81956777c5e9}</Project>
<Name>FLY.Thick.Base.UI</Name>
</ProjectReference>
<ProjectReference Include="..\..\thick_public\Project.FLY.Thick.Base\FLY.Thick.Base\FLY.Thick.Base.csproj"> <ProjectReference Include="..\..\thick_public\Project.FLY.Thick.Base\FLY.Thick.Base\FLY.Thick.Base.csproj">
<Project>{91a1aafe-a528-4c2e-a48a-9259e780255a}</Project> <Project>{91a1aafe-a528-4c2e-a48a-9259e780255a}</Project>
<Name>FLY.Thick.Base</Name> <Name>FLY.Thick.Base</Name>
......
...@@ -34,24 +34,33 @@ namespace FLY.Weight.UI.Client ...@@ -34,24 +34,33 @@ namespace FLY.Weight.UI.Client
} }
private void button_ingredient_Click(object sender, RoutedEventArgs e) private void button_ingredient_Click(object sender, RoutedEventArgs e)
{
if (ThickTcpUiInWindow.Window_Password.Authorize(1))
{ {
Page_Ingredient p = new Page_Ingredient(); Page_Ingredient p = new Page_Ingredient();
NavigationService.Navigate(p); NavigationService.Navigate(p);
} }
}
private void button_screw_Click(object sender, RoutedEventArgs e) private void button_screw_Click(object sender, RoutedEventArgs e)
{
if (ThickTcpUiInWindow.Window_Password.Authorize(1))
{ {
Page_Screw p = new Page_Screw(); Page_Screw p = new Page_Screw();
NavigationService.Navigate(p); NavigationService.Navigate(p);
} }
}
private void button_hopper_Click(object sender, RoutedEventArgs e) private void button_hopper_Click(object sender, RoutedEventArgs e)
{
if (ThickTcpUiInWindow.Window_Password.Authorize(1))
{ {
Page_Hopper p = new Page_Hopper(); Page_Hopper p = new Page_Hopper();
NavigationService.Navigate(p); NavigationService.Navigate(p);
} }
}
private void button_error_Click(object sender, RoutedEventArgs e) private void button_error_Click(object sender, RoutedEventArgs e)
{ {
...@@ -60,10 +69,13 @@ namespace FLY.Weight.UI.Client ...@@ -60,10 +69,13 @@ namespace FLY.Weight.UI.Client
} }
private void button_thickness_Click(object sender, RoutedEventArgs e) private void button_thickness_Click(object sender, RoutedEventArgs e)
{
if (ThickTcpUiInWindow.Window_Password.Authorize(1))
{ {
Page_Thickness p = new Page_Thickness(); Page_Thickness p = new Page_Thickness();
NavigationService.Navigate(p); NavigationService.Navigate(p);
} }
}
private void button_rollmixtable_Click(object sender, RoutedEventArgs e) private void button_rollmixtable_Click(object sender, RoutedEventArgs e)
{ {
......
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
<target xsi:type="File" name="f_error" fileName="${basedir}/logs/error/${shortdate}.log" <target xsi:type="File" name="f_error" fileName="${basedir}/logs/error/${shortdate}.log"
layout="${longdate} ${logger} ${uppercase:${level}} ${message} ${onexception:inner=${newline} *****Error***** ${newline} ${exception:format=ToString}}" layout="${longdate} ${logger} ${uppercase:${level}} ${message} ${onexception:inner=${newline} *****Error***** ${newline} ${exception:format=ToString}}"
archiveAboveSize="1048576" encoding="utf-8"/> archiveAboveSize="1048576" encoding="utf-8"/>
<target xsi:type="File" name="plcWrite" fileName="${basedir}/logs/plcWrite/${shortdate}.log"
layout="${longdate} ${message}"
archiveAboveSize="1048576" encoding="utf-8"/>
</targets> </targets>
<rules> <rules>
...@@ -45,6 +48,7 @@ ...@@ -45,6 +48,7 @@
--> -->
<!--<logger name="FObjSysOfClient" minlevel="Debug" writeTo="f_debug" />--> <!--<logger name="FObjSysOfClient" minlevel="Debug" writeTo="f_debug" />-->
<!--name 可以用匹配--> <!--name 可以用匹配-->
<logger name="FLY.OBJComponents.Server.PLCProxySystem" minlevel="Info" writeTo="plcWrite" />
<logger name="*" minlevel="Error" writeTo="f_error" /> <logger name="*" minlevel="Error" writeTo="f_error" />
</rules> </rules>
</nlog> </nlog>
......
...@@ -8,115 +8,20 @@ namespace FLY.Weight.Common ...@@ -8,115 +8,20 @@ namespace FLY.Weight.Common
{ {
public static class ERRNOs public static class ERRNOs
{ {
public static byte TYPE = 10;
static ERRNOs() static ERRNOs()
{ {
ERRNO_PLC_DISCONNECTED = new ERRNO() { Code = 255, Descrption = "称重 PLC连接断开" }; ERRNO_PLC_DISCONNECTED = new ERRNO() { Code = 255, Descrption = "称重 PLC连接断开" };
WEIGHT_ERRNO_LACK1 = new ERRNO() { Code = 0, Descrption = "No.1料仓缺料报警" }; ERRNO_PLC_REG = new ERRNO() { Code = 0, Descrption = "通过 PLC寄存器 触发的报警信息" };
WEIGHT_ERRNO_LACK2 = new ERRNO() { Code = 1, Descrption = "No.2料仓缺料报警" };
WEIGHT_ERRNO_LACK3 = new ERRNO() { Code = 2, Descrption = "No.3料仓缺料报警" };
WEIGHT_ERRNO_LACK4 = new ERRNO() { Code = 3, Descrption = "No.4料仓缺料报警" };
WEIGHT_ERRNO_LACK5 = new ERRNO() { Code = 4, Descrption = "No.5料仓缺料报警" };
WEIGHT_ERRNO_LACK6 = new ERRNO() { Code = 5, Descrption = "No.6料仓缺料报警" };
WEIGHT_ERRNO_ADD1 = new ERRNO() { Code = 10, Descrption = "No.1料斗加料异常" };
WEIGHT_ERRNO_ADD2 = new ERRNO() { Code = 11, Descrption = "No.2料斗加料异常" };
WEIGHT_ERRNO_ADD3 = new ERRNO() { Code = 12, Descrption = "No.3料斗加料异常" };
WEIGHT_ERRNO_ADD4 = new ERRNO() { Code = 13, Descrption = "No.4料斗加料异常" };
WEIGHT_ERRNO_ADD5 = new ERRNO() { Code = 14, Descrption = "No.5料斗加料异常" };
WEIGHT_ERRNO_ADD6 = new ERRNO() { Code = 15, Descrption = "No.6料斗加料异常" };
WEIGHT_ERRNO_SCREWLACK = new ERRNO() { Code = 20, Descrption = "螺杆缺料报警" };
WEIGHT_ERRNO_SCREWFLOW = new ERRNO() { Code = 21, Descrption = "螺杆流量超偏差报警" };
WEIGHT_ERRNO_BLENDER = new ERRNO() { Code = 22, Descrption = "搅拌电机故障" };
WEIGHT_ERRNO_SCRAM = new ERRNO() { Code = 23, Descrption = "急停开启" };
WEIGHT_ERRNO_BLENDER2 = new ERRNO() { Code = 24, Descrption = "搅拌电机急停开启" };
WEIGHT_ERRNO_BLENDER3 = new ERRNO() { Code = 25, Descrption = "搅拌电机未启动" };
} }
/// <summary> /// <summary>
/// PLC连接断开 /// PLC连接断开
/// </summary> /// </summary>
public static ERRNO ERRNO_PLC_DISCONNECTED; public static ERRNO ERRNO_PLC_DISCONNECTED;
#region 单层报警类型
/// <summary>
/// No.1料仓缺料报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_LACK1;
/// <summary>
/// No.2料仓缺料报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_LACK2;
/// <summary>
/// No.3料仓缺料报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_LACK3;
/// <summary>
/// No.4料仓缺料报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_LACK4;
/// <summary>
/// No.5料仓缺料报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_LACK5;
/// <summary>
/// No.6料仓缺料报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_LACK6;
/// <summary>
/// No.1料斗加料异常
/// </summary>
public static ERRNO WEIGHT_ERRNO_ADD1;
/// <summary>
/// No.2料斗加料异常
/// </summary>
public static ERRNO WEIGHT_ERRNO_ADD2;
/// <summary>
/// No.3料斗加料异常
/// </summary>
public static ERRNO WEIGHT_ERRNO_ADD3;
/// <summary> /// <summary>
/// No.4料斗加料异常 /// 通过 PLC寄存器 触发的报警信息
/// </summary> /// </summary>
public static ERRNO WEIGHT_ERRNO_ADD4; public static ERRNO ERRNO_PLC_REG;
/// <summary>
/// No.5料斗加料异常
/// </summary>
public static ERRNO WEIGHT_ERRNO_ADD5;
/// <summary>
/// No.6料斗加料异常
/// </summary>
public static ERRNO WEIGHT_ERRNO_ADD6;
/// <summary>
/// 螺杆缺料报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_SCREWLACK;
/// <summary>
/// 螺杆流量超偏差报警
/// </summary>
public static ERRNO WEIGHT_ERRNO_SCREWFLOW;
/// <summary>
/// 搅拌电机故障
/// </summary>
public static ERRNO WEIGHT_ERRNO_BLENDER;
/// <summary>
/// 急停开启
/// </summary>
public static ERRNO WEIGHT_ERRNO_SCRAM;
/// <summary>
/// 搅拌电机急停开启
/// </summary>
public static ERRNO WEIGHT_ERRNO_BLENDER2;
/// <summary>
/// 搅拌电机未启动
/// </summary>
public static ERRNO WEIGHT_ERRNO_BLENDER3;
#endregion
} }
} }
...@@ -12,122 +12,146 @@ namespace FLY.Weight.Common ...@@ -12,122 +12,146 @@ namespace FLY.Weight.Common
/// <summary> /// <summary>
/// 总流量设定 /// 总流量设定
/// </summary> /// </summary>
public float TotalFlowSetting { get; set; } [Description("总流量设定")]
public float TotalFlowSetting{ get; set; }
/// <summary> /// <summary>
/// 总流量显示 /// 总流量显示
/// </summary> /// </summary>
public float TotalFlow { get; set; } [Description("总流量显示")]
public float TotalFlow{ get; set; }
/// <summary> /// <summary>
/// 总产量 /// 总产量
/// </summary> /// </summary>
public float TotalProduction { get; set; } [Description("总产量")]
public float TotalProduction{ get; set; }
/// <summary> /// <summary>
/// 码轮周长mm /// 码轮周长mm
/// </summary> /// </summary>
public float WheelPerimeter { get; set; } [Description("码轮周长mm")]
public float WheelPerimeter{ get; set; }
/// <summary> /// <summary>
/// 码轮脉冲 /// 码轮脉冲
/// </summary> /// </summary>
public float WheelPulse { get; set; } [Description("码轮脉冲")]
public float WheelPulse{ get; set; }
/// <summary> /// <summary>
/// 平均密度 /// 平均密度
/// </summary> /// </summary>
public float Density { get; set; } [Description("平均密度")]
public float Density{ get; set; }
/// <summary> /// <summary>
/// 边料不回收 /// 边料不回收
/// </summary> /// </summary>
public bool IsRimNoRecycle { get; set; } [Description("边料不回收")]
public bool IsRimNoRecycle{ get; set; }
/// <summary> /// <summary>
/// 边料kg/h /// 边料kg/h
/// </summary> /// </summary>
public float RimCharge { get; set; } [Description("边料kg/h")]
public float RimCharge{ get; set; }
/// <summary> /// <summary>
/// 厚度um /// 厚度um
/// </summary> /// </summary>
public float Thickness { get; set; } [Description("厚度um")]
public float Thickness{ get; set; }
/// <summary> /// <summary>
/// 当前线速度m/min /// 当前线速度m/min
/// </summary> /// </summary>
public float CurrentVelocity { get; set; } [Description("当前线速度m/min")]
public float CurrentVelocity{ get; set; }
/// <summary> /// <summary>
/// 当前线速度设置m/min /// 当前线速度设置m/min
/// </summary> /// </summary>
public float CurrentVelocitySet { get; set; } [Description("当前线速度设置m/min")]
public float CurrentVelocitySet{ get; set; }
/// <summary> /// <summary>
/// 吹膜宽度mm /// 吹膜宽度mm
/// </summary> /// </summary>
public float TotalFilmWidth { get; set; } [Description("吹膜宽度mm")]
public float TotalFilmWidth{ get; set; }
/// <summary> /// <summary>
/// 切边mm /// 切边mm
/// </summary> /// </summary>
public float RimWidth { get; set; } [Description("切边mm")]
public float RimWidth{ get; set; }
/// <summary> /// <summary>
/// 收卷宽度mm /// 收卷宽度mm
/// </summary> /// </summary>
public float ActFilmWidth { get; set; } [Description("收卷宽度mm")]
public float ActFilmWidth{ get; set; }
/// <summary> /// <summary>
/// 设定厚度um /// 设定厚度um
/// </summary> /// </summary>
public float SetThickness { get; set; } [Description("设定厚度um")]
public float SetThickness{ get; set; }
/// <summary> /// <summary>
/// 理论速度m/min /// 理论速度m/min
/// </summary> /// </summary>
public float TargetVelocity { get; set; } [Description("理论速度m/min")]
public float TargetVelocity{ get; set; }
/// <summary> /// <summary>
/// 内收卷当前m /// 内收卷当前m
/// </summary> /// </summary>
public float ACurrentLen { get; set; } [Description("内收卷当前m")]
public float ACurrentLen{ get; set; }
/// <summary> /// <summary>
/// 内收卷当前kg /// 内收卷当前kg
/// </summary> /// </summary>
public float ACurrent { get; set; } [Description("内收卷当前kg")]
public float ACurrent{ get; set; }
/// <summary> /// <summary>
/// 内收卷上卷kg /// 内收卷上卷kg
/// </summary> /// </summary>
public float ALast { get; set; } [Description("内收卷上卷kg")]
public float ALast{ get; set; }
/// <summary> /// <summary>
/// 外收卷当前m /// 外收卷当前m
/// </summary> /// </summary>
public float BCurrentLen { get; set; } [Description("外收卷当前m")]
public float BCurrentLen{ get; set; }
/// <summary> /// <summary>
/// 外收卷当前kg /// 外收卷当前kg
/// </summary> /// </summary>
public float BCurrent { get; set; } [Description("外收卷当前kg")]
public float BCurrent{ get; set; }
/// <summary> /// <summary>
/// 外收卷上卷kg /// 外收卷上卷kg
/// </summary> /// </summary>
public float BLast { get; set; } [Description("外收卷上卷kg")]
public float BLast{ get; set; }
/// <summary> /// <summary>
/// 内收卷清零 /// 内收卷清零
/// </summary> /// </summary>
public bool AClear { get; set; } [Description("内收卷清零")]
public bool AClear{ get; set; }
/// <summary> /// <summary>
/// 外收卷清零 /// 外收卷清零
/// </summary> /// </summary>
public bool BClear { get; set; } [Description("外收卷清零")]
public bool BClear{ get; set; }
#endregion #endregion
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
......
...@@ -17,6 +17,7 @@ using FLY.OBJComponents.Common; ...@@ -17,6 +17,7 @@ using FLY.OBJComponents.Common;
using FObjBase; using FObjBase;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using FLY.Weight.Server.Model; using FLY.Weight.Server.Model;
using Misc;
namespace FLY.Weight.Server namespace FLY.Weight.Server
{ {
...@@ -468,47 +469,45 @@ namespace FLY.Weight.Server ...@@ -468,47 +469,45 @@ namespace FLY.Weight.Server
#region 报警 #region 报警
class ErrorAction class ErrorAction
{ {
public Dictionary<string, ERRNO> error_property; public List<string> error_property;
public delegate void ErrorHandler(ref byte errcode, ref string msg,object state);
public ErrorHandler action;
public object state; public object state;
public delegate void ErrorHandler(ref string msg, object state);
public ErrorHandler action;
} }
Dictionary<INotifyPropertyChanged, ErrorAction> obj_error = new Dictionary<INotifyPropertyChanged, ErrorAction>(); Dictionary<INotifyPropertyChanged, ErrorAction> obj_error = new Dictionary<INotifyPropertyChanged, ErrorAction>();
void InitError() void InitError()
{ {
Dictionary<string, ERRNO> error_property = new Dictionary<string, ERRNO>(); //反射找出全部是报警的property
error_property = new Dictionary<string, ERRNO>(); List<string> error_weightc_property = new List<string>();
error_property.Add("IsErrorOfLack_1", ERRNOs.WEIGHT_ERRNO_LACK1); foreach (var propertyInfo in typeof(WeighterC).GetProperties())
error_property.Add("IsErrorOfLack_2", ERRNOs.WEIGHT_ERRNO_LACK2); {
error_property.Add("IsErrorOfLack_3", ERRNOs.WEIGHT_ERRNO_LACK3); if (propertyInfo.GetCustomAttributes(typeof(IsErrorAttribute), false).Count() > 0)
error_property.Add("IsErrorOfLack_4", ERRNOs.WEIGHT_ERRNO_LACK4); {
error_property.Add("IsErrorOfLack_5", ERRNOs.WEIGHT_ERRNO_LACK5); error_weightc_property.Add(propertyInfo.Name);
error_property.Add("IsErrorOfLack_6", ERRNOs.WEIGHT_ERRNO_LACK6); }
error_property.Add("IsErrorOfAdd_1", ERRNOs.WEIGHT_ERRNO_ADD1); }
error_property.Add("IsErrorOfAdd_2", ERRNOs.WEIGHT_ERRNO_ADD2);
error_property.Add("IsErrorOfAdd_3", ERRNOs.WEIGHT_ERRNO_ADD3); List<string> error_accessory_property = new List<string>();
error_property.Add("IsErrorOfAdd_4", ERRNOs.WEIGHT_ERRNO_ADD4); foreach (var propertyInfo in typeof(WeighterAccessory).GetProperties())
error_property.Add("IsErrorOfAdd_5", ERRNOs.WEIGHT_ERRNO_ADD5); {
error_property.Add("IsErrorOfAdd_6", ERRNOs.WEIGHT_ERRNO_ADD6); if (propertyInfo.GetCustomAttributes(typeof(IsErrorAttribute), false).Count() > 0)
error_property.Add("IsErrorOfScrewLack", ERRNOs.WEIGHT_ERRNO_SCREWLACK); {
error_property.Add("IsErrorOfScrewFlow", ERRNOs.WEIGHT_ERRNO_SCREWFLOW); error_accessory_property.Add(propertyInfo.Name);
error_property.Add("IsErrorOfBlender", ERRNOs.WEIGHT_ERRNO_BLENDER); }
error_property.Add("IsErrorOfScram", ERRNOs.WEIGHT_ERRNO_SCRAM); }
error_property.Add("IsErrorOfBlender2", ERRNOs.WEIGHT_ERRNO_BLENDER2);
error_property.Add("IsErrorOfBlender3", ERRNOs.WEIGHT_ERRNO_BLENDER3);
for (int i = 0; i < Items.Count(); i++) for (int i = 0; i < Items.Count(); i++)
{ {
obj_error.Add(Items[i], new ErrorAction() obj_error.Add(Items[i], new ErrorAction()
{ {
error_property = error_property, error_property = error_weightc_property,
state = i, state = i,
action = (ref byte code, ref string description, object state) => action = (ref string description, object state) =>
{ {
int idx = (int)state; int idx = (int)state;
description = Items[idx].Number + "层 "+ description; description = Items[idx].Number + "层 "+ description;
code += (byte)(idx*25);
}, },
}); });
...@@ -524,7 +523,7 @@ namespace FLY.Weight.Server ...@@ -524,7 +523,7 @@ namespace FLY.Weight.Server
foreach (var kv in obj_error) foreach (var kv in obj_error)
{ {
string objname = PLCos.ObjNames.First(_kv => _kv.Value == kv.Key).Key; string objname = PLCos.ObjNames.First(_kv => _kv.Value == kv.Key).Key;
PLCos.SetPlan(objname, kv.Value.error_property.Keys.ToArray(), 0); PLCos.SetPlan(objname, kv.Value.error_property.ToArray(), 0);
} }
...@@ -552,21 +551,26 @@ namespace FLY.Weight.Server ...@@ -552,21 +551,26 @@ namespace FLY.Weight.Server
{ {
ErrorAction errorAction = obj_error[sender as INotifyPropertyChanged]; ErrorAction errorAction = obj_error[sender as INotifyPropertyChanged];
if (errorAction.error_property.ContainsKey(e.PropertyName)) if (errorAction.error_property.Contains(e.PropertyName))
{ {
bool b = (bool)Misc.PropertiesManager.GetValue(sender, e.PropertyName); //获取描述
var type = sender.GetType();
var property = type.GetProperty(e.PropertyName);
bool b = (bool)property.GetValue(type);
//肯定有,没有就让它出错!!!
string desp = (property.GetCustomAttributes(typeof(DescriptionAttribute), false).First() as DescriptionAttribute).Description;
bool offIsError = (property.GetCustomAttributes(typeof(IsErrorAttribute), false).First() as IsErrorAttribute).OffIsError;
ERRNO errno = errorAction.error_property[e.PropertyName];
ERR_STATE state; ERR_STATE state;
if (!errno.OffIsError) if (offIsError)
state = b ? ERR_STATE.ON : ERR_STATE.OFF;
else
state = !b ? ERR_STATE.ON : ERR_STATE.OFF; state = !b ? ERR_STATE.ON : ERR_STATE.OFF;
else
state = b ? ERR_STATE.ON : ERR_STATE.OFF;
byte errcode = errno.Code; byte errcode = ERRNOs.ERRNO_PLC_REG.Code;
string description = errno.Descrption; string description = desp;
errorAction.action?.Invoke(ref errcode, ref description, errorAction.state); errorAction.action?.Invoke(ref description, errorAction.state);
mWarning.Add(errcode, description, state); mWarning.Add(errcode, description, state);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment