From 4c16bcfb27f00a489c306f23b9e43bf72b428bd5 Mon Sep 17 00:00:00 2001 From: "nodyang@aliyun.com" Date: Thu, 14 Nov 2024 11:24:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RfidWeb/Tool/HimAlarmManager.cs | 7 ++ RfidWeb/{ => Tool}/TestFactory.cs | 0 RfidWeb/{ => Tool}/UserManager.cs | 0 Tool/Model/AlarmMsgFactory.cs | 118 ------------------------------ Tool/Model/EsStop.cs | 30 ++++++++ Tool/Model/HmiChAlarm.cs | 9 +++ Tool/Model/HmiCqAlarm.cs | 9 +++ Tool/Model/HmiCqModel.cs | 9 +++ Tool/Model/HmiLpModel.cs | 9 +++ 9 files changed, 73 insertions(+), 118 deletions(-) create mode 100644 RfidWeb/Tool/HimAlarmManager.cs rename RfidWeb/{ => Tool}/TestFactory.cs (100%) rename RfidWeb/{ => Tool}/UserManager.cs (100%) delete mode 100644 Tool/Model/AlarmMsgFactory.cs create mode 100644 Tool/Model/EsStop.cs create mode 100644 Tool/Model/HmiChAlarm.cs create mode 100644 Tool/Model/HmiCqAlarm.cs create mode 100644 Tool/Model/HmiCqModel.cs create mode 100644 Tool/Model/HmiLpModel.cs diff --git a/RfidWeb/Tool/HimAlarmManager.cs b/RfidWeb/Tool/HimAlarmManager.cs new file mode 100644 index 0000000..8ed15ce --- /dev/null +++ b/RfidWeb/Tool/HimAlarmManager.cs @@ -0,0 +1,7 @@ +namespace RfidWeb +{ + public class HimAlarmManager + { + + } +} \ No newline at end of file diff --git a/RfidWeb/TestFactory.cs b/RfidWeb/Tool/TestFactory.cs similarity index 100% rename from RfidWeb/TestFactory.cs rename to RfidWeb/Tool/TestFactory.cs diff --git a/RfidWeb/UserManager.cs b/RfidWeb/Tool/UserManager.cs similarity index 100% rename from RfidWeb/UserManager.cs rename to RfidWeb/Tool/UserManager.cs diff --git a/Tool/Model/AlarmMsgFactory.cs b/Tool/Model/AlarmMsgFactory.cs deleted file mode 100644 index 3ab08c6..0000000 --- a/Tool/Model/AlarmMsgFactory.cs +++ /dev/null @@ -1,118 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using System.Threading.Tasks; - -//namespace Tool.Model -//{ -// public static class AlarmMsgFactory -// { -// public static Dictionary CHA -// { -// get -// { -// Dictionary dictionary = new Dictionary -// { -// [0] = "盘料取料1级气缸动作超时", -// [1] = "卷料取料1级气缸动作超时", -// [2] = "卷料取料横移气缸动作超时" -// }; - - -// return dictionary; -// } -// } - - -// public static Dictionary CHB -// { -// get -// { -// Dictionary dictionary = new Dictionary -// { -// [0] = "盘料取料标签掉落异常", -// [1] = "盘料取料传感器异常", -// [2] = "", -// [3] = "料取料标签掉落异常", -// [4] = "卷料取料传感器异常卷", -// [5] = "芯片料带检测缺失", -// [6] = "层合下层胶料检测缺失", -// [7] = "层合下层胶料断开", -// [8] = "层合下层胶料跑偏", -// [9] = "层合上层胶料检测缺失", -// [10] = "层合上层胶料断开", -// [11] = "层合上层胶料跑偏", -// [12] = "供料电机动作超时", -// [13] = "层合电机动作超时", -// [14] = "芯片抓取失败", -// [15] = "", -// [16] = "", -// [17] = "", -// [18] = "", -// [19] = "", -// [20] = "", - - -// }; - - -// return dictionary; -// } -// } - - -// public static Dictionary CQA -// { -// get -// { -// Dictionary dictionary = new Dictionary -// { -// [0] = "裁刀1动作超时", -// [1] = "裁刀2动作超时", -// [2] = "裁刀1收料机构不在原点位" -// }; - - -// return dictionary; -// } -// } - -// public static Dictionary CQB -// { -// get -// { -// Dictionary dictionary = new Dictionary -// { -// [0] = "芯片1读取失败", -// [1] = "芯片2读取失败", -// [2] = "废料芯片残留", -// [3] = "裁切1放料异常", -// [4] = "裁切2放料异常", -// [5] = "收料1前进感应超时", -// [6] = "收料2前进感应超时", -// [7] = "收料1底膜缺料", -// [8] = "收料2底膜缺料", -// [9] = "裁切胶料检测缺失", -// [10] = "", -// [11] = "", -// [12] = "", -// [13] = "", -// [14] = "", -// [15] = "", -// [16] = "", -// [17] = "", -// [18] = "", -// [19] = "", -// [20] = "", - - -// }; - - -// return dictionary; -// } -// } -// } - -//} diff --git a/Tool/Model/EsStop.cs b/Tool/Model/EsStop.cs new file mode 100644 index 0000000..98104b7 --- /dev/null +++ b/Tool/Model/EsStop.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.Linq; +using HslCommunication; + +namespace Tool.Model +{ + public class EsStop + { + + public List GetDb() + { + bool[] bitArray = new bool[32]; + var readUInt32 = PlcConnect.Instance.ReadUInt32("estop_temporary_storage"); + var bo = readUInt32.IsSuccess; + var context = readUInt32.Content; + if (bo) + { + + for (int i = 0; i < 31; i++) + { + bitArray[i] = context.GetBoolByIndex(i); + } + + } + + return bitArray.ToList(); + + } + } +} \ No newline at end of file diff --git a/Tool/Model/HmiChAlarm.cs b/Tool/Model/HmiChAlarm.cs new file mode 100644 index 0000000..4841965 --- /dev/null +++ b/Tool/Model/HmiChAlarm.cs @@ -0,0 +1,9 @@ +namespace Tool.Model +{ + public class HmiChAlarm : BoolModelFactory + { + public HmiChAlarm() : base("CH_alarm_A", "CH_alarm_B") + { + } + } +} \ No newline at end of file diff --git a/Tool/Model/HmiCqAlarm.cs b/Tool/Model/HmiCqAlarm.cs new file mode 100644 index 0000000..e9c7ab1 --- /dev/null +++ b/Tool/Model/HmiCqAlarm.cs @@ -0,0 +1,9 @@ +namespace Tool.Model +{ + public class HmiCqAlarm : BoolModelFactory + { + public HmiCqAlarm() : base("CQ_alarm_A", "CQ_alarm_B") + { + } + } +} \ No newline at end of file diff --git a/Tool/Model/HmiCqModel.cs b/Tool/Model/HmiCqModel.cs new file mode 100644 index 0000000..b741d2d --- /dev/null +++ b/Tool/Model/HmiCqModel.cs @@ -0,0 +1,9 @@ +namespace Tool.Model +{ + public class HmiCqModel : BoolModelFactory + { + public HmiCqModel() : base("HMI_button_CQ_ON[0]", "HMI_button_CQ_ON[1]") + { + } + } +} \ No newline at end of file diff --git a/Tool/Model/HmiLpModel.cs b/Tool/Model/HmiLpModel.cs new file mode 100644 index 0000000..b77f560 --- /dev/null +++ b/Tool/Model/HmiLpModel.cs @@ -0,0 +1,9 @@ +namespace Tool.Model +{ + public class HmiLpModel : BoolModelFactory + { + public HmiLpModel() : base("HMI_button_LP_ON[0]", "HMI_button_LP_ON[1]") + { + } + } +} \ No newline at end of file