From 3ce6388b0b3448d65afec7b43a00e4bf81ec478b Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Wed, 27 Apr 2016 18:05:12 +0200 Subject: [PATCH] vettori errori --- MTC_Sim/.vs/MTC_Sim/v14/.suo | Bin 122368 -> 128512 bytes MTC_Sim/MTC_Sim/CMS_MachineSim.Designer.cs | 209 +++++++++++++-------- MTC_Sim/MTC_Sim/CMS_MachineSim.cs | 88 +++++++-- MTC_Sim/MTC_Sim/utils.cs | 2 +- 4 files changed, 202 insertions(+), 97 deletions(-) diff --git a/MTC_Sim/.vs/MTC_Sim/v14/.suo b/MTC_Sim/.vs/MTC_Sim/v14/.suo index eae464281f27f2262455b04da778e5b57c5963d1..6d68a4170e1100bcdd13ce614af1f0d34fb3971f 100644 GIT binary patch delta 501 zcmZqJ!`|?QeS(1^69W_oFfi}}nan`^@Bjb*AW;xoaATk}6YGUF^~Q5I7c%{3X1&1q z%5H9RA=~ysHb%R|>D?8KfzvV=A5MRm#&{0Iy8?)* /// Dati di produzione (su form) @@ -606,12 +596,12 @@ namespace MTC_Sim // allarmi... - answ.err_01 = ERR_01.Checked; - answ.err_02 = ERR_02.Checked; - answ.err_03 = ERR_03.Checked; - answ.err_04 = ERR_04.Checked; - answ.err_05 = ERR_05.Checked; - answ.err_06 = ERR_06.Checked; + answ.err_01 = SysErr_01.Checked; + answ.err_02 = SysErr_02.Checked; + answ.err_03 = SysErr_03.Checked; + answ.err_04 = PlcErr_01.Checked; + answ.err_05 = PlcErr_02.Checked; + answ.err_06 = PlcErr_03.Checked; // ritorno oggetto! @@ -902,5 +892,69 @@ namespace MTC_Sim #endregion + #region gestione allarmi + + /// + /// Vettore errori system + /// + public List systemAlarm + { + get + { + List answ = new List(); + // controllo se ho valori errori checked... + if (SysErr_01.Checked) answ.Add(1); + if (SysErr_02.Checked) answ.Add(2); + if (SysErr_03.Checked) answ.Add(3); + + return answ; + } + } + /// + /// Vettore errori PLC + /// + public List plcAlarm + { + get + { + List answ = new List(); + // controllo se ho valori errori checked... + if (PlcErr_01.Checked) answ.Add(1); + if (PlcErr_02.Checked) answ.Add(2); + if (PlcErr_03.Checked) answ.Add(3); + + return answ; + } + } + /// + /// Vettore errori CNC + /// + public List cncAlarm + { + get + { + List answ = new List(); + // controllo se ho valori errori checked... + if (CncErr_01.Checked) answ.Add(1); + if (CncErr_02.Checked) answ.Add(2); + if (CncErr_03.Checked) answ.Add(3); + + return answ; + } + } + + public List> otherAlarm + { + get + { + List> answ = new List>(); + if (ErrRT_01.Checked) answ.Add(new DataRefItem(1, "TEMP")); + if (ErrRT_02.Checked) answ.Add(new DataRefItem(1, "FILL")); + + return answ; + } + } + + #endregion } } diff --git a/MTC_Sim/MTC_Sim/utils.cs b/MTC_Sim/MTC_Sim/utils.cs index fe5a177..cfc3eca 100644 --- a/MTC_Sim/MTC_Sim/utils.cs +++ b/MTC_Sim/MTC_Sim/utils.cs @@ -156,7 +156,7 @@ namespace MTC_Sim public bool err_05; public bool err_06; } - + public struct PathData { public int PathSel;