diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaCMS.cs b/IOB-WIN-NEXT/IobOpc/OpcUaCMS.cs
index 425cdcc3..1c0273ae 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaCMS.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaCMS.cs
@@ -12,7 +12,8 @@ namespace IOB_WIN_NEXT.IobOpc
#region Public Constructors
///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la gestione specifica per CMS/SCM (es. Eidos termoformatrice)
+ /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
+ /// gestione specifica per CMS/SCM (es. Eidos termoformatrice)
/// https://github.com/OPCFoundation/UA-.NETStandard
///
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaEwon.cs b/IOB-WIN-NEXT/IobOpc/OpcUaEwon.cs
index 1f1ac6b9..605e3ab8 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaEwon.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaEwon.cs
@@ -12,7 +12,8 @@ namespace IOB_WIN_NEXT.IobOpc
#region Public Constructors
///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la gestione specifica per EWON (es Monti, Tenditalia)
+ /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
+ /// gestione specifica per EWON (es Monti, Tenditalia)
/// https://github.com/OPCFoundation/UA-.NETStandard
///
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaEwonBLM.cs b/IOB-WIN-NEXT/IobOpc/OpcUaEwonBLM.cs
index 481ada31..bd2ead53 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaEwonBLM.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaEwonBLM.cs
@@ -8,7 +8,8 @@ namespace IOB_WIN_NEXT.IobOpc
#region Public Constructors
///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la gestione specifica per EWON (es Monti, Tenditalia)
+ /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
+ /// gestione specifica per EWON (es Monti, Tenditalia)
/// https://github.com/OPCFoundation/UA-.NETStandard
///
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaEwonMecolpress.cs b/IOB-WIN-NEXT/IobOpc/OpcUaEwonMecolpress.cs
index de94e37a..5c67aea7 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaEwonMecolpress.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaEwonMecolpress.cs
@@ -10,7 +10,8 @@ namespace IOB_WIN_NEXT.IobOpc
#region Public Constructors
///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la gestione specifica per EWON (es Monti, Tenditalia)
+ /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
+ /// gestione specifica per EWON (es Monti, Tenditalia)
/// https://github.com/OPCFoundation/UA-.NETStandard
///
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaEwonMonti.cs b/IOB-WIN-NEXT/IobOpc/OpcUaEwonMonti.cs
index 1ba67719..95958531 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaEwonMonti.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaEwonMonti.cs
@@ -11,7 +11,8 @@ namespace IOB_WIN_NEXT.IobOpc
#region Public Constructors
///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la gestione specifica per EWON (es Monti, Tenditalia)
+ /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
+ /// gestione specifica per EWON (es Monti, Tenditalia)
/// https://github.com/OPCFoundation/UA-.NETStandard
///
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaImas.cs b/IOB-WIN-NEXT/IobOpc/OpcUaImas.cs
index fac5d30d..31e05748 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaImas.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaImas.cs
@@ -9,22 +9,12 @@ namespace IOB_WIN_NEXT.IobOpc
{
public class OpcUaImas : OpcUa
{
- #region Protected Fields
-
- ///
- /// Modalità cambio ODL
- ///
- protected string CHANGE_ODL_MODE = "";
-
- protected bool testDone = false;
-
- #endregion Protected Fields
-
#region Public Constructors
///
/// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
- /// gestione specifica per IMAS OPC-UA (es Jetco) https://github.com/OPCFoundation/UA-.NETStandard
+ /// gestione specifica per IMAS OPC-UA (es Jetco)
+ /// https://github.com/OPCFoundation/UA-.NETStandard
///
///
///
@@ -137,6 +127,17 @@ namespace IOB_WIN_NEXT.IobOpc
#endregion Public Methods
+ #region Protected Fields
+
+ ///
+ /// Modalità cambio ODL
+ ///
+ protected string CHANGE_ODL_MODE = "";
+
+ protected bool testDone = false;
+
+ #endregion Protected Fields
+
#region Protected Methods
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaMBH.cs b/IOB-WIN-NEXT/IobOpc/OpcUaMBH.cs
index b4ca966b..a89e1700 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaMBH.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaMBH.cs
@@ -13,7 +13,8 @@ namespace IOB_WIN_NEXT.IobOpc
///
/// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
- /// gestione specifica per MBH OPC-UA (es OPC, Cimolai per Baglietto) https://github.com/OPCFoundation/UA-.NETStandard
+ /// gestione specifica per MBH OPC-UA (es OPC, Cimolai per Baglietto)
+ /// https://github.com/OPCFoundation/UA-.NETStandard
///
///
///
@@ -220,7 +221,6 @@ namespace IOB_WIN_NEXT.IobOpc
// se abilitata gestione ODL esegue eventuale chiusura
-
// se abilitato watchdog...
if (opcUaParams.WatchDog.IsEnabled)
{
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaMBHCimolai.cs b/IOB-WIN-NEXT/IobOpc/OpcUaMBHCimolai.cs
index 2c946f65..4110126c 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaMBHCimolai.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaMBHCimolai.cs
@@ -14,7 +14,8 @@ namespace IOB_WIN_NEXT.IobOpc
///
/// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
- /// gestione specifica per MBH (es Cimolai, Baglietto) https://github.com/OPCFoundation/UA-.NETStandard
+ /// gestione specifica per MBH (es Cimolai, Baglietto)
+ /// https://github.com/OPCFoundation/UA-.NETStandard
///
///
///
@@ -62,8 +63,6 @@ namespace IOB_WIN_NEXT.IobOpc
}
}
- protected bool EXEMODE_CHECK_BYPASS = false;
-
#endregion Public Constructors
#region Public Methods
@@ -191,10 +190,16 @@ namespace IOB_WIN_NEXT.IobOpc
#region Protected Fields
+ protected bool EXEMODE_CHECK_BYPASS = false;
protected int lastAct = 0;
protected bool lastIsInCorso = false;
+ ///
+ /// Ultimo rum mode rilevato x decidere SE inviare variazione...
+ ///
+ protected int lastRunMode = -999;
+
protected int VETO_SEND_SNAPSHOT = 10;
protected DateTime vetoSnapshot = DateTime.Now;
@@ -220,31 +225,6 @@ namespace IOB_WIN_NEXT.IobOpc
#region Protected Properties
- ///
- /// Lavorazione in CORSO = da keyExeMode valore di PLC/DB231/InCorso
- ///
- protected bool isInCorso
- {
- get
- {
- bool answ = false;
- if (!string.IsNullOrEmpty(opcUaParams.keyExeMode))
- {
- string currExe = getDataItemValue(opcUaParams.keyExeMode);
- if (!string.IsNullOrEmpty(currExe))
- {
- bool.TryParse(currExe, out answ);
- }
- }
- return answ;
- }
- }
-
- ///
- /// Ultimo rum mode rilevato x decidere SE inviare variazione...
- ///
- protected int lastRunMode = -999;
-
///
/// Attività corrente (INT) da keyRunMode valore di PLC/DB231/Attivita
///
@@ -269,6 +249,26 @@ namespace IOB_WIN_NEXT.IobOpc
protected DateTime currTravelStateStart { get; set; } = DateTime.Today.AddYears(-1);
+ ///
+ /// Lavorazione in CORSO = da keyExeMode valore di PLC/DB231/InCorso
+ ///
+ protected bool isInCorso
+ {
+ get
+ {
+ bool answ = false;
+ if (!string.IsNullOrEmpty(opcUaParams.keyExeMode))
+ {
+ string currExe = getDataItemValue(opcUaParams.keyExeMode);
+ if (!string.IsNullOrEmpty(currExe))
+ {
+ bool.TryParse(currExe, out answ);
+ }
+ }
+ return answ;
+ }
+ }
+
///
/// Indica se abbia stato MANUAL x CIMOLAI
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaOmron.cs b/IOB-WIN-NEXT/IobOpc/OpcUaOmron.cs
index 8f4aa902..c5446668 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaOmron.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaOmron.cs
@@ -12,7 +12,8 @@ namespace IOB_WIN_NEXT.IobOpc
#region Public Constructors
///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la gestione specifica per Omron (es ICOEL)
+ /// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
+ /// gestione specifica per Omron (es ICOEL)
/// https://github.com/OPCFoundation/UA-.NETStandard
///
///
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaOmronIcoel.cs b/IOB-WIN-NEXT/IobOpc/OpcUaOmronIcoel.cs
index 6236a6d3..33a4fd1a 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaOmronIcoel.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaOmronIcoel.cs
@@ -127,6 +127,76 @@ namespace IOB_WIN_NEXT.IobOpc
#endregion Public Methods
}
+ public class MesItemStatus
+ {
+ #region Public Constructors
+
+ public MesItemStatus(byte[] rawData)
+ {
+ Stato = (IcoelStatus)BitConverter.ToUInt16(rawData, 0);
+ Velocita = BitConverter.ToUInt16(rawData, 2);
+ Termico = !rawData.Skip(4).Take(1).FirstOrDefault().Equals(0);
+ MagnetoTermico = !rawData.Skip(5).Take(1).FirstOrDefault().Equals(0);
+ AvariaInverter = !rawData.Skip(6).Take(1).FirstOrDefault().Equals(0);
+ }
+
+ #endregion Public Constructors
+
+ #region Public Properties
+
+ public bool AvariaInverter { get; set; } = false;
+ public bool MagnetoTermico { get; set; } = false;
+ public IcoelStatus Stato { get; set; } = 0;
+ public bool Termico { get; set; } = false;
+ public UInt16 Velocita { get; set; } = 0;
+
+ #endregion Public Properties
+
+ #region Public Methods
+
+ public override bool Equals(object obj)
+ {
+ // Object is not a GaugeModel instance
+ if (!(obj is MesItemStatus item))
+ return false;
+
+ if (Stato != item.Stato)
+ return false;
+ if (Velocita != item.Velocita)
+ return false;
+ if (Termico != item.Termico)
+ return false;
+ if (MagnetoTermico != item.MagnetoTermico)
+ return false;
+ if (AvariaInverter != item.AvariaInverter)
+ return false;
+
+ return true;
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ ///
+ /// Converte un singolo item in un array di byte per scrittura su PLC S7
+ ///
+ ///
+ public byte[] serialize()
+ {
+ byte[] answ = new byte[7];
+ Buffer.BlockCopy(BitConverter.GetBytes((short)Stato), 0, answ, 0, 2);
+ Buffer.BlockCopy(BitConverter.GetBytes(Velocita), 0, answ, 2, 2);
+ Buffer.BlockCopy(BitConverter.GetBytes(Termico), 0, answ, 4, 1);
+ Buffer.BlockCopy(BitConverter.GetBytes(MagnetoTermico), 0, answ, 5, 1);
+ Buffer.BlockCopy(BitConverter.GetBytes(AvariaInverter), 0, answ, 6, 1);
+ return answ;
+ }
+
+ #endregion Public Methods
+ }
+
public class OpcUaOmronIcoel : OpcUaOmron
{
#region Public Constructors
@@ -533,76 +603,6 @@ namespace IOB_WIN_NEXT.IobOpc
#endregion Protected Methods
}
- public class MesItemStatus
- {
- #region Public Constructors
-
- public MesItemStatus(byte[] rawData)
- {
- Stato = (IcoelStatus)BitConverter.ToUInt16(rawData, 0);
- Velocita = BitConverter.ToUInt16(rawData, 2);
- Termico = !rawData.Skip(4).Take(1).FirstOrDefault().Equals(0);
- MagnetoTermico = !rawData.Skip(5).Take(1).FirstOrDefault().Equals(0);
- AvariaInverter = !rawData.Skip(6).Take(1).FirstOrDefault().Equals(0);
- }
-
- #endregion Public Constructors
-
- #region Public Properties
-
- public bool AvariaInverter { get; set; } = false;
- public bool MagnetoTermico { get; set; } = false;
- public IcoelStatus Stato { get; set; } = 0;
- public bool Termico { get; set; } = false;
- public UInt16 Velocita { get; set; } = 0;
-
- #endregion Public Properties
-
- #region Public Methods
-
- public override bool Equals(object obj)
- {
- // Object is not a GaugeModel instance
- if (!(obj is MesItemStatus item))
- return false;
-
- if (Stato != item.Stato)
- return false;
- if (Velocita != item.Velocita)
- return false;
- if (Termico != item.Termico)
- return false;
- if (MagnetoTermico != item.MagnetoTermico)
- return false;
- if (AvariaInverter != item.AvariaInverter)
- return false;
-
- return true;
- }
-
- public override int GetHashCode()
- {
- return base.GetHashCode();
- }
-
- ///
- /// Converte un singolo item in un array di byte per scrittura su PLC S7
- ///
- ///
- public byte[] serialize()
- {
- byte[] answ = new byte[7];
- Buffer.BlockCopy(BitConverter.GetBytes((short)Stato), 0, answ, 0, 2);
- Buffer.BlockCopy(BitConverter.GetBytes(Velocita), 0, answ, 2, 2);
- Buffer.BlockCopy(BitConverter.GetBytes(Termico), 0, answ, 4, 1);
- Buffer.BlockCopy(BitConverter.GetBytes(MagnetoTermico), 0, answ, 5, 1);
- Buffer.BlockCopy(BitConverter.GetBytes(AvariaInverter), 0, answ, 6, 1);
- return answ;
- }
-
- #endregion Public Methods
- }
-
public class PlantStatus
{
#region Public Constructors
diff --git a/IOB-WIN-NEXT/IobOpc/OpcUaUlma.cs b/IOB-WIN-NEXT/IobOpc/OpcUaUlma.cs
index 7cfeb7d9..5deae16f 100644
--- a/IOB-WIN-NEXT/IobOpc/OpcUaUlma.cs
+++ b/IOB-WIN-NEXT/IobOpc/OpcUaUlma.cs
@@ -13,7 +13,8 @@ namespace IOB_WIN_NEXT.IobOpc
///
/// Estende l'init della classe base, impiegando il pacchetto Nuget OPC-UA foundation con la
- /// gestione specifica per ULMA OPC-UA (es Giacovelli) https://github.com/OPCFoundation/UA-.NETStandard
+ /// gestione specifica per ULMA OPC-UA (es Giacovelli)
+ /// https://github.com/OPCFoundation/UA-.NETStandard
///
///
///
@@ -210,7 +211,6 @@ namespace IOB_WIN_NEXT.IobOpc
// se abilitata gestione ODL esegue eventuale chiusura
-
// se abilitato watchdog...
if (opcUaParams.WatchDog.IsEnabled)
{