diff --git a/MTC_Adapter/CMSCncLib/CNC/CNC.OSAI/CNC.OSAI_SOAP.vb b/MTC_Adapter/CMSCncLib/CNC/CNC.OSAI/CNC.OSAI_SOAP.vb
index 1fc328c..763456a 100644
--- a/MTC_Adapter/CMSCncLib/CNC/CNC.OSAI/CNC.OSAI_SOAP.vb
+++ b/MTC_Adapter/CMSCncLib/CNC/CNC.OSAI/CNC.OSAI_SOAP.vb
@@ -1072,133 +1072,7 @@ Retry: nRetry += 1
End Function
#If False Then
-
- Public Function getPathGCode1Shot() As Focas1.ODBGCD
- ' RIFERIMENTO:
- ' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Misc\cnc_rdgcode.htm
-
- Dim nPathIdx As Integer
- Dim nNumAxisRead As Integer
- Dim nReturn As Integer
-
- Dim actGCode As Focas1.ODBGCD
- ' inizializzo
- actGCode = New Focas1.ODBGCD
-
- 'leggo il numero del processo attivo
- nPathIdx = GetActivePath()
- 'leggo num max assi dal cn
- nNumAxisRead = Focas1.MAX_AXIS
-
- If Is30Series Then
-
- ' leggo tutto!!! 0-27 (28 elementi)
- nReturn = Focas1.cnc_rdgcode(nLibHandle(nPathIdx), -2, 1, 4, actGCode)
-
- If F_CheckRetError_Cnc(nReturn, "cnc_rdgcode RefreshPathGCode CNC.FANUC.CMS_CncLib") Then
- Throw New CmsNcException("ERR cnc_rdgcode RefreshPathGCode CNC.FANUC.CMS_CncLib")
- End If
- End If
-
- Return actGCode
-
- End Function
-#End If
-
-#If False Then
-
- Public Function getAllAxisLoad() As Focas1.ODBSVLOAD
- ' RIFERIMENTO:
- ' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rdsvmeter.htm
-
- Dim nPathIdx As Integer
- Dim nNumAxisRead As Integer
- Dim nReturn As Integer
-
- Dim caricoAssi As Focas1.ODBSVLOAD
-
- 'leggo il numero del processo attivo
- nPathIdx = GetActivePath()
- 'leggo num max assi dal cn
- nNumAxisRead = Focas1.MAX_AXIS
-
- If Is30Series Then
-
- ' leggo tutto!!!
- nReturn = Focas1.cnc_rdsvmeter(nLibHandle(nPathIdx), nNumAxisRead, caricoAssi)
-
- If F_CheckRetError_Cnc(nReturn, "cnc_rdsvmeter RefreshAxisMeter CNC.FANUC.CMS_CncLib") Then
- Throw New CmsNcException("ERR cnc_rdsvmeter RefreshAxisMeter CNC.FANUC.CMS_CncLib")
- End If
- End If
-
- Return caricoAssi
-
- End Function
-
- Public Function getGlobalFeedrate() As Focas1.ODBACT
- ' RIFERIMENTO:
- ' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_actf.htm
-
- Dim nPathIdx As Integer
- Dim nNumAxisRead As Integer
- Dim nReturn As Integer
-
- Dim feedData As Focas1.ODBACT
- ' inizializzo
- feedData = New Focas1.ODBACT
-
- 'leggo il numero del processo attivo
- nPathIdx = GetActivePath()
- 'leggo num max assi dal cn
- nNumAxisRead = Focas1.MAX_AXIS
-
- If Is30Series Then
-
- ' leggo feed globale
- nReturn = Focas1.cnc_actf(nLibHandle(nPathIdx), feedData)
-
- If F_CheckRetError_Cnc(nReturn, "cnc_actf RefreshActFeedRate CNC.FANUC.CMS_CncLib") Then
- Throw New CmsNcException("ERR cnc_actf RefreshActFeedRate CNC.FANUC.CMS_CncLib")
- End If
- End If
-
- Return feedData
-
- End Function
-
- Public Function getSpindleLoad() As Focas1.ODBSPN
- ' RIFERIMENTO:
- ' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rdspload.htm
- ' RICHIEDE DRIVER ESTESO!!! NON VA!!!
-
- Dim nPathIdx As Integer
- Dim nNumAxisRead As Integer
- Dim nReturn As Integer
-
- Dim allData As Focas1.ODBSPN
- ' inizializzo
- allData = New Focas1.ODBSPN
-
- 'leggo il numero del processo attivo
- nPathIdx = GetActivePath()
- 'leggo num max assi dal cn
- nNumAxisRead = Focas1.MAX_AXIS
-
- If Is30Series Then
-
- ' leggo feed globale
- nReturn = Focas1.cnc_rdspload(nLibHandle(nPathIdx), -1, allData)
-
- If F_CheckRetError_Cnc(nReturn, "cnc_rdspload RefreshAllSpindleLoad CNC.FANUC.CMS_CncLib") Then
- Throw New CmsNcException("ERR cnc_rdspload RefreshAllSpindleLoad CNC.FANUC.CMS_CncLib")
- End If
- End If
-
- Return allData
-
- End Function
-
+
Public Function getCncAlarm() As Focas1.ODBALMMSG2
' RIFERIMENTO:
@@ -1269,34 +1143,7 @@ Retry: nRetry += 1
End Function
- Public Function getSpindleSpeed() As Focas1.ODBSPEED
- ' RIFERIMENTO:
- ' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rdspeed.htm
-
- Dim nPathIdx As Integer
- Dim nNumAxisRead As Integer
- Dim nReturn As Integer
-
- Dim speedAssi As Focas1.ODBSPEED
-
- 'leggo il numero del processo attivo
- nPathIdx = GetActivePath()
- 'leggo num max assi dal cn
- nNumAxisRead = Focas1.MAX_AXIS
-
- If Is30Series Then
-
- ' leggo tutto!!!
- nReturn = Focas1.cnc_rdspeed(nLibHandle(nPathIdx), -1, speedAssi)
-
- If F_CheckRetError_Cnc(nReturn, "cnc_rdspeed RefreshAxisSpeed CNC.FANUC.CMS_CncLib") Then
- Throw New CmsNcException("ERR cnc_rdspeed RefreshAxisSpeed CNC.FANUC.CMS_CncLib")
- End If
- End If
-
- Return speedAssi
-
- End Function
+
#End If
#End Region
diff --git a/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb b/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb
index 3b7a3f8..18e293c 100644
--- a/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb
+++ b/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb
@@ -12,6 +12,9 @@ Namespace CNC
Private m_DataSvcRW As DataSvc
Private m_DriveSVC As DrivesSvc
+ Private m_AlarmService As AlarmSvc
+ Private m_AlarmGuid As System.Guid
+ Private currAlarms As Alarm()
Private itemRead() As Item
Private itemWrite As Item
@@ -60,6 +63,9 @@ Namespace CNC
Try
m_DataSvcRW = New DataSvc
m_DriveSVC = New DrivesSvc
+ m_AlarmService = New AlarmSvc("eng")
+ ' sottoscrivo allarmi...
+ m_AlarmGuid = m_AlarmService.Subscribe(New AlarmListChanged(AddressOf AlarmList))
Catch ex As System.IO.FileNotFoundException
' intercetta l'exception se non lanciato sopra l'hmi
@@ -931,13 +937,13 @@ Namespace CNC
'''
Public tabFamUt As UShort()
'''
- ''' Tabella TIPO Vita Residua Famiglie Utensili (DB253.DBW1900)
+ ''' Tabella TIPO Vita Residua Famiglie Utensili (DB253.DBB1900)
'''
- Public tabTipoVitaRes As UShort()
+ Public tabTipoVitaRes As Byte()
'''
- ''' Tabella Vita Residua Famiglie Utensili (DB253.DBW4300)
+ ''' Tabella Vita Residua Famiglie Utensili (DB253.DBD4300)
'''
- Public tabVitaRes As UShort()
+ Public tabVitaRes As UInt32()
End Structure
@@ -949,10 +955,11 @@ Namespace CNC
' RIFERIMENTO:
' txt Giuseppe
- ReDim itemRead(2)
+ ReDim itemRead(3)
itemRead(0) = New Item("DB241.DBD0:[16]") 'Posizione attuale
itemRead(1) = New Item("DB254.DBW140:[20]") 'Speed effettiva
itemRead(2) = New Item("DB254.DBB180:[20]") 'Carico effettivo
+ itemRead(3) = New Item("/Channel/MachineAxis/toolBaseDistToGo[u1,1, 16]")
'itemRead(3) = New Item("DB241.DBD0:[16]") 'Posizione Target !!!FARE!!! è altra variabile?!? AA_IM
Do
@@ -972,7 +979,7 @@ Namespace CNC
For i As Integer = 0 To 15
'datiAssi(i).PosAct = itemRead(0).Value(i)
datiAssi(i).PosAct = UIntegerToSingle(itemRead(0).Value(i))
- 'datiAssi(i).PosTgt = UIntegerToSingle(itemRead(3).Value(i))
+ datiAssi(i).PosTgt = Convert.ToSingle(itemRead(3).Value(i))
Next i
For i As Integer = 0 To 19
datiAssi(i).Speed = UIntegerToSingle(itemRead(1).Value(i))
@@ -997,7 +1004,7 @@ Namespace CNC
itemRead(1) = New Item("DB253.DBW2500:[" & numVal & "]") 'tabUt_UT
itemRead(2) = New Item("DB253.DBW2900:[" & numVal & "]") 'IdFamigliaUt
itemRead(3) = New Item("DB253.DBW100:[" & numVal & "]") 'tabFamUt
- itemRead(4) = New Item("DB253.DBW1900:[" & numVal & "]") 'tabTipoVitaRes
+ itemRead(4) = New Item("DB253.DBB1900:[" & numVal & "]") 'tabTipoVitaRes
itemRead(5) = New Item("DB253.DBD4300:[" & numVal & "]") 'tabVitaRes
Do
@@ -1018,8 +1025,8 @@ Namespace CNC
Dim _tabUt_UT(numVal - 1) As UShort
Dim _tabIdFamUt(numVal - 1) As UShort
Dim _tabFamUt(numVal - 1) As UShort
- Dim _tabTipoVitaRes(numVal - 1) As UShort
- Dim _tabVitaRes(numVal - 1) As UShort
+ Dim _tabTipoVitaRes(numVal - 1) As Byte
+ Dim _tabVitaRes(numVal - 1) As UInt32
' faccio copia valori!
For i As Integer = 0 To numUt - 1
@@ -1059,6 +1066,78 @@ Namespace CNC
End Function
+ '''
+ ''' recupera l'array dei codici G attivi
+ '''
+ '''
+ ''' Vettore codici attivi correnti
+ '''
+ Public Function getPathGCodeMod(maxProc As Integer, ByRef GCodeCurr As String(,)) As Boolean
+ ' RIFERIMENTO:
+ ' SynumerikOperate_net, pg 52
+ ' Parameter manual NC, pg 401
+
+ ' preparo memorie
+ Dim maxGruppi As Int16
+ maxGruppi = 64
+ ReDim itemRead(maxProc - 1)
+ For i As Integer = 0 To maxProc - 1
+ itemRead(i) = New Item("/Channel/SelectedFunctions/ncFktAct[u" & i + 1 & ",1,#" & maxGruppi & "]") ' leggo TUTTI i gruppi...
+ ' verificare sintassi...[u1,1,64] al posto di [u1,1,#64]
+ 'itemRead(i) = New Item("/Channel/SelectedFunctions/ncFktAct[u" & i + 1 & ",1," & maxGruppi & "]") ' leggo TUTTI i gruppi...
+ Next i
+
+ 'lettura
+ Do
+ Try
+ m_DataSvcRW.Read(itemRead)
+ Exit Do
+ Catch ex As DataSvcBusyException
+ Debug.Print(ex.Message)
+ Catch ex As DataSvcException
+ Throw New CmsNcException("ERR GetStaticData CNC.SIEMENS DataSvcException", ex)
+ End Try
+ Loop
+
+ ' faccio copia valori!
+ For i As Integer = 0 To maxGruppi - 1
+ For j As Integer = 0 To maxProc - 1
+ GCodeCurr(j, i) = itemRead(j).Value(i)
+ Next j
+ Next i
+
+ ' chiudo!
+ Return True
+
+ End Function
+
+ '''
+ ''' procedura per risposta alla segnalazione di allarmi...
+ '''
+ '''
+ '''
+ Public Sub AlarmList(guid As Guid, alarms() As Alarm)
+ ' RIFERIMENTO:
+ ' SynumerikOperate_Net, pg 101 --> 110 (NON serve verifica theread...)
+
+ ' verifico di essere il "corretto responditore"...
+ If (m_AlarmGuid.Equals(guid)) Then
+ ' salvo nel mio oggetto in memoria...
+ currAlarms = alarms
+ End If
+
+ End Sub
+
+ Public Function getCncAlarm() As Alarm()
+ ' RIFERIMENTO:
+ ' SynumerikOperate_Net, pg 101 --> 110
+
+ ' restituisco vettore allarmi...
+ Return currAlarms
+
+ End Function
+
+
#End Region
End Class
diff --git a/MTC_Adapter/MTC_Adapter/AdapterConf.cs b/MTC_Adapter/MTC_Adapter/AdapterConf.cs
index 85e35ab..3b432b1 100644
--- a/MTC_Adapter/MTC_Adapter/AdapterConf.cs
+++ b/MTC_Adapter/MTC_Adapter/AdapterConf.cs
@@ -6,453 +6,453 @@ using System.Xml.Serialization;
namespace MTC_Adapter
{
- #region -- AdapterConf Class --
+ #region -- AdapterConf Class --
+
+ ///
+ /// This Configuration class is basically just a set of
+ /// properties with a couple of static methods to manage
+ /// the serialization to and deserialization from a
+ /// simple XML file.
+ ///
+ /// ref: http://www.cambiaresearch.com/articles/33/how-can-i-easily-manage-an-xml-configuration-file-in-dotnet
+ ///
+ [Serializable]
+ public class AdapterConf
+ {
+ string sNomeAdapt;
+ int nVers;
+ double tContOreMaccOn;
+ double tContOreMaccLav;
+ double tContSlittaTast;
+ int[] _ContGiriElettrom;
+ float[] _ContKmMovAssi;
+ tipoAdapter etipoAdapt;
+
+ element[] _VacuumPump;
+ element[] _VacuumAct;
+ element[] _Lubro;
+ element[] _SlittaMag;
+ element[] _ProtMag;
+ element[] _Cooler;
+ element[] _Press;
+ element[] _Temp;
+ element[] _Path;
+ element[] _UnOp;
+ element[] _Axis;
+ element[] _MemArea;
///
- /// This Configuration class is basically just a set of
- /// properties with a couple of static methods to manage
- /// the serialization to and deserialization from a
- /// simple XML file.
- ///
- /// ref: http://www.cambiaresearch.com/articles/33/how-can-i-easily-manage-an-xml-configuration-file-in-dotnet
+ /// init conf adapter
///
- [Serializable]
- public class AdapterConf
+ public AdapterConf()
{
- string sNomeAdapt;
- int nVers;
- double tContOreMaccOn;
- double tContOreMaccLav;
- double tContSlittaTast;
- int[] _ContGiriElettrom;
- float[] _ContKmMovAssi;
- tipoAdapter etipoAdapt;
-
- element[] _VacuumPump;
- element[] _VacuumAct;
- element[] _Lubro;
- element[] _SlittaMag;
- element[] _ProtMag;
- element[] _Cooler;
- element[] _Press;
- element[] _Temp;
- element[] _Path;
- element[] _UnOp;
- element[] _Axis;
- element[] _MemArea;
-
- ///
- /// init conf adapter
- ///
- public AdapterConf()
- {
- sNomeAdapt = "";
- etipoAdapt = tipoAdapter.DEMO;
- }
- public int nVacuumPump
- {
- get
- {
- int answ = 0;
- if (VacuumPump != null)
- {
- try
- {
- answ = Convert.ToInt32(VacuumPump.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nVacuumAct
- {
- get
- {
- int answ = 0;
- if (VacuumAct != null)
- {
- try
- {
- answ = Convert.ToInt32(VacuumAct.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nLubro
- {
- get
- {
- int answ = 0;
- if (Lubro != null)
- {
- try
- {
- answ = Convert.ToInt32(Lubro.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nSlittaMag
- {
- get
- {
- int answ = 0;
- if (SlittaMag != null)
- {
- try
- {
- answ = Convert.ToInt32(SlittaMag.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nProtMag
- {
- get
- {
- int answ = 0;
- if (ProtMag != null)
- {
- try
- {
- answ = Convert.ToInt32(ProtMag.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nCooler
- {
- get
- {
- int answ = 0;
- if (Cooler != null)
- {
- try
- {
- answ = Convert.ToInt32(Cooler.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nPress
- {
- get
- {
- int answ = 0;
- if (Press != null)
- {
- try
- {
- answ = Convert.ToInt32(Press.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nTemp
- {
- get
- {
- int answ = 0;
- if (Temp != null)
- {
- try
- {
- answ = Convert.ToInt32(Temp.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nPath
- {
- get
- {
- int answ = 0;
- if (Path != null)
- {
- try
- {
- answ = Convert.ToInt32(Path.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nUnOp
- {
- get
- {
- int answ = 0;
- if (UnOp != null)
- {
- try
- {
- answ = Convert.ToInt32(UnOp.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nAxis
- {
- get
- {
- int answ = 0;
- if (Axis != null)
- {
- try
- {
- answ = Convert.ToInt32(Axis.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
- public int nMemArea
- {
- get
- {
- int answ = 0;
- if (MemArea != null)
- {
- try
- {
- answ = Convert.ToInt32(MemArea.Length);
- }
- catch
- { }
- }
- return answ;
- }
- }
-
- ///
- /// Serializzazione XML dell'oggetto conf dell'adapter
- ///
- ///
- ///
- public static void Serialize(string file, AdapterConf c)
- {
- // prima provo a creare il file vuoto...
- if (!File.Exists(file))
- {
- string dirPath = file.Substring(0, file.LastIndexOf('\\'));
- // verifico directory
- if (!Directory.Exists(dirPath))
- {
- Directory.CreateDirectory(dirPath);
- }
- }
- // salvo effettivamente file...
- System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(c.GetType());
- StreamWriter writer = File.CreateText(file);
- xs.Serialize(writer, c);
- writer.Flush();
- writer.Close();
- }
- ///
- /// deserializzazione oggetto conf adapter
- ///
- ///
- ///
- public static AdapterConf Deserialize(string file)
- {
- XmlSerializer xs = new XmlSerializer(typeof(AdapterConf));
- StreamReader reader = File.OpenText(file);
- AdapterConf c = (AdapterConf)xs.Deserialize(reader);
- reader.Close();
- return c;
- }
- ///
- /// restitusice forma XML grezza del file
- ///
- ///
- ///
- public static string rawXml(string file)
- {
- string answ = "";
- System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(AdapterConf));
- StreamReader reader = File.OpenText(file);
- answ = reader.ReadToEnd();
- reader.Close();
- return answ;
- }
-
- public int Version
- {
- get { return nVers; }
- set { nVers = value; }
- }
- public string NomeAdapt
- {
- get { return sNomeAdapt; }
- set { sNomeAdapt = value; }
- }
- public tipoAdapter TipoAdapt
- {
- get { return etipoAdapt; }
- set { etipoAdapt = value; }
- }
- public double ContOreMaccOn
- {
- get { return tContOreMaccOn; }
- set { tContOreMaccOn = value; }
- }
- public double ContOreMaccLav
- {
- get { return tContOreMaccLav; }
- set { tContOreMaccLav = value; }
- }
- public double ContSlittaTast
- {
- get { return tContSlittaTast; }
- set { tContSlittaTast = value; }
- }
- public int[] ContGiriElettrom
- {
- get { return _ContGiriElettrom; }
- set { _ContGiriElettrom = value; }
- }
- public float[] ContKmMovAssi
- {
- get { return _ContKmMovAssi; }
- set { _ContKmMovAssi = value; }
- }
- public element[] VacuumPump
- {
- get { return _VacuumPump; }
- set { _VacuumPump = value; }
- }
- public element[] VacuumAct
- {
- get { return _VacuumAct; }
- set { _VacuumAct = value; }
- }
- public element[] Lubro
- {
- get { return _Lubro; }
- set { _Lubro = value; }
- }
- public element[] SlittaMag
- {
- get { return _SlittaMag; }
- set { _SlittaMag = value; }
- }
- public element[] ProtMag
- {
- get { return _ProtMag; }
- set { _ProtMag = value; }
- }
- public element[] Cooler
- {
- get { return _Cooler; }
- set { _Cooler = value; }
- }
- public element[] Press
- {
- get { return _Press; }
- set { _Press = value; }
- }
- public element[] Temp
- {
- get { return _Temp; }
- set { _Temp = value; }
- }
- public element[] Path
- {
- get { return _Path; }
- set { _Path = value; }
- }
- public element[] UnOp
- {
- get { return _UnOp; }
- set { _UnOp = value; }
- }
- public element[] Axis
- {
- get { return _Axis; }
- set { _Axis = value; }
- }
- public element[] MemArea
- {
- get { return _MemArea; }
- set { _MemArea = value; }
- }
-
+ sNomeAdapt = "";
+ etipoAdapt = tipoAdapter.DEMO;
}
-
-
- [Serializable]
- [XmlType(TypeName = "dataRef")]
- public struct DataRefItem
+ public int nVacuumPump
{
- public K Key { get; set; }
- public V Value { get; set; }
-
- public DataRefItem(K k, V v) : this() { Key = k; Value = v; }
+ get
+ {
+ int answ = 0;
+ if (VacuumPump != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(VacuumPump.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nVacuumAct
+ {
+ get
+ {
+ int answ = 0;
+ if (VacuumAct != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(VacuumAct.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nLubro
+ {
+ get
+ {
+ int answ = 0;
+ if (Lubro != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(Lubro.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nSlittaMag
+ {
+ get
+ {
+ int answ = 0;
+ if (SlittaMag != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(SlittaMag.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nProtMag
+ {
+ get
+ {
+ int answ = 0;
+ if (ProtMag != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(ProtMag.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nCooler
+ {
+ get
+ {
+ int answ = 0;
+ if (Cooler != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(Cooler.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nPress
+ {
+ get
+ {
+ int answ = 0;
+ if (Press != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(Press.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nTemp
+ {
+ get
+ {
+ int answ = 0;
+ if (Temp != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(Temp.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nPath
+ {
+ get
+ {
+ int answ = 0;
+ if (Path != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(Path.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nUnOp
+ {
+ get
+ {
+ int answ = 0;
+ if (UnOp != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(UnOp.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nAxis
+ {
+ get
+ {
+ int answ = 0;
+ if (Axis != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(Axis.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+ }
+ public int nMemArea
+ {
+ get
+ {
+ int answ = 0;
+ if (MemArea != null)
+ {
+ try
+ {
+ answ = Convert.ToInt32(MemArea.Length);
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
}
///
- /// classe elemento base in cui salvare i dati di conf x recupero dati adapters
+ /// Serializzazione XML dell'oggetto conf dell'adapter
///
- public class element
+ ///
+ ///
+ public static void Serialize(string file, AdapterConf c)
{
- ///
- /// identificativo univoco x classe di elemento
- ///
- public string ident;
- ///
- /// Elenco riferimento dati x recupero (es posizioni memoria separate da #)
- ///
- public List> dataRefList;
-
- ///
- /// init empty
- ///
- public element()
+ // prima provo a creare il file vuoto...
+ if (!File.Exists(file))
+ {
+ string dirPath = file.Substring(0, file.LastIndexOf('\\'));
+ // verifico directory
+ if (!Directory.Exists(dirPath))
{
- ident = "";
- dataRefList = new List>();
- }
- ///
- /// init element con dati
- ///
- /// Identificativo univoco
- /// Parametri x recupero dati in forma dictionary
- public element(string Idx, List> DataRef)
- {
- ident = Idx;
- dataRefList = DataRef;
+ Directory.CreateDirectory(dirPath);
}
+ }
+ // salvo effettivamente file...
+ System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(c.GetType());
+ StreamWriter writer = File.CreateText(file);
+ xs.Serialize(writer, c);
+ writer.Flush();
+ writer.Close();
+ }
+ ///
+ /// deserializzazione oggetto conf adapter
+ ///
+ ///
+ ///
+ public static AdapterConf Deserialize(string file)
+ {
+ XmlSerializer xs = new XmlSerializer(typeof(AdapterConf));
+ StreamReader reader = File.OpenText(file);
+ AdapterConf c = (AdapterConf)xs.Deserialize(reader);
+ reader.Close();
+ return c;
+ }
+ ///
+ /// restitusice forma XML grezza del file
+ ///
+ ///
+ ///
+ public static string rawXml(string file)
+ {
+ string answ = "";
+ System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(AdapterConf));
+ StreamReader reader = File.OpenText(file);
+ answ = reader.ReadToEnd();
+ reader.Close();
+ return answ;
}
- #endregion
+ public int Version
+ {
+ get { return nVers; }
+ set { nVers = value; }
+ }
+ public string NomeAdapt
+ {
+ get { return sNomeAdapt; }
+ set { sNomeAdapt = value; }
+ }
+ public tipoAdapter TipoAdapt
+ {
+ get { return etipoAdapt; }
+ set { etipoAdapt = value; }
+ }
+ public double ContOreMaccOn
+ {
+ get { return tContOreMaccOn; }
+ set { tContOreMaccOn = value; }
+ }
+ public double ContOreMaccLav
+ {
+ get { return tContOreMaccLav; }
+ set { tContOreMaccLav = value; }
+ }
+ public double ContSlittaTast
+ {
+ get { return tContSlittaTast; }
+ set { tContSlittaTast = value; }
+ }
+ public int[] ContGiriElettrom
+ {
+ get { return _ContGiriElettrom; }
+ set { _ContGiriElettrom = value; }
+ }
+ public float[] ContKmMovAssi
+ {
+ get { return _ContKmMovAssi; }
+ set { _ContKmMovAssi = value; }
+ }
+ public element[] VacuumPump
+ {
+ get { return _VacuumPump; }
+ set { _VacuumPump = value; }
+ }
+ public element[] VacuumAct
+ {
+ get { return _VacuumAct; }
+ set { _VacuumAct = value; }
+ }
+ public element[] Lubro
+ {
+ get { return _Lubro; }
+ set { _Lubro = value; }
+ }
+ public element[] SlittaMag
+ {
+ get { return _SlittaMag; }
+ set { _SlittaMag = value; }
+ }
+ public element[] ProtMag
+ {
+ get { return _ProtMag; }
+ set { _ProtMag = value; }
+ }
+ public element[] Cooler
+ {
+ get { return _Cooler; }
+ set { _Cooler = value; }
+ }
+ public element[] Press
+ {
+ get { return _Press; }
+ set { _Press = value; }
+ }
+ public element[] Temp
+ {
+ get { return _Temp; }
+ set { _Temp = value; }
+ }
+ public element[] Path
+ {
+ get { return _Path; }
+ set { _Path = value; }
+ }
+ public element[] UnOp
+ {
+ get { return _UnOp; }
+ set { _UnOp = value; }
+ }
+ public element[] Axis
+ {
+ get { return _Axis; }
+ set { _Axis = value; }
+ }
+ public element[] MemArea
+ {
+ get { return _MemArea; }
+ set { _MemArea = value; }
+ }
+
+ }
+
+
+ [Serializable]
+ [XmlType(TypeName = "dataRef")]
+ public struct DataRefItem
+ {
+ public K Key { get; set; }
+ public V Value { get; set; }
+
+ public DataRefItem(K k, V v) : this() { Key = k; Value = v; }
+ }
+
+ ///
+ /// classe elemento base in cui salvare i dati di conf x recupero dati adapters
+ ///
+ public class element
+ {
+ ///
+ /// identificativo univoco x classe di elemento
+ ///
+ public string ident;
+ ///
+ /// Elenco riferimento dati x recupero (es posizioni memoria separate da #)
+ ///
+ public List> dataRefList;
+
+ ///
+ /// init empty
+ ///
+ public element()
+ {
+ ident = "";
+ dataRefList = new List>();
+ }
+ ///
+ /// init element con dati
+ ///
+ /// Identificativo univoco
+ /// Parametri x recupero dati in forma dictionary
+ public element(string Idx, List> DataRef)
+ {
+ ident = Idx;
+ dataRefList = DataRef;
+ }
+ }
+
+ #endregion
}
diff --git a/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs b/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs
index 0bded35..a959f2b 100644
--- a/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs
+++ b/MTC_Adapter/MTC_Adapter/AdapterFanuc.cs
@@ -8,1358 +8,1362 @@ using System.Text;
namespace MTC_Adapter
{
- public class AdapterFanuc : AdapterGeneric
+ public class AdapterFanuc : AdapterGeneric
+ {
+ ///
+ /// Oggetto MAIN x connessione FANUC
+ ///
+ protected FANUC FANUC_ref;
+
+ ///
+ /// wrapper chiamata lettura/scrittura SINGOLO BYTE...
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool FanucMemRW(bool bWrite, FANUC.MemType MemType, Int32 memIndex, ref byte Value)
{
- ///
- /// Oggetto MAIN x connessione FANUC
- ///
- protected FANUC FANUC_ref;
-
- ///
- /// wrapper chiamata lettura/scrittura SINGOLO BYTE...
- ///
- ///
- ///
- ///
- ///
- ///
- public bool FanucMemRW(bool bWrite, FANUC.MemType MemType, Int32 memIndex, ref byte Value)
+ bool answ = false;
+ if (FANUC_ref.Connected)
+ {
+ try
{
- bool answ = false;
- if (FANUC_ref.Connected)
- {
- try
- {
- parentForm.commPlcActive = true;
- answ = FANUC_ref.F_RW_Byte(bWrite, MemType, memIndex, ref Value);
- }
- catch
- { }
- }
- parentForm.commPlcActive = false;
- return answ;
- }
- ///
- /// wrapper chiamata lettura/scrittura MULTI BYTE...
- ///
- ///
- ///
- ///
- ///
- ///
- public bool FanucMemRW(bool bWrite, FANUC.MemType MemType, Int32 memIndex, ref byte[] Value)
- {
- bool answ = false;
- if (FANUC_ref.Connected)
- {
- try
- {
- parentForm.commPlcActive = true;
- answ = FANUC_ref.F_RW_Byte(bWrite, MemType, memIndex, ref Value);
- }
- catch
- { }
- }
- parentForm.commPlcActive = false;
- return answ;
- }
-
- ///
- /// struttura dati fanuc x ALL DYN DATA
- /// C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rddynamic2.htm
- ///
- protected CMSCncLib.Focas1.ODBDY2_1 allDynData;
- ///
- /// Vettore degli allarmi CNC attivi
- ///
- public CMSCncLib.Focas1.ODBALMMSG2 allarmiCNC;
-
- ///
- /// estende l'init della classe base...
- ///
- ///
- ///
- public AdapterFanuc(MainForm caller, AdapterConf adpConf) : base(caller, adpConf)
- {
- lg.Info("Start init Adapter FANUC all'IP {0}", utils.CRS("ipPLC"));
-
- parentForm.commPlcActive = true;
- Runtime.CreateNC(CNC.NcType.FANUC, utils.CRS("ipPLC"));
- parentForm.commPlcActive = false;
-
- // inizializzo posizioni assi...
- prevPosAxis = new double[adpConf.nAxis];
- prevDirAxis = new int[adpConf.nAxis];
-
- FANUC_ref = (FANUC)Runtime.NC;
- if (utils.CRB("verbose")) lg.Info("FANUC_ref da CMSCncLib");
-
- // disconnetto e connetto...
- if (utils.CRB("verbose")) lg.Info("FANUC: tryDisconnect");
- tryDisconnect();
- lg.Info("FANUC: tryConnect");
- tryConnect();
- lg.Info("End init Adapter FANUC");
- }
- ///
- /// Override disconnessione
- ///
- public override void tryDisconnect()
- {
- if (connectionOk)
- {
- string szStatusConnection = "";
- try
- {
- FANUC_ref.Disconnect(ref szStatusConnection);
- connectionOk = false;
- lg.Info(szStatusConnection);
- lg.Info("Effettuata disconnessione adapter FANUC!");
- }
- catch (Exception exc)
- {
- lg.Fatal(exc, "Errore nella disconnessione dall'adapter FANUC");
- }
- }
- else
- {
- lg.Error("IMPOSSIBILE effettuare disconnessione: Connessione non disponibile...");
- }
- }
- ///
- /// Override connessione
- ///
- public override void tryConnect()
- {
- if (!connectionOk)
- {
- string szStatusConnection = "";
- try
- {
- parentForm.commPlcActive = true;
- FANUC_ref.Connect(ref szStatusConnection);
- parentForm.commPlcActive = false;
- lg.Info("szStatusConnection: " + szStatusConnection);
- connectionOk = true;
- // refresh stato allarmi!!!
- if (connectionOk)
- {
- if (adpRunning)
- {
- // carico status allarmi (completo)
- lg.Info("Inizio refresh completo stato allarmi...");
- forceAlarmCheck();
- lg.Info("Completato refresh completo stato allarmi!");
- }
- else
- {
- lg.Info("Connessione OK");
- }
- }
- else
- {
- lg.Error("Impossibile procedere, connessione mancante...");
- }
- }
- catch (Exception exc)
- {
- lg.Fatal(string.Format("Errore nella connessione all'adapter FANUC: {0}{1}{2}", szStatusConnection, Environment.NewLine, exc));
- connectionOk = false;
- lg.Info(string.Format("Segnalo Adapter NON running, pausa di {0} msec prima di ulteriori tentativi di riconnessione", utils.CRI("waitRecMSec")));
- }
- }
- }
-
- ///
- /// Verifico connessione FANUC...
- ///
- ///
- public override bool connectionOk
- {
- get
- {
- return FANUC_ref.Connected;
- }
- }
-
- ///
- /// Effettuo lettura dei 16 byte di strobe/status
- ///
- public override void getStrobeAndAckStatus()
- {
- base.getStrobeAndAckStatus();
- if (connectionOk)
- {
- // leggo TUTTO ack e strobe,
- byte[] MemBlock = new byte[Strobes.Length + Acknowl.Length];
- int memIndex = 10500;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STROBES", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
-
- // suddivido!
- Buffer.BlockCopy(MemBlock, 0, Acknowl, 0, Acknowl.Length);
- Buffer.BlockCopy(MemBlock, Acknowl.Length, Strobes, 0, Strobes.Length);
- }
- else
- {
- lg.Error("Errore connessione mancante in getStrobeAndAckStatus");
- }
- }
- ///
- /// processing strobe!
- ///
- public override void processStrobe()
- {
- // inizializzo userAction
- string UserAction = "";
- string TestingData = "";
- string UnkStrobe = "";
- // !!!FARE!!! multipath...
- // verifico i vari strobe x recuperare i dati... PER ORA SOLO DW1 per path1 (indice 0)...
- int idxPath = 0;
- int memIndex = 0;
- int bitNum = 0;
- inizio = DateTime.Now;
- // byte di acknowledge...
- byte[] retACK_DW1 = new byte[4];
- try
- {
- // controllo TUTTI i flag: se ce ne sono di alzati DEVO processare...
- if (STRB_DW1 != StFlag32.NONE)
- {
- // blocco memoria x lettura TUTTI i dati di buffer M/S/T: 46 byte: 2byte (16bit) x (11+6+6) aree
- byte[] MemBlock = new byte[46];
-
- // leggo tutto!!!
- memIndex = 10660;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW1", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
-
- // check COD_M
- bitNum = 0;
- gestStrobeCodMST(bitNum, ref retACK_DW1, 0, MemBlock, "M");
-
- // check COD_S
- bitNum = 1;
- gestStrobeCodMST(bitNum, ref retACK_DW1, 11, MemBlock, "S");
-
- // check COD_T
- bitNum = 2;
- gestStrobeCodMST(bitNum, ref retACK_DW1, 17, MemBlock, "T");
-
-
- // check FILE DATI MODIFICATO: ricaricare...
- bitNum = 3;
- if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
- {
- lg.Info("Notifica file modificato");
- try
- {
- // reload dati da file...
- reloadDataFromFile();
-
- // memorizzo allarme nel vettore ack....
- retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
- }
- catch
- {
- lg.Info("Errore lettura dati da file");
- }
- }
-
- // AREA strobe USER ACTION
- // chiamato Start...
- bitNum = 4;
- gestStrobeUserAction(idxPath, bitNum, ref retACK_DW1, ref UserAction, " (START) ");
- // chiamato Stop...
- bitNum = 5;
- gestStrobeUserAction(idxPath, bitNum, ref retACK_DW1, ref UserAction, " (STOP) ");
- // chiamato Reset...
- bitNum = 6;
- gestStrobeUserAction(idxPath, bitNum, ref retACK_DW1, ref UserAction, " (RESET) ");
-
- // processo tutti gli strobe x i BIT 7-29 NON gestiti in modo da dare comunque ACK e event...
- for (int i = 7; i < 30; i++)
- {
- gestStrobeUserAction(idxPath, i, ref retACK_DW1, ref UnkStrobe, string.Format(" [STROBE_{0:00}] ", i));
- }
-
- // AREA strobe x TEST
- // INIZIO TEST...
- bitNum = 30;
- if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
- {
- // formatto stringa risultato
- TestingData = string.Format("START TEST{0}", getTestData(utils.CRS("testCharSep")));
-
- // memorizzo allarme nel vettore ack....
- retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
- }
- // FINE TEST...
- bitNum = 31;
- if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
- {
- // formatto stringa risultato
- TestingData = string.Format("STOP TEST{0}", getTestData(utils.CRS("testCharSep")));
-
- // memorizzo allarme nel vettore ack....
- retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
- }
- }
- else
- {
- // se mi sono rimasti degli strobe di lettura allarmi alzati li abbasso
- if (ACK_DW1 != StFlag32.NONE)
- {
- // inizializzo 4 byte a zero!!!
- retACK_DW1 = new byte[4];
- }
- }
- }
- catch
- {
- lg.Info("Errore in strobe");
- }
-
- // 2017.01.16 INVIO vettore azioni (1 o +)... SE CE NE SONO!
- if (UserAction.Trim() != "")
- {
- mUserAction.ForceChanged();
- mUserAction.Value = UserAction.Trim();
- }
-
- // Invio comunque strobe non riconosciuti
- if (mUnkStrobe.Value.ToString() != UnkStrobe.Trim())
- {
- mUnkStrobe.Value = UnkStrobe.Trim();
- }
-
- // INVIO COMUNQUE stato test...
- mTestingData.Value = TestingData.Trim();
-
- memIndex = 10504;
- // scrivo update ad ack SE VARIATO!!!
- if (ACK_DW1 != (StFlag32)BitConverter.ToUInt32(retACK_DW1, 0))
- {
- inizio = DateTime.Now;
- FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW1);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-DW1", retACK_DW1.Length), DateTime.Now.Subtract(inizio).Ticks);
- }
-
- sendWatchDog();
- }
-
- ///
- /// Scrive watchdog
- ///
- ///
- ///
- public override bool writeWatchDog(ref byte[] retACK_DW)
- {
- int memIndex = 10508;
- return FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW);
- }
-
- ///
- /// Recupero info su test: numero + elenco parametri IN/OUT
- ///
- ///
- ///
- private string getTestData(string charSep)
- {
- string answ = "";
- // Area di memoria x test... 64 byte
- byte[] MemBlockTestData = new byte[64];
- // variabili numero test e num parametri impiegati
- int testNum = 0;
- int numPar = 0;
- // variabile dove parcheggiare conversione codici dei parametri del test (IN o OUT)
- UInt32 testParam = 0;
-
- // leggo tutto!!!
- int memIndex = 11000;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlockTestData);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TEST_DATA_DW1", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
-
- // recupero cod univoco test e numero parametri impiegati
- testNum = BitConverter.ToUInt16(MemBlockTestData, 0);
- numPar = BitConverter.ToUInt16(MemBlockTestData, 2);
-
-
- // riporto separatore + numero test + num parametri
- answ = string.Format("{0}TN:{1}{0}NP:{2}", charSep, testNum, numPar);
- // se ci sono parametri da accodare li recupero!
- if (numPar > 0)
- {
- for (int i = 0; i < numPar; i++)
- {
- testParam = BitConverter.ToUInt32(MemBlockTestData, 4 * (1 + i));
- answ += string.Format("{0}{1}", charSep, testParam);
- }
- }
-
- return answ;
- }
-
- ///
- /// Gestione STROBE --> ACK per codici M/S/T
- ///
- /// 0/1/2
- /// vettore da restituire di ACK
- /// shift memoria x buffer dati da leggere
- /// Vettore completo dei valori + buffer code M/S/T
- /// Quale coda: M/S/T
- private void gestStrobeCodMST(int bitNum, ref byte[] retACK_DW1, int memShift, byte[] MemBlock, string Coda)
- {
- int numEv = 0;
- int codEv = 0;
- int idxPath = 0; // Hard coded path 0 soltanto...
- if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
- {
- // verifico sia > 0 il numero di valori da leggere indice 0 sull'area...
- numEv = BitConverter.ToUInt16(MemBlock, 2 * memShift);
- if (numEv > 0)
- {
- // il num ev rappresenta quanti slot 16bit (da 2 byte) sono stati valorizzati, VA FATTO CICLO E LETTI TUTTI
- for (int i = 0; i < numEv; i++)
- {
- // leggo valore Codice
- codEv = BitConverter.ToUInt16(MemBlock, 2 * (i + 1 + memShift));
- // accodo evento Codice
- appendCodeMST(Coda, codEv.ToString(), idxPath);
- }
- }
- // memorizzo allarme nel vettore ack....
- retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
- }
- }
- ///
- /// recupera allarmi ed aggiorna strobe (privato) degli allarmi
- ///
- /// 32bit mask degli allarmi da aggiornare
- /// boolean: se si debba tornare ACK
- public override void refreshAlarmState(StFlag32 Alarm2Refresh, bool giveAck)
- {
- // log bitmap se verboso attivo + ho allarmi da refreshare
- if ((Alarm2Refresh != StFlag32.NONE) && utils.CRB("verbose"))
- {
- lg.Info("Richiesto refresh allarmi x bitmask: {0}", utils.binaryForm((int)Alarm2Refresh));
- }
-
- bool ackReturned = false;
- // byte di acknowledge...
- byte[] retACK_DW0 = new byte[4];
- // inizio impostando una bitmap x ACK che abbia i bit abbassati se lo strobe è disattivo: AND logico tra STR e ACK
- retACK_DW0 = BitConverter.GetBytes(Convert.ToUInt32(STRB_DW0 & ACK_DW0));
-
- inizio = DateTime.Now;
- byte[] MemBlock;
- // primo blocco memoria allarmi
- int memIndex = 10532;
- // controllo, SE devo leggere tutto uso un unico accesso ai 128byte, altrimenti leggo a blocchi di 32bit...
-
- if (Alarm2Refresh == (StFlag32)unchecked((int)UInt32.MaxValue))
- {
- // blocco memoria x lettura dati COMPLETO (4Byte*32 = 128Byte)
- MemBlock = new byte[128];
- // recupero tutti i 32 bit del blocco
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
- if (AlarmFlags != null)
- {
- try
- {
- // aggiorno vettore allarmi x intero! size del vettore di destinazione (in byte!!!!)
- //Buffer.BlockCopy(MemBlock, 0, AlarmFlags, 0, MemBlock.Length); // da testare FANUC!!!
- Buffer.BlockCopy(MemBlock, 0, AlarmFlags, 0, AlarmFlags.Length);
- }
- catch (Exception exc)
- {
- lg.Error(string.Format("Errore in BLOCKCOPY{0}{1}", Environment.NewLine, exc));
- }
- }
- }
- else
- {
- if (Alarm2Refresh != StFlag32.NONE)
- {
- // blocco memoria x lettura dati
- MemBlock = new byte[4];
- // verifico gli allarmi di tutti i bit alzati...
- for (int i = 0; i < 32; i++)
- {
- if (Alarm2Refresh.HasFlag((StFlag32)Math.Pow(2, i)))
- {
- // recupero tutti i 32 bit del blocco
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex + i * 4, ref MemBlock);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
-
- // da testare metodo copia alternativo, condizionato a web.config
- if (!utils.CRB("fastCopy"))
- {
- // aggiorno nel vettore allarmi i byte interessati
- for (int j = 0; j < 4; j++)
- {
- // copy array a blocchi
- AlarmFlags[i * 4 + j] = MemBlock[j];
- }
- }
- else
- {
- Buffer.BlockCopy(MemBlock, 0, AlarmFlags, i, MemBlock.Length);
- }
-
- // segnalo allarme letto! memorizzo allarme nel vettore ack....
- retACK_DW0 = utils.setBitOnStFlag(retACK_DW0, true, i);
- }
- }
- // scrivo ack se richiesto!!!
- if (giveAck)
- {
- // mi preparo a scrivere ACK
- memIndex = 10500;
- // scrivo update ad ack!!!
- inizio = DateTime.Now;
- FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW0);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
- ackReturned = true;
- }
- }
- }
-
- // SE non ho già tornato un ACK...
- if (!ackReturned)
- {
- // se è diverso il vettori degli ACK in memoria da quello PLC...
- if (ACK_DW0 != (StFlag32)BitConverter.ToUInt32(retACK_DW0, 0))
- {
- memIndex = 10500;
- // invio INTERO set ACK_DW0 con bit abbassati...
- retACK_DW0 = BitConverter.GetBytes(Convert.ToUInt32(STRB_DW0 & ACK_DW0));
- inizio = DateTime.Now;
- FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW0);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
- }
- }
- }
- ///
- /// processing!
- ///
- public override void processStatus()
- {
- // update status da DW2/ DW3
-
- // EMstop: verifico BIT e di conseguenza imposto
- if (STRB_DW2.HasFlag(StFlag32.B00))
- {
- mEStop.Value = "TRIGGERED";
- }
- else
- {
- mEStop.Value = "ARMED";
- }
-
- // verifico POWER ON...
- if (STRB_DW2.HasFlag(StFlag32.B01))
- {
- mPower.Value = "ON";
- }
- else
- {
- mPower.Value = "OFF";
- }
-
- // Processo selezionato 0=P1, 1=P2
- string procSel = "";
- if (STRB_DW2.HasFlag(StFlag32.B02))
- {
- procSel = "P2";
- }
- else
- {
- procSel = "P1";
- }
- if (mProcSel.Value.ToString() != procSel)
- {
- mProcSel.Value = procSel;
- }
-
- // HARD CODE: forzo path 1 (indice 0...)
- int idxPath = 0;
-
- // verifico tipo processo path...
- if (STRB_DW2.HasFlag(StFlag32.B03))
- {
- vettPath[idxPath].mPathType.Value = "LAVORO";
- }
- else
- {
- vettPath[idxPath].mPathType.Value = "ASSERV";
- }
-
- // switch su RUN mode...
- string runMode = "";
- if (STRB_DW2.HasFlag(StFlag32.B04))
- {
- runMode = "AUTOMATIC";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B05))
- {
- runMode = "EDIT";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B06))
- {
- runMode = "MANUAL_DATA_INPUT";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B07))
- {
- runMode = "MANUAL";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B08))
- {
- runMode = "SEMI_AUTO";
- }
- // salvo valore selezionato
- if (vettPath[idxPath].mPathRunMode.Value.ToString() != runMode)
- {
- vettPath[idxPath].mPathRunMode.Value = runMode;
- }
-
- // switch su EXE mode...
- string exeMode = "";
- if (STRB_DW2.HasFlag(StFlag32.B09))
- {
- exeMode = "ACTIVE";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B10))
- {
- exeMode = "READY";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B11))
- {
- exeMode = "STOPPED";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B12))
- {
- exeMode = "FEED_HOLD";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B13))
- {
- exeMode = "OPTIONAL_STOP";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B14))
- {
- exeMode = "PROGRAM_STOPPED";
- }
- else if (STRB_DW2.HasFlag(StFlag32.B15))
- {
- exeMode = "PROGRAM_COMPLETED";
- }
- // salvo valore selezionato
- if (vettPath[idxPath].mPathExeMode.Value.ToString() != exeMode)
- {
- vettPath[idxPath].mPathExeMode.Value = exeMode;
- }
-
-
-
- // processo eventuali altri bit status non noti...
- string UnkStatus = "";
- // cerco i bit alzati --> aggiungo in stringa!
- for (int i = 14; i < 32; i++)
- {
- // converto! e aggiungo allarmi sollevati al corretto controller allarmi...
- if (STRB_DW2.HasFlag((StFlag32)Math.Pow(2, i)))
- {
- UnkStatus += string.Format(" [STATUS_{0:00}] ", i);
- }
- }
- // invio comunque...
- mUnkStatus.Value = UnkStatus.Trim();
-
- // inizializzo SEMPRE a vuoto...
- string SubMode = "";
- // verifico sulla STRB_DW3 i submode che POTREBBERO tutti sovrapposti...
- if (STRB_DW3 != StFlag32.NONE)
- {
- // cerco i bit alzati --> aggiungo relativo submode!
- for (int i = 0; i < 32; i++)
- {
- // converto! e aggiungo allarmi sollevati al corretto controller allarmi...
- if (STRB_DW3.HasFlag((StFlag32)Math.Pow(2, i)))
- {
- SubMode += string.Format(" [{0}]", elencoSubMode[i.ToString()]);
- }
- }
-
- }
- // 2017.01.16 INVIO SOLO SE CAMBIA:..
- if (vettPath[idxPath].mPathSubMode.Value.ToString() != SubMode.Trim())
- {
- // INVIO SEMPRE (x prendere il reset/fronte discesa)...
- vettPath[idxPath].mPathSubMode.Value = SubMode.Trim();
- }
- }
-
- ///
- /// Gestione lettura dati manutenzione
- ///
- public override bool getMtzDataFromPlc()
- {
- bool fatto = false;
- try
- {
- if (maintData.Length > 0)
- {
-
- // recupero i dati di manutenzione dall'area di memoria IN BLOCCO
- int memIndex = 14000;
- byte[] tabDatiMtzByte = new byte[4 * maintData.Length];
- uint[] tabDatiMtz = new uint[maintData.Length];
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiMtzByte);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtzByte.Length), DateTime.Now.Subtract(inizio).Ticks);
- // copio byte --> word!
- Buffer.BlockCopy(tabDatiMtzByte, 0, tabDatiMtz, 0, tabDatiMtzByte.Length);
- // decodifico aree memoria secondo tab configurazione
- processMaintData(tabDatiMtz, maintData);
- }
- fatto = true;
- }
- catch
- { }
- return fatto;
- }
- ///
- /// Gestione lettura dati analogici
- ///
- public override bool getAnalogDataFromPlc()
- {
- bool fatto = false;
- try
- {
- if (analogData.Length > 0)
- {
- // recupero i dati di manutenzione dall'area di memoria IN BLOCCO
- int memIndex = 15000;
- byte[] tabDatiAnalogByte = new byte[4 * analogData.Length];
- uint[] tabDatiAnalog = new uint[analogData.Length];
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiAnalogByte);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalogByte.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
- // copio byte --> word!
- Buffer.BlockCopy(tabDatiAnalogByte, 0, tabDatiAnalog, 0, tabDatiAnalogByte.Length);
- // decodifico aree memoria secondo tab configurazione
- processAnalogData(tabDatiAnalog, analogData);
- }
- fatto = true;
- }
- catch
- { }
- return fatto;
-
- }
-
- ///
- /// Gestione lettura dati status da PLC
- ///
- public override bool getStatusDataFromPlc()
- {
- bool fatto = false;
- try
- {
- if (statusData.Length > 0)
- {
- // recupero i dati di manutenzione dall'area di memoria IN BLOCCO
- int memIndex = 14512;
- int numByte = 1 + (statusData.Length / 8);
- byte[] tabDatiStatus = new byte[numByte];
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiStatus);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
-
- // decodifico aree memoria secondo tab configurazione
- processStatusData(tabDatiStatus, statusData);
- }
- fatto = true;
- }
- catch
- { }
- return fatto;
- }
- ///
- /// Leggo dati globali comuni (x path, assi...)
- ///
- public override void getGlobalData()
- {
- // svuoto...
- parentForm.dataMonitor_1 = "";
- parentForm.dataMonitor_2 = "";
- parentForm.dataMonitor_3 = "";
-
- // accodo dati path in DataMonitor......
- StringBuilder sb1 = new StringBuilder();
- StringBuilder sb2 = new StringBuilder();
-
- // dati base...
- sb1.AppendLine(string.Format("POWER {0}: | EmStop:{1:N3} | ProcSel: {2}", mPower.Value, mEStop.Value, mProcSel.Value));
-
- // leggo dati globali...
- parentForm.commPlcActive = true;
- inizio = DateTime.Now;
- allDynData = FANUC_ref.getAllDynData();
- if (utils.CRB("recTime")) TimingData.addResult("R-ALL-DYN-DATA", DateTime.Now.Subtract(inizio).Ticks);
- parentForm.commPlcActive = false;
-
- FeedRate = allDynData.actf;
-
- int memIndex = 12000;
- byte[] PathData_mem = new byte[4];
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.R, memIndex, ref PathData_mem);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length), DateTime.Now.Subtract(inizio).Ticks);
-
- // 2016.07.19 mod con Fabio
- //JogRateOver = PathData_mem[0];
- FeedRateOver = PathData_mem[1];
- RapidOver = PathData_mem[2];
- SpeedRateOver = PathData_mem[3];
-
- sb1.AppendLine(string.Format("FeedRate: {0} mm/min", FeedRate));
- sb1.AppendLine(string.Format("FeedRateOver: {0} %", FeedRateOver));
- sb1.AppendLine(string.Format("RapidOver: {0} %", RapidOver));
- sb1.AppendLine(string.Format("SpeedRateOver: {0} %", SpeedRateOver));
-
- // se ho allarmi li accodo...
- if (allDynData.alarm != 0)
- {
- sb1.AppendLine(string.Format("Allarmi CNC: {0}", allDynData.alarm));
-
- parentForm.commPlcActive = true;
- inizio = DateTime.Now;
- allarmiCNC = FANUC_ref.getCncAlarm();
- if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ALARMS", DateTime.Now.Subtract(inizio).Ticks);
- parentForm.commPlcActive = false;
- checkCNCAlarms();
- }
- else
- {
- allarmiCNC = new CMSCncLib.Focas1.ODBALMMSG2();
- }
-
- // accodo dati base!
- parentForm.dataMonitor_1 = sb1.ToString();
- // accodo dati UT...
- for (int i = 0; i < currAdpConf.nUnOp; i++)
- {
- sb2.AppendLine(string.Format("UT: ToolId {0} | VitaRes {1} | TipoVita {2} ", vettUnOp[i].mUnOpToolId.Value, vettUnOp[i].mUnOpVitaRes.Value, vettUnOp[i].mUnOpVitaResType.Value));
- }
- parentForm.dataMonitor_2 = sb2.ToString();
-
- // gestisco lettura dati manutenzione da PLC...
- getMtzDataFromPlc();
- // gestisco lettura dati analogici da PLC...
- getAnalogDataFromPlc();
- // gestisco lettura dati status da PLC...
- getStatusDataFromPlc();
- }
- ///
- /// Carico file conf dati CMS
- ///
- protected override void loadOtherFile()
- {
- base.loadOtherFile();
- loadMaintData("R", 14000, 4);
- loadStatusData("R", 14512, 1);
- }
- ///
- /// Processing allarmi CNC
- ///
- public override void processAlarm()
- {
- base.processAlarm();
-
- // aggiungo gestione allarmi CNC
- checkCNCAlarms();
- }
- ///
- /// Verifica i 10 allarmi CNC SE presenti
- ///
- private void checkCNCAlarms()
- {
- // faccio parse allarmi: se ci sono invio e presento
- sendAlarmIfPresent(allarmiCNC.msg1);
- sendAlarmIfPresent(allarmiCNC.msg2);
- sendAlarmIfPresent(allarmiCNC.msg3);
- sendAlarmIfPresent(allarmiCNC.msg4);
- sendAlarmIfPresent(allarmiCNC.msg5);
- sendAlarmIfPresent(allarmiCNC.msg6);
- sendAlarmIfPresent(allarmiCNC.msg7);
- sendAlarmIfPresent(allarmiCNC.msg8);
- sendAlarmIfPresent(allarmiCNC.msg9);
- sendAlarmIfPresent(allarmiCNC.msg10);
- }
-
- ///
- /// Invia singolo allarme CNC se presente
- ///
- ///
- protected void sendAlarmIfPresent(CMSCncLib.Focas1.ODBALMMSG2_data allarme)
- {
- // controllo valore...
- if (allarme.alm_no > 0)
- {
- try
- {
- StringBuilder sb = new StringBuilder();
- if (utils.CRI("loglevel") > 5)
- {
- lg.Info(string.Format("Allarmi CNC: NUM {0} | MESS: {1} | ASSE: {2} | TYPE: {3}", allarme.alm_no, allarme.alm_msg, allarme.axis, allarme.type));
- }
- // se ho asse accodo ad asse altrimenti no...
- string codAllarme = string.Format("T{0}-N{1}", allarme.type, allarme.alm_no);
- if (allarme.axis == 0)
- {
- mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
- }
- else
- {
- vettAxis[allarme.axis - 1].mAxAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
- }
- // mostro in form!
- sb.AppendLine(codAllarme);
- parentForm.dataMonitor_1 += sb.ToString();
- }
- catch (Exception exc)
- {
- lg.Error(string.Format("{0}", exc));
- }
- }
- }
- ///
- /// Recupero dati x UnOp
- ///
- public override void getUnOp()
- {
- // leggo in blocco tutte le speed da memoria...
- int memIndex = 3140;
- // buffer memoria 60 byte... speed (16bit 2 * 20) + load (8bit 1 * 20) visto che sono 20 teste max
- byte[] unOpSpeedMem = new byte[60];
-
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.D, memIndex, ref unOpSpeedMem);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
-
- procUnOp(unOpSpeedMem);
- }
- ///
- /// Procedura di processing lettura memoria x DatiUt - Step 4
- ///
- ///
- ///
- ///
- public override int getDatiUt_step4(ref byte[] int32Mem, int j)
- {
- int memIndex = 13100 + 4 * j;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.D, memIndex, ref int32Mem);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-VitaRes", int32Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
- return memIndex;
- }
- ///
- /// Procedura di processing lettura memoria x DatiUt - Step 3b
- ///
- ///
- ///
- ///
- public override int getDatiUt_step3b(ref byte int8Mem, int j)
- {
- int memIndex = 10700 + 1 * j;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.D, memIndex, ref int8Mem);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", 8), DateTime.Now.Subtract(inizio).Ticks);
- return memIndex;
- }
- ///
- /// Procedura di processing lettura memoria x DatiUt - Step 3a
- ///
- ///
- ///
- public override int getDatiUt_step3a(ref byte[] tabFam_FamUt)
- {
- int memIndex = 8900;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.D, memIndex, ref tabFam_FamUt);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabFamUT-FamUT", tabFam_FamUt.Length), DateTime.Now.Subtract(inizio).Ticks);
- return memIndex;
- }
- ///
- /// Procedura di processing lettura memoria x DatiUt - Step 2b
- ///
- ///
- ///
- ///
- public override int getDatiUt_step2b(ref byte[] int16Mem, int j)
- {
- int memIndex = 11700 + 2 * j;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.D, memIndex, ref int16Mem);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", int16Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
- return memIndex;
- }
- ///
- /// Procedura di processing lettura memoria x DatiUt - Step 2a
- ///
- ///
- ///
- public override int getDatiUt_step2a(ref byte[] tabUt_UT)
- {
- int memIndex = 11300;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.D, memIndex, ref tabUt_UT);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-UT", tabUt_UT.Length), DateTime.Now.Subtract(inizio).Ticks);
- return memIndex;
- }
- ///
- /// Procedura di processing lettura memoria x DatiUt - Step 1
- ///
- ///
- ///
- public override int getDatiUt_step1(ref byte[] elencoUtMem)
- {
- int memIndex = 2960;
- inizio = DateTime.Now;
- FanucMemRW(R, FANUC.MemType.D, memIndex, ref elencoUtMem);
- if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-NUMUT", elencoUtMem.Length), DateTime.Now.Subtract(inizio).Ticks);
- return memIndex;
- }
-
- public override void getPath()
- {
- base.getPath();
-
- // recupero vettore generale G MODE
- parentForm.commPlcActive = true;
- inizio = DateTime.Now;
- CMSCncLib.Focas1.ODBGCD vettGCodes = FANUC_ref.getPathGCodeMod();
- if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
- parentForm.commPlcActive = false;
-
- string GCodAttivi = "";
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd4.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd5.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd6.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd7.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd8.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd9.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd10.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd11.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd12.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd13.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd14.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd15.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd16.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd17.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd18.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd19.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd20.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd21.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd22.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd23.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd24.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd25.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd26.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd27.code);
-
- parentForm.commPlcActive = true;
- inizio = DateTime.Now;
- vettGCodes = FANUC_ref.getPathGCode1Shot();
- parentForm.commPlcActive = false;
- if (utils.CRB("recTime")) TimingData.addResult("R-GCodOneShot", DateTime.Now.Subtract(inizio).Ticks);
- if (vettGCodes.gcd0.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
- if (vettGCodes.gcd1.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
- if (vettGCodes.gcd2.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
- if (vettGCodes.gcd3.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
-
- parentForm.commPlcActive = true;
- inizio = DateTime.Now;
- CMSCncLib.Focas1.ODB5AXMAN vettTTCoord = FANUC_ref.getPathTTCoord();
- if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
- parentForm.commPlcActive = false;
-
- // ciclo su path
- StringBuilder sb_2;
- StringBuilder sb_3;
- for (int i = 0; i < currAdpConf.nPath; i++)
- {
- // accodo dati path in DataMonitor...
- sb_2 = new StringBuilder();
- sb_3 = new StringBuilder();
-
- vettPath[i].mPathCodG_Act.Value = GCodAttivi;
-
- vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale");
- vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale");
- vettPath[i].mPathPosActZ.Value = ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale");
- vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale");
- vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale");
- vettPath[i].mPathPosActK.Value = "0"; // è 5 assi...nullo...
-
- // 2017.01.16 da rivedere
- vettPath[i].mPathCurrProgRowNum.Value = "";
- vettPath[i].mPathActiveAxes.Value = "";
-
- sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, vettPath[i].mPathCurrProg.Value));
- sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
-
- sb_3.AppendLine(string.Format("Path {0}, Asse 1: {1:N3}", i + 1, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale")));
- sb_3.AppendLine(string.Format("Path {0}, Asse 2: {1:N3}", i + 1, ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale")));
- sb_3.AppendLine(string.Format("Path {0}, Asse 3: {1:N3}", i + 1, ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale")));
- sb_3.AppendLine(string.Format("Path {0}, Cent 1: {1:N3}", i + 1, ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale")));
- sb_3.AppendLine(string.Format("Path {0}, Cent 2: {1:N3}", i + 1, ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale")));
-
- parentForm.dataMonitor_2 += sb_2.ToString();
- parentForm.dataMonitor_3 += sb_3.ToString();
- }
-
- }
-
- public override void getAxis()
- {
- // mostro assi in DataMonitor......
- StringBuilder sb = new StringBuilder();
-
- parentForm.commPlcActive = true;
- inizio = DateTime.Now;
- CMSCncLib.Focas1.ODBPOS posAssi = FANUC_ref.getAllAxisPos();
- if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_POS", DateTime.Now.Subtract(inizio).Ticks);
-
- inizio = DateTime.Now;
- CMSCncLib.Focas1.ODBSVLOAD loadAssi = FANUC_ref.getAllAxisLoad();
- if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_LOAD", DateTime.Now.Subtract(inizio).Ticks);
- parentForm.commPlcActive = false;
-
- CMSCncLib.Focas1.LOADELM valLoad = new CMSCncLib.Focas1.LOADELM();
- CMSCncLib.Focas1.POSELMALL valPos = new CMSCncLib.Focas1.POSELMALL();
-
- // nuova posizione (per calcoli)
- double newPos = 0;
- double distPerc = 0;
- int newDir = 0;
- string tipoAsse = "";
- string direzione = "";
-
- for (int i = 0; i < currAdpConf.nAxis; i++)
- {
- // per sicurezza try-catch
- try
- {
- // in base a indice scelgo valore posizione e load
- switch (i)
- {
- case 0:
- valPos = posAssi.p1;
- valLoad = loadAssi.svload1;
- break;
- case 1:
- valPos = posAssi.p2;
- valLoad = loadAssi.svload2;
- break;
- case 2:
- valPos = posAssi.p3;
- valLoad = loadAssi.svload3;
- break;
- case 3:
- valPos = posAssi.p4;
- valLoad = loadAssi.svload4;
- break;
- case 4:
- valPos = posAssi.p5;
- valLoad = loadAssi.svload5;
- break;
- case 5:
- valPos = posAssi.p6;
- valLoad = loadAssi.svload6;
- break;
- case 6:
- valPos = posAssi.p7;
- valLoad = loadAssi.svload7;
- break;
- case 7:
- valPos = posAssi.p8;
- valLoad = loadAssi.svload8;
- break;
- case 8:
- valPos = posAssi.p9;
- valLoad = loadAssi.svload9;
- break;
- case 9:
- valPos = posAssi.p10;
- valLoad = loadAssi.svload10;
- break;
- case 10:
- valPos = posAssi.p11;
- valLoad = loadAssi.svload11;
- break;
- case 11:
- valPos = posAssi.p12;
- valLoad = loadAssi.svload12;
- break;
- case 12:
- valPos = posAssi.p13;
- valLoad = loadAssi.svload13;
- break;
- case 13:
- valPos = posAssi.p14;
- valLoad = loadAssi.svload14;
- break;
- case 14:
- valPos = posAssi.p15;
- valLoad = loadAssi.svload15;
- break;
- case 15:
- valPos = posAssi.p16;
- valLoad = loadAssi.svload16;
- break;
- case 16:
- valPos = posAssi.p17;
- valLoad = loadAssi.svload17;
- break;
- case 17:
- valPos = posAssi.p18;
- valLoad = loadAssi.svload18;
- break;
- case 18:
- valPos = posAssi.p19;
- valLoad = loadAssi.svload19;
- break;
- case 19:
- valPos = posAssi.p20;
- valLoad = loadAssi.svload20;
- break;
- case 20:
- valPos = posAssi.p21;
- valLoad = loadAssi.svload21;
- break;
- case 21:
- valPos = posAssi.p22;
- valLoad = loadAssi.svload22;
- break;
- case 22:
- valPos = posAssi.p23;
- valLoad = loadAssi.svload23;
- break;
- case 23:
- valPos = posAssi.p24;
- valLoad = loadAssi.svload24;
- break;
- case 24:
- valPos = posAssi.p25;
- valLoad = loadAssi.svload25;
- break;
- case 25:
- valPos = posAssi.p26;
- valLoad = loadAssi.svload26;
- break;
- case 26:
- valPos = posAssi.p27;
- valLoad = loadAssi.svload27;
- break;
- case 27:
- valPos = posAssi.p28;
- valLoad = loadAssi.svload28;
- break;
- case 28:
- valPos = posAssi.p29;
- valLoad = loadAssi.svload29;
- break;
- case 29:
- valPos = posAssi.p30;
- valLoad = loadAssi.svload30;
- break;
- case 30:
- valPos = posAssi.p31;
- valLoad = loadAssi.svload31;
- break;
- case 31:
- valPos = posAssi.p32;
- valLoad = loadAssi.svload32;
- break;
- default:
- // 2017.03.01 suggerimento Fabio: in CMS_FANUC in advanced compiler options mettere FS30D=1,SIEMENS=1 x leggere + assi?!?
- valPos = posAssi.p1;
- valLoad = loadAssi.svload1;
- break;
- }
-
- // popolo valori...
- vettAxis[i].mAxLoad.Value = (double)(valLoad.data) / Math.Pow(10, valLoad.dec);
- newPos = (double)(valPos.abs.data) / Math.Pow(10, valPos.abs.dec);
- vettAxis[i].mAxPosAct.Value = newPos;
- vettAxis[i].mAxPosTgt.Value = newPos + (double)(valPos.dist.data) / Math.Pow(10, valPos.dist.dec);
-
- vettAxis[i].mAxFeedAct.Value = FeedRate;
-
- // calcolo distanza e salvo valore...
- distPerc = newPos - prevPosAxis[i];
-
- // sistemo direzione +/- (POS/NEG se lineari, CCW/CW se rotativi)
- if (distPerc != 0)
- {
- newDir = Convert.ToInt32(distPerc / Math.Abs(distPerc));
- }
- else
- {
- newDir = prevDirAxis[i];
- }
-
- // verifico tipo direzione da tipo asse...
- tipoAsse = vettAxis[i].mAxType.Value.ToString();
- if (tipoAsse == "LINEAR")
- {
- // ?: conditional operator.
- direzione = (newDir > 0) ? "POSITIVE" : "NEGATIVE";
- }
- else if (tipoAsse == "ROTARY")
- {
- direzione = (newDir > 0) ? "CLOCKWISE" : "COUNTER_CLOCKWISE";
- }
-
- vettAxis[i].mAxDir.Value = direzione;
-
-
- if (utils.CRB("verbose"))
- {
- sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3} | {4}", valPos.abs.name, (double)(valPos.abs.data) / Math.Pow(10, valPos.abs.dec), valPos.dist.name, (double)(valPos.dist.data) / Math.Pow(10, valPos.dist.dec), direzione));
- }
-
- // salvo valori vettore prec...
- prevPosAxis[i] = newPos;
- prevDirAxis[i] = newDir;
-
- //vettAxis[i].mAxMainProc.Value = AxData.AxisMainProc;
- //vettAxis[i].mAxIsMaster.Value = AxData.AxisIsMaster;
- //vettAxis[i].mAxMastId.Value = AxData.AxisMastId;
- vettAxis[i].mAxFeedOver.Value = FeedRateOver;
- //vettAxis[i].mAxAccelAct.Value = AxData.AxisAccel;
- //vettAxis[i].mAxBattery.Value = AxData.AxisBattery;
- }
- catch
- {
- lg.Error(string.Format("Errore in lettura asse {0}", i));
- }
- }
-
- parentForm.dataMonitor_3 += sb.ToString();
+ parentForm.commPlcActive = true;
+ answ = FANUC_ref.F_RW_Byte(bWrite, MemType, memIndex, ref Value);
}
+ catch
+ { }
+ }
+ parentForm.commPlcActive = false;
+ return answ;
}
+ ///
+ /// wrapper chiamata lettura/scrittura MULTI BYTE...
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool FanucMemRW(bool bWrite, FANUC.MemType MemType, Int32 memIndex, ref byte[] Value)
+ {
+ bool answ = false;
+ if (FANUC_ref.Connected)
+ {
+ try
+ {
+ parentForm.commPlcActive = true;
+ answ = FANUC_ref.F_RW_Byte(bWrite, MemType, memIndex, ref Value);
+ }
+ catch
+ { }
+ }
+ parentForm.commPlcActive = false;
+ return answ;
+ }
+
+ ///
+ /// struttura dati fanuc x ALL DYN DATA
+ /// C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rddynamic2.htm
+ ///
+ protected CMSCncLib.Focas1.ODBDY2_1 allDynData;
+ ///
+ /// Vettore degli allarmi CNC attivi
+ ///
+ public CMSCncLib.Focas1.ODBALMMSG2 allarmiCNC;
+
+ ///
+ /// estende l'init della classe base...
+ ///
+ ///
+ ///
+ public AdapterFanuc(MainForm caller, AdapterConf adpConf) : base(caller, adpConf)
+ {
+ // è little endian (NON serve conversione)
+ hasBigEndian = false;
+
+ lg.Info("Start init Adapter FANUC all'IP {0}", utils.CRS("ipPLC"));
+
+ parentForm.commPlcActive = true;
+ Runtime.CreateNC(CNC.NcType.FANUC, utils.CRS("ipPLC"));
+ parentForm.commPlcActive = false;
+ // inizializzo posizioni assi...
+ prevPosAxis = new double[adpConf.nAxis];
+ prevDirAxis = new int[adpConf.nAxis];
+
+ FANUC_ref = (FANUC)Runtime.NC;
+ if (utils.CRB("verbose")) lg.Info("FANUC_ref da CMSCncLib");
+
+ // disconnetto e connetto...
+ if (utils.CRB("verbose")) lg.Info("FANUC: tryDisconnect");
+ tryDisconnect();
+ lg.Info("FANUC: tryConnect");
+ tryConnect();
+ lg.Info("End init Adapter FANUC");
+ }
+ ///
+ /// Override disconnessione
+ ///
+ public override void tryDisconnect()
+ {
+ if (connectionOk)
+ {
+ string szStatusConnection = "";
+ try
+ {
+ FANUC_ref.Disconnect(ref szStatusConnection);
+ connectionOk = false;
+ lg.Info(szStatusConnection);
+ lg.Info("Effettuata disconnessione adapter FANUC!");
+ }
+ catch (Exception exc)
+ {
+ lg.Fatal(exc, "Errore nella disconnessione dall'adapter FANUC");
+ }
+ }
+ else
+ {
+ lg.Error("IMPOSSIBILE effettuare disconnessione: Connessione non disponibile...");
+ }
+ }
+ ///
+ /// Override connessione
+ ///
+ public override void tryConnect()
+ {
+ if (!connectionOk)
+ {
+ string szStatusConnection = "";
+ try
+ {
+ parentForm.commPlcActive = true;
+ FANUC_ref.Connect(ref szStatusConnection);
+ parentForm.commPlcActive = false;
+ lg.Info("szStatusConnection: " + szStatusConnection);
+ connectionOk = true;
+ // refresh stato allarmi!!!
+ if (connectionOk)
+ {
+ if (adpRunning)
+ {
+ // carico status allarmi (completo)
+ lg.Info("Inizio refresh completo stato allarmi...");
+ forceAlarmCheck();
+ lg.Info("Completato refresh completo stato allarmi!");
+ }
+ else
+ {
+ lg.Info("Connessione OK");
+ }
+ }
+ else
+ {
+ lg.Error("Impossibile procedere, connessione mancante...");
+ }
+ }
+ catch (Exception exc)
+ {
+ lg.Fatal(string.Format("Errore nella connessione all'adapter FANUC: {0}{1}{2}", szStatusConnection, Environment.NewLine, exc));
+ connectionOk = false;
+ lg.Info(string.Format("Segnalo Adapter NON running, pausa di {0} msec prima di ulteriori tentativi di riconnessione", utils.CRI("waitRecMSec")));
+ }
+ }
+ }
+
+ ///
+ /// Verifico connessione FANUC...
+ ///
+ ///
+ public override bool connectionOk
+ {
+ get
+ {
+ return FANUC_ref.Connected;
+ }
+ }
+
+ ///
+ /// Effettuo lettura dei 16 byte di strobe/status
+ ///
+ public override void getStrobeAndAckStatus()
+ {
+ base.getStrobeAndAckStatus();
+ if (connectionOk)
+ {
+ // leggo TUTTO ack e strobe,
+ byte[] MemBlock = new byte[Strobes.Length + Acknowl.Length];
+ int memIndex = 10500;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STROBES", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
+
+ // suddivido!
+ Buffer.BlockCopy(MemBlock, 0, Acknowl, 0, Acknowl.Length);
+ Buffer.BlockCopy(MemBlock, Acknowl.Length, Strobes, 0, Strobes.Length);
+ }
+ else
+ {
+ lg.Error("Errore connessione mancante in getStrobeAndAckStatus");
+ }
+ }
+ ///
+ /// processing strobe!
+ ///
+ public override void processStrobe()
+ {
+ // inizializzo userAction
+ string UserAction = "";
+ string TestingData = "";
+ string UnkStrobe = "";
+ // !!!FARE!!! multipath...
+ // verifico i vari strobe x recuperare i dati... PER ORA SOLO DW1 per path1 (indice 0)...
+ int idxPath = 0;
+ int memIndex = 0;
+ int bitNum = 0;
+ inizio = DateTime.Now;
+ // byte di acknowledge...
+ byte[] retACK_DW1 = new byte[4];
+ try
+ {
+ // controllo TUTTI i flag: se ce ne sono di alzati DEVO processare...
+ if (STRB_DW1 != StFlag32.NONE)
+ {
+ // blocco memoria x lettura TUTTI i dati di buffer M/S/T: 46 byte: 2byte (16bit) x (11+6+6) aree
+ byte[] MemBlock = new byte[46];
+
+ // leggo tutto!!!
+ memIndex = 10660;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW1", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
+
+ // check COD_M
+ bitNum = 0;
+ gestStrobeCodMST(bitNum, ref retACK_DW1, 0, MemBlock, "M");
+
+ // check COD_S
+ bitNum = 1;
+ gestStrobeCodMST(bitNum, ref retACK_DW1, 11, MemBlock, "S");
+
+ // check COD_T
+ bitNum = 2;
+ gestStrobeCodMST(bitNum, ref retACK_DW1, 17, MemBlock, "T");
+
+
+ // check FILE DATI MODIFICATO: ricaricare...
+ bitNum = 3;
+ if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
+ {
+ lg.Info("Notifica file modificato");
+ try
+ {
+ // reload dati da file...
+ reloadDataFromFile();
+
+ // memorizzo allarme nel vettore ack....
+ retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
+ }
+ catch
+ {
+ lg.Info("Errore lettura dati da file");
+ }
+ }
+
+ // AREA strobe USER ACTION
+ // chiamato Start...
+ bitNum = 4;
+ gestStrobeUserAction(idxPath, bitNum, ref retACK_DW1, ref UserAction, " (START) ");
+ // chiamato Stop...
+ bitNum = 5;
+ gestStrobeUserAction(idxPath, bitNum, ref retACK_DW1, ref UserAction, " (STOP) ");
+ // chiamato Reset...
+ bitNum = 6;
+ gestStrobeUserAction(idxPath, bitNum, ref retACK_DW1, ref UserAction, " (RESET) ");
+
+ // processo tutti gli strobe x i BIT 7-29 NON gestiti in modo da dare comunque ACK e event...
+ for (int i = 7; i < 30; i++)
+ {
+ gestStrobeUserAction(idxPath, i, ref retACK_DW1, ref UnkStrobe, string.Format(" [STROBE_{0:00}] ", i));
+ }
+
+ // AREA strobe x TEST
+ // INIZIO TEST...
+ bitNum = 30;
+ if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
+ {
+ // formatto stringa risultato
+ TestingData = string.Format("START TEST{0}", getTestData(utils.CRS("testCharSep")));
+
+ // memorizzo allarme nel vettore ack....
+ retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
+ }
+ // FINE TEST...
+ bitNum = 31;
+ if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
+ {
+ // formatto stringa risultato
+ TestingData = string.Format("STOP TEST{0}", getTestData(utils.CRS("testCharSep")));
+
+ // memorizzo allarme nel vettore ack....
+ retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
+ }
+ }
+ else
+ {
+ // se mi sono rimasti degli strobe di lettura allarmi alzati li abbasso
+ if (ACK_DW1 != StFlag32.NONE)
+ {
+ // inizializzo 4 byte a zero!!!
+ retACK_DW1 = new byte[4];
+ }
+ }
+ }
+ catch
+ {
+ lg.Info("Errore in strobe");
+ }
+
+ // 2017.01.16 INVIO vettore azioni (1 o +)... SE CE NE SONO!
+ if (UserAction.Trim() != "")
+ {
+ mUserAction.ForceChanged();
+ mUserAction.Value = UserAction.Trim();
+ }
+
+ // Invio comunque strobe non riconosciuti
+ if (mUnkStrobe.Value.ToString() != UnkStrobe.Trim())
+ {
+ mUnkStrobe.Value = UnkStrobe.Trim();
+ }
+
+ // INVIO COMUNQUE stato test...
+ mTestingData.Value = TestingData.Trim();
+
+ memIndex = 10504;
+ // scrivo update ad ack SE VARIATO!!!
+ if (ACK_DW1 != (StFlag32)BitConverter.ToUInt32(retACK_DW1, 0))
+ {
+ inizio = DateTime.Now;
+ FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW1);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-DW1", retACK_DW1.Length), DateTime.Now.Subtract(inizio).Ticks);
+ }
+
+ sendWatchDog();
+ }
+
+ ///
+ /// Scrive watchdog
+ ///
+ ///
+ ///
+ public override bool writeWatchDog(ref byte[] retACK_DW)
+ {
+ int memIndex = 10508;
+ return FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW);
+ }
+
+ ///
+ /// Recupero info su test: numero + elenco parametri IN/OUT
+ ///
+ ///
+ ///
+ private string getTestData(string charSep)
+ {
+ string answ = "";
+ // Area di memoria x test... 64 byte
+ byte[] MemBlockTestData = new byte[64];
+ // variabili numero test e num parametri impiegati
+ int testNum = 0;
+ int numPar = 0;
+ // variabile dove parcheggiare conversione codici dei parametri del test (IN o OUT)
+ UInt32 testParam = 0;
+
+ // leggo tutto!!!
+ int memIndex = 11000;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlockTestData);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TEST_DATA_DW1", MemBlockTestData.Length), DateTime.Now.Subtract(inizio).Ticks);
+
+ // recupero cod univoco test e numero parametri impiegati
+ testNum = BitConverter.ToUInt16(MemBlockTestData, 0);
+ numPar = BitConverter.ToUInt16(MemBlockTestData, 2);
+
+
+ // riporto separatore + numero test + num parametri
+ answ = string.Format("{0}TN:{1}{0}NP:{2}", charSep, testNum, numPar);
+ // se ci sono parametri da accodare li recupero!
+ if (numPar > 0)
+ {
+ for (int i = 0; i < numPar; i++)
+ {
+ testParam = BitConverter.ToUInt32(MemBlockTestData, 4 * (1 + i));
+ answ += string.Format("{0}{1}", charSep, testParam);
+ }
+ }
+
+ return answ;
+ }
+
+ ///
+ /// Gestione STROBE --> ACK per codici M/S/T
+ ///
+ /// 0/1/2
+ /// vettore da restituire di ACK
+ /// shift memoria x buffer dati da leggere
+ /// Vettore completo dei valori + buffer code M/S/T
+ /// Quale coda: M/S/T
+ private void gestStrobeCodMST(int bitNum, ref byte[] retACK_DW1, int memShift, byte[] MemBlock, string Coda)
+ {
+ int numEv = 0;
+ int codEv = 0;
+ int idxPath = 0; // Hard coded path 0 soltanto...
+ if (STRB_DW1.HasFlag((StFlag32)Math.Pow(2, bitNum)))
+ {
+ // verifico sia > 0 il numero di valori da leggere indice 0 sull'area...
+ numEv = BitConverter.ToUInt16(MemBlock, 2 * memShift);
+ if (numEv > 0)
+ {
+ // il num ev rappresenta quanti slot 16bit (da 2 byte) sono stati valorizzati, VA FATTO CICLO E LETTI TUTTI
+ for (int i = 0; i < numEv; i++)
+ {
+ // leggo valore Codice
+ codEv = BitConverter.ToUInt16(MemBlock, 2 * (i + 1 + memShift));
+ // accodo evento Codice
+ appendCodeMST(Coda, codEv.ToString(), idxPath);
+ }
+ }
+ // memorizzo allarme nel vettore ack....
+ retACK_DW1 = utils.setBitOnStFlag(retACK_DW1, true, bitNum);
+ }
+ }
+ ///
+ /// recupera allarmi ed aggiorna strobe (privato) degli allarmi
+ ///
+ /// 32bit mask degli allarmi da aggiornare
+ /// boolean: se si debba tornare ACK
+ public override void refreshAlarmState(StFlag32 Alarm2Refresh, bool giveAck)
+ {
+ // log bitmap se verboso attivo + ho allarmi da refreshare
+ if ((Alarm2Refresh != StFlag32.NONE) && utils.CRB("verbose"))
+ {
+ lg.Info("RAS | Richiesto refresh allarmi x bitmask: {0}", utils.binaryForm((int)Alarm2Refresh));
+ }
+
+ bool ackReturned = false;
+ // byte di acknowledge...
+ byte[] retACK_DW0 = new byte[4];
+ // inizio impostando una bitmap x ACK che abbia i bit abbassati se lo strobe è disattivo: AND logico tra STR e ACK
+ retACK_DW0 = BitConverter.GetBytes(Convert.ToUInt32(STRB_DW0 & ACK_DW0));
+
+ inizio = DateTime.Now;
+ byte[] MemBlock;
+ // primo blocco memoria allarmi
+ int memIndex = 10532;
+ // controllo, SE devo leggere tutto uso un unico accesso ai 128byte, altrimenti leggo a blocchi di 32bit...
+
+ if (Alarm2Refresh == (StFlag32)unchecked((int)UInt32.MaxValue))
+ {
+ // blocco memoria x lettura dati COMPLETO (4Byte*32 = 128Byte)
+ MemBlock = new byte[128];
+ // recupero tutti i 32 bit del blocco
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref MemBlock);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
+ if (AlarmFlags != null)
+ {
+ try
+ {
+ // aggiorno vettore allarmi x intero! size del vettore di destinazione (in byte!!!!)
+ Buffer.BlockCopy(MemBlock, 0, AlarmFlags, 0, AlarmFlags.Length);
+ }
+ catch (Exception exc)
+ {
+ lg.Error(string.Format("RAS | Errore in BLOCKCOPY{0}{1}", Environment.NewLine, exc));
+ }
+ }
+ }
+ else
+ {
+ if (Alarm2Refresh != StFlag32.NONE)
+ {
+ // blocco memoria x lettura dati
+ MemBlock = new byte[4];
+ // verifico gli allarmi di tutti i bit alzati...
+ for (int i = 0; i < 32; i++)
+ {
+ if (Alarm2Refresh.HasFlag((StFlag32)Math.Pow(2, i)))
+ {
+ // recupero tutti i 32 bit del blocco
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex + i * 4, ref MemBlock);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-STRB_DW0", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
+ // da testare metodo copia alternativo, condizionato a web.config
+ if (!utils.CRB("fastCopy"))
+ {
+ // aggiorno nel vettore allarmi i byte interessati
+ for (int j = 0; j < 4; j++)
+ {
+ // copy array a blocchi
+ AlarmFlags[i * 4 + j] = MemBlock[j];
+ }
+ }
+ else
+ {
+ Buffer.BlockCopy(MemBlock, 0, AlarmFlags, i * 4, MemBlock.Length);
+ }
+ if (utils.CRB("verbose"))
+ {
+ UInt32 valore = BitConverter.ToUInt32(MemBlock, 0);
+ lg.Info("RAS | Bit allarme rilevato dalla posizione {0} | {1}", i * 32, utils.binaryForm((int)valore));
+ }
+
+ // segnalo allarme letto! memorizzo allarme nel vettore ack....
+ retACK_DW0 = utils.setBitOnStFlag(retACK_DW0, true, i);
+ }
+ }
+ // scrivo ack se richiesto!!!
+ if (giveAck)
+ {
+ // mi preparo a scrivere ACK
+ memIndex = 10500;
+ // scrivo update ad ack!!!
+ inizio = DateTime.Now;
+ FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW0);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
+ ackReturned = true;
+ }
+ }
+ }
+
+ // SE non ho già tornato un ACK...
+ if (!ackReturned)
+ {
+ // se è diverso il vettori degli ACK in memoria da quello PLC...
+ if (ACK_DW0 != (StFlag32)BitConverter.ToUInt32(retACK_DW0, 0))
+ {
+ memIndex = 10500;
+ // invio INTERO set ACK_DW0 con bit abbassati...
+ retACK_DW0 = BitConverter.GetBytes(Convert.ToUInt32(STRB_DW0 & ACK_DW0));
+ inizio = DateTime.Now;
+ FanucMemRW(W, FANUC.MemType.R, memIndex, ref retACK_DW0);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("W{0}-ACK_DW0", retACK_DW0.Length), DateTime.Now.Subtract(inizio).Ticks);
+ }
+ }
+ }
+ ///
+ /// processing!
+ ///
+ public override void processStatus()
+ {
+ // update status da DW2/ DW3
+
+ // EMstop: verifico BIT e di conseguenza imposto
+ if (STRB_DW2.HasFlag(StFlag32.B00))
+ {
+ mEStop.Value = "TRIGGERED";
+ }
+ else
+ {
+ mEStop.Value = "ARMED";
+ }
+
+ // verifico POWER ON...
+ if (STRB_DW2.HasFlag(StFlag32.B01))
+ {
+ mPower.Value = "ON";
+ }
+ else
+ {
+ mPower.Value = "OFF";
+ }
+
+ // Processo selezionato 0=P1, 1=P2
+ string procSel = "";
+ if (STRB_DW2.HasFlag(StFlag32.B02))
+ {
+ procSel = "P2";
+ }
+ else
+ {
+ procSel = "P1";
+ }
+ if (mProcSel.Value.ToString() != procSel)
+ {
+ mProcSel.Value = procSel;
+ }
+
+ // HARD CODE: forzo path 1 (indice 0...)
+ int idxPath = 0;
+
+ // verifico tipo processo path...
+ if (STRB_DW2.HasFlag(StFlag32.B03))
+ {
+ vettPath[idxPath].mPathType.Value = "LAVORO";
+ }
+ else
+ {
+ vettPath[idxPath].mPathType.Value = "ASSERV";
+ }
+
+ // switch su RUN mode...
+ string runMode = "";
+ if (STRB_DW2.HasFlag(StFlag32.B04))
+ {
+ runMode = "AUTOMATIC";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B05))
+ {
+ runMode = "EDIT";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B06))
+ {
+ runMode = "MANUAL_DATA_INPUT";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B07))
+ {
+ runMode = "MANUAL";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B08))
+ {
+ runMode = "SEMI_AUTO";
+ }
+ // salvo valore selezionato
+ if (vettPath[idxPath].mPathRunMode.Value.ToString() != runMode)
+ {
+ vettPath[idxPath].mPathRunMode.Value = runMode;
+ }
+
+ // switch su EXE mode...
+ string exeMode = "";
+ if (STRB_DW2.HasFlag(StFlag32.B09))
+ {
+ exeMode = "ACTIVE";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B10))
+ {
+ exeMode = "READY";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B11))
+ {
+ exeMode = "STOPPED";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B12))
+ {
+ exeMode = "FEED_HOLD";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B13))
+ {
+ exeMode = "OPTIONAL_STOP";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B14))
+ {
+ exeMode = "PROGRAM_STOPPED";
+ }
+ else if (STRB_DW2.HasFlag(StFlag32.B15))
+ {
+ exeMode = "PROGRAM_COMPLETED";
+ }
+ // salvo valore selezionato
+ if (vettPath[idxPath].mPathExeMode.Value.ToString() != exeMode)
+ {
+ vettPath[idxPath].mPathExeMode.Value = exeMode;
+ }
+
+
+
+ // processo eventuali altri bit status non noti...
+ string UnkStatus = "";
+ // cerco i bit alzati --> aggiungo in stringa!
+ for (int i = 14; i < 32; i++)
+ {
+ // converto! e aggiungo allarmi sollevati al corretto controller allarmi...
+ if (STRB_DW2.HasFlag((StFlag32)Math.Pow(2, i)))
+ {
+ UnkStatus += string.Format(" [STATUS_{0:00}] ", i);
+ }
+ }
+ // invio comunque...
+ mUnkStatus.Value = UnkStatus.Trim();
+
+ // inizializzo SEMPRE a vuoto...
+ string SubMode = "";
+ // verifico sulla STRB_DW3 i submode che POTREBBERO tutti sovrapposti...
+ if (STRB_DW3 != StFlag32.NONE)
+ {
+ // cerco i bit alzati --> aggiungo relativo submode!
+ for (int i = 0; i < 32; i++)
+ {
+ // converto! e aggiungo allarmi sollevati al corretto controller allarmi...
+ if (STRB_DW3.HasFlag((StFlag32)Math.Pow(2, i)))
+ {
+ SubMode += string.Format(" [{0}]", elencoSubMode[i.ToString()]);
+ }
+ }
+
+ }
+ // 2017.01.16 INVIO SOLO SE CAMBIA:..
+ if (vettPath[idxPath].mPathSubMode.Value.ToString() != SubMode.Trim())
+ {
+ // INVIO SEMPRE (x prendere il reset/fronte discesa)...
+ vettPath[idxPath].mPathSubMode.Value = SubMode.Trim();
+ }
+ }
+
+ ///
+ /// Gestione lettura dati manutenzione
+ ///
+ public override bool getMtzDataFromPlc()
+ {
+ bool fatto = false;
+ try
+ {
+ if (maintData.Length > 0)
+ {
+
+ // recupero i dati di manutenzione dall'area di memoria IN BLOCCO
+ int memIndex = 14000;
+ byte[] tabDatiMtzByte = new byte[4 * maintData.Length];
+ uint[] tabDatiMtz = new uint[maintData.Length];
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiMtzByte);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiMtz", tabDatiMtzByte.Length), DateTime.Now.Subtract(inizio).Ticks);
+ // copio byte --> word!
+ Buffer.BlockCopy(tabDatiMtzByte, 0, tabDatiMtz, 0, tabDatiMtzByte.Length);
+ // decodifico aree memoria secondo tab configurazione
+ processMaintData(tabDatiMtz, maintData);
+ }
+ fatto = true;
+ }
+ catch
+ { }
+ return fatto;
+ }
+ ///
+ /// Gestione lettura dati analogici
+ ///
+ public override bool getAnalogDataFromPlc()
+ {
+ bool fatto = false;
+ try
+ {
+ if (analogData.Length > 0)
+ {
+ // recupero i dati di manutenzione dall'area di memoria IN BLOCCO
+ int memIndex = 15000;
+ byte[] tabDatiAnalogByte = new byte[4 * analogData.Length];
+ uint[] tabDatiAnalog = new uint[analogData.Length];
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiAnalogByte);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiAnalog", tabDatiAnalogByte.Length * 4), DateTime.Now.Subtract(inizio).Ticks);
+ // copio byte --> word!
+ Buffer.BlockCopy(tabDatiAnalogByte, 0, tabDatiAnalog, 0, tabDatiAnalogByte.Length);
+ // decodifico aree memoria secondo tab configurazione
+ processAnalogData(tabDatiAnalog, analogData);
+ }
+ fatto = true;
+ }
+ catch
+ { }
+ return fatto;
+
+ }
+
+ ///
+ /// Gestione lettura dati status da PLC
+ ///
+ public override bool getStatusDataFromPlc()
+ {
+ bool fatto = false;
+ try
+ {
+ if (statusData.Length > 0)
+ {
+ // recupero i dati di manutenzione dall'area di memoria IN BLOCCO
+ int memIndex = 14512;
+ int numByte = 1 + (statusData.Length / 8);
+ byte[] tabDatiStatus = new byte[numByte];
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref tabDatiStatus);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-DatiStatus", tabDatiStatus.Length), DateTime.Now.Subtract(inizio).Ticks);
+
+ // decodifico aree memoria secondo tab configurazione
+ processStatusData(tabDatiStatus, statusData);
+ }
+ fatto = true;
+ }
+ catch
+ { }
+ return fatto;
+ }
+ ///
+ /// Leggo dati globali comuni (x path, assi...)
+ ///
+ public override void getGlobalData()
+ {
+ // svuoto...
+ resetDebugConsole();
+
+ // accodo dati path in DataMonitor......
+ StringBuilder sb1 = new StringBuilder();
+ StringBuilder sb2 = new StringBuilder();
+
+ // dati base...
+ sb1.AppendLine(string.Format("POWER {0}: | EmStop:{1:N3} | ProcSel: {2}", mPower.Value, mEStop.Value, mProcSel.Value));
+
+ // leggo dati globali...
+ parentForm.commPlcActive = true;
+ inizio = DateTime.Now;
+ allDynData = FANUC_ref.getAllDynData();
+ if (utils.CRB("recTime")) TimingData.addResult("R-ALL-DYN-DATA", DateTime.Now.Subtract(inizio).Ticks);
+ parentForm.commPlcActive = false;
+
+ FeedRate = allDynData.actf;
+
+ int memIndex = 12000;
+ byte[] PathData_mem = new byte[4];
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.R, memIndex, ref PathData_mem);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-PathData", PathData_mem.Length), DateTime.Now.Subtract(inizio).Ticks);
+
+ // 2016.07.19 mod con Fabio
+ //JogRateOver = PathData_mem[0];
+ FeedRateOver = PathData_mem[1];
+ RapidOver = PathData_mem[2];
+ SpeedRateOver = PathData_mem[3];
+
+ sb1.AppendLine(string.Format("FeedRate: {0} mm/min", FeedRate));
+ sb1.AppendLine(string.Format("FeedRateOver: {0} %", FeedRateOver));
+ sb1.AppendLine(string.Format("RapidOver: {0} %", RapidOver));
+ sb1.AppendLine(string.Format("SpeedRateOver: {0} %", SpeedRateOver));
+
+ // se ho allarmi li accodo...
+ if (allDynData.alarm != 0)
+ {
+ sb1.AppendLine(string.Format("Allarmi CNC: {0}", allDynData.alarm));
+
+ parentForm.commPlcActive = true;
+ inizio = DateTime.Now;
+ allarmiCNC = FANUC_ref.getCncAlarm();
+ if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ALARMS", DateTime.Now.Subtract(inizio).Ticks);
+ parentForm.commPlcActive = false;
+ checkCNCAlarms();
+ }
+ else
+ {
+ allarmiCNC = new CMSCncLib.Focas1.ODBALMMSG2();
+ }
+
+ // accodo dati base!
+ parentForm.dataMonitor_1 = sb1.ToString();
+ // accodo dati UT...
+ for (int i = 0; i < currAdpConf.nUnOp; i++)
+ {
+ sb2.AppendLine(string.Format("UT: ToolId {0} | VitaRes {1} | TipoVita {2} ", vettUnOp[i].mUnOpToolId.Value, vettUnOp[i].mUnOpVitaRes.Value, vettUnOp[i].mUnOpVitaResType.Value));
+ }
+ parentForm.dataMonitor_2 = sb2.ToString();
+
+ // gestisco lettura dati manutenzione da PLC...
+ getMtzDataFromPlc();
+ // gestisco lettura dati analogici da PLC...
+ getAnalogDataFromPlc();
+ // gestisco lettura dati status da PLC...
+ getStatusDataFromPlc();
+ }
+ ///
+ /// Carico file conf dati CMS
+ ///
+ protected override void loadOtherFile()
+ {
+ base.loadOtherFile();
+ loadMaintData("R", 14000, 4);
+ loadStatusData("R", 14512, 1);
+ loadAnalogData("R", 15000, 4);
+ }
+ ///
+ /// Processing allarmi CNC
+ ///
+ public override void processAlarm()
+ {
+ base.processAlarm();
+
+ // aggiungo gestione allarmi CNC
+ checkCNCAlarms();
+ }
+ ///
+ /// Verifica i 10 allarmi CNC SE presenti
+ ///
+ private void checkCNCAlarms()
+ {
+ // faccio parse allarmi: se ci sono invio e presento
+ sendAlarmIfPresent(allarmiCNC.msg1);
+ sendAlarmIfPresent(allarmiCNC.msg2);
+ sendAlarmIfPresent(allarmiCNC.msg3);
+ sendAlarmIfPresent(allarmiCNC.msg4);
+ sendAlarmIfPresent(allarmiCNC.msg5);
+ sendAlarmIfPresent(allarmiCNC.msg6);
+ sendAlarmIfPresent(allarmiCNC.msg7);
+ sendAlarmIfPresent(allarmiCNC.msg8);
+ sendAlarmIfPresent(allarmiCNC.msg9);
+ sendAlarmIfPresent(allarmiCNC.msg10);
+ }
+
+ ///
+ /// Invia singolo allarme CNC se presente
+ ///
+ ///
+ protected void sendAlarmIfPresent(CMSCncLib.Focas1.ODBALMMSG2_data allarme)
+ {
+ // controllo valore...
+ if (allarme.alm_no > 0)
+ {
+ try
+ {
+ StringBuilder sb = new StringBuilder();
+ if (utils.CRI("loglevel") > 5)
+ {
+ lg.Info(string.Format("Allarmi CNC: NUM {0} | MESS: {1} | ASSE: {2} | TYPE: {3}", allarme.alm_no, allarme.alm_msg, allarme.axis, allarme.type));
+ }
+ // se ho asse accodo ad asse altrimenti no...
+ string codAllarme = string.Format("T{0}-N{1}", allarme.type, allarme.alm_no);
+ if (allarme.axis == 0)
+ {
+ mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
+ }
+ else
+ {
+ vettAxis[allarme.axis - 1].mAxAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
+ }
+ // mostro in form!
+ sb.AppendLine(codAllarme);
+ parentForm.dataMonitor_1 += sb.ToString();
+ }
+ catch (Exception exc)
+ {
+ lg.Error(string.Format("{0}", exc));
+ }
+ }
+ }
+ ///
+ /// Recupero dati x UnOp
+ ///
+ public override void getUnOp()
+ {
+ // leggo in blocco tutte le speed da memoria...
+ int memIndex = 3140;
+ // buffer memoria 60 byte... speed (16bit 2 * 20) + load (8bit 1 * 20) visto che sono 20 teste max
+ byte[] unOpSpeedMem = new byte[60];
+
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.D, memIndex, ref unOpSpeedMem);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-SPEED_UNOP", unOpSpeedMem.Length), DateTime.Now.Subtract(inizio).Ticks);
+
+ procUnOp(unOpSpeedMem);
+ }
+ ///
+ /// Procedura di processing lettura memoria x DatiUt - Step 4
+ ///
+ ///
+ ///
+ ///
+ public override int getDatiUt_step4(ref byte[] int32Mem, int j)
+ {
+ int memIndex = 13100 + 4 * j;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.D, memIndex, ref int32Mem);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-VitaRes", int32Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
+ return memIndex;
+ }
+ ///
+ /// Procedura di processing lettura memoria x DatiUt - Step 3b
+ ///
+ ///
+ ///
+ ///
+ public override int getDatiUt_step3b(ref byte int8Mem, int j)
+ {
+ int memIndex = 10700 + 1 * j;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.D, memIndex, ref int8Mem);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", 8), DateTime.Now.Subtract(inizio).Ticks);
+ return memIndex;
+ }
+ ///
+ /// Procedura di processing lettura memoria x DatiUt - Step 3a
+ ///
+ ///
+ ///
+ public override int getDatiUt_step3a(ref byte[] tabFam_FamUt)
+ {
+ int memIndex = 8900;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.D, memIndex, ref tabFam_FamUt);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabFamUT-FamUT", tabFam_FamUt.Length), DateTime.Now.Subtract(inizio).Ticks);
+ return memIndex;
+ }
+ ///
+ /// Procedura di processing lettura memoria x DatiUt - Step 2b
+ ///
+ ///
+ ///
+ ///
+ public override int getDatiUt_step2b(ref byte[] int16Mem, int j)
+ {
+ int memIndex = 11700 + 2 * j;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.D, memIndex, ref int16Mem);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-FamUT", int16Mem.Length), DateTime.Now.Subtract(inizio).Ticks);
+ return memIndex;
+ }
+ ///
+ /// Procedura di processing lettura memoria x DatiUt - Step 2a
+ ///
+ ///
+ ///
+ public override int getDatiUt_step2a(ref byte[] tabUt_UT)
+ {
+ int memIndex = 11300;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.D, memIndex, ref tabUt_UT);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-TabUT-UT", tabUt_UT.Length), DateTime.Now.Subtract(inizio).Ticks);
+ return memIndex;
+ }
+ ///
+ /// Procedura di processing lettura memoria x DatiUt - Step 1
+ ///
+ ///
+ ///
+ public override int getDatiUt_step1(ref byte[] elencoUtMem)
+ {
+ int memIndex = 2960;
+ inizio = DateTime.Now;
+ FanucMemRW(R, FANUC.MemType.D, memIndex, ref elencoUtMem);
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-NUMUT", elencoUtMem.Length), DateTime.Now.Subtract(inizio).Ticks);
+ return memIndex;
+ }
+
+ public override void getPath()
+ {
+ base.getPath();
+
+ // recupero vettore generale G MODE
+ parentForm.commPlcActive = true;
+ inizio = DateTime.Now;
+ CMSCncLib.Focas1.ODBGCD vettGCodes = FANUC_ref.getPathGCodeMod();
+ if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
+ parentForm.commPlcActive = false;
+
+ string GCodAttivi = "";
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd4.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd5.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd6.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd7.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd8.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd9.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd10.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd11.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd12.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd13.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd14.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd15.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd16.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd17.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd18.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd19.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd20.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd21.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd22.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd23.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd24.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd25.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd26.code);
+ GCodAttivi += string.Format("[{0}]", vettGCodes.gcd27.code);
+
+ parentForm.commPlcActive = true;
+ inizio = DateTime.Now;
+ vettGCodes = FANUC_ref.getPathGCode1Shot();
+ parentForm.commPlcActive = false;
+ if (utils.CRB("recTime")) TimingData.addResult("R-GCodOneShot", DateTime.Now.Subtract(inizio).Ticks);
+ if (vettGCodes.gcd0.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
+ if (vettGCodes.gcd1.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
+ if (vettGCodes.gcd2.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
+ if (vettGCodes.gcd3.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
+
+ parentForm.commPlcActive = true;
+ inizio = DateTime.Now;
+ CMSCncLib.Focas1.ODB5AXMAN vettTTCoord = FANUC_ref.getPathTTCoord();
+ if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
+ parentForm.commPlcActive = false;
+
+ // ciclo su path
+ StringBuilder sb_2;
+ StringBuilder sb_3;
+ for (int i = 0; i < currAdpConf.nPath; i++)
+ {
+ // accodo dati path in DataMonitor...
+ sb_2 = new StringBuilder();
+ sb_3 = new StringBuilder();
+
+ vettPath[i].mPathCodG_Act.Value = GCodAttivi;
+
+ vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale");
+ vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale");
+ vettPath[i].mPathPosActZ.Value = ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale");
+ vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale");
+ vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale");
+ vettPath[i].mPathPosActK.Value = "0"; // è 5 assi...nullo...
+
+ // 2017.01.16 da rivedere
+ vettPath[i].mPathCurrProgRowNum.Value = "";
+ vettPath[i].mPathActiveAxes.Value = "";
+
+ sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, vettPath[i].mPathCurrProg.Value));
+ sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
+
+ sb_3.AppendLine(string.Format("Path {0}, Asse 1: {1:N3}", i + 1, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale")));
+ sb_3.AppendLine(string.Format("Path {0}, Asse 2: {1:N3}", i + 1, ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale")));
+ sb_3.AppendLine(string.Format("Path {0}, Asse 3: {1:N3}", i + 1, ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale")));
+ sb_3.AppendLine(string.Format("Path {0}, Cent 1: {1:N3}", i + 1, ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale")));
+ sb_3.AppendLine(string.Format("Path {0}, Cent 2: {1:N3}", i + 1, ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale")));
+
+ parentForm.dataMonitor_2 += sb_2.ToString();
+ parentForm.dataMonitor_3 += sb_3.ToString();
+ }
+
+ }
+
+ public override void getAxis()
+ {
+ // mostro assi in DataMonitor......
+ StringBuilder sb = new StringBuilder();
+
+ parentForm.commPlcActive = true;
+ inizio = DateTime.Now;
+ CMSCncLib.Focas1.ODBPOS posAssi = FANUC_ref.getAllAxisPos();
+ if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_POS", DateTime.Now.Subtract(inizio).Ticks);
+
+ inizio = DateTime.Now;
+ CMSCncLib.Focas1.ODBSVLOAD loadAssi = FANUC_ref.getAllAxisLoad();
+ if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_LOAD", DateTime.Now.Subtract(inizio).Ticks);
+ parentForm.commPlcActive = false;
+
+ CMSCncLib.Focas1.LOADELM valLoad = new CMSCncLib.Focas1.LOADELM();
+ CMSCncLib.Focas1.POSELMALL valPos = new CMSCncLib.Focas1.POSELMALL();
+
+ // nuova posizione (per calcoli)
+ double newPos = 0;
+ double distPerc = 0;
+ int newDir = 0;
+ string tipoAsse = "";
+ string direzione = "";
+
+ for (int i = 0; i < currAdpConf.nAxis; i++)
+ {
+ // per sicurezza try-catch
+ try
+ {
+ // in base a indice scelgo valore posizione e load
+ switch (i)
+ {
+ case 0:
+ valPos = posAssi.p1;
+ valLoad = loadAssi.svload1;
+ break;
+ case 1:
+ valPos = posAssi.p2;
+ valLoad = loadAssi.svload2;
+ break;
+ case 2:
+ valPos = posAssi.p3;
+ valLoad = loadAssi.svload3;
+ break;
+ case 3:
+ valPos = posAssi.p4;
+ valLoad = loadAssi.svload4;
+ break;
+ case 4:
+ valPos = posAssi.p5;
+ valLoad = loadAssi.svload5;
+ break;
+ case 5:
+ valPos = posAssi.p6;
+ valLoad = loadAssi.svload6;
+ break;
+ case 6:
+ valPos = posAssi.p7;
+ valLoad = loadAssi.svload7;
+ break;
+ case 7:
+ valPos = posAssi.p8;
+ valLoad = loadAssi.svload8;
+ break;
+ case 8:
+ valPos = posAssi.p9;
+ valLoad = loadAssi.svload9;
+ break;
+ case 9:
+ valPos = posAssi.p10;
+ valLoad = loadAssi.svload10;
+ break;
+ case 10:
+ valPos = posAssi.p11;
+ valLoad = loadAssi.svload11;
+ break;
+ case 11:
+ valPos = posAssi.p12;
+ valLoad = loadAssi.svload12;
+ break;
+ case 12:
+ valPos = posAssi.p13;
+ valLoad = loadAssi.svload13;
+ break;
+ case 13:
+ valPos = posAssi.p14;
+ valLoad = loadAssi.svload14;
+ break;
+ case 14:
+ valPos = posAssi.p15;
+ valLoad = loadAssi.svload15;
+ break;
+ case 15:
+ valPos = posAssi.p16;
+ valLoad = loadAssi.svload16;
+ break;
+ case 16:
+ valPos = posAssi.p17;
+ valLoad = loadAssi.svload17;
+ break;
+ case 17:
+ valPos = posAssi.p18;
+ valLoad = loadAssi.svload18;
+ break;
+ case 18:
+ valPos = posAssi.p19;
+ valLoad = loadAssi.svload19;
+ break;
+ case 19:
+ valPos = posAssi.p20;
+ valLoad = loadAssi.svload20;
+ break;
+ case 20:
+ valPos = posAssi.p21;
+ valLoad = loadAssi.svload21;
+ break;
+ case 21:
+ valPos = posAssi.p22;
+ valLoad = loadAssi.svload22;
+ break;
+ case 22:
+ valPos = posAssi.p23;
+ valLoad = loadAssi.svload23;
+ break;
+ case 23:
+ valPos = posAssi.p24;
+ valLoad = loadAssi.svload24;
+ break;
+ case 24:
+ valPos = posAssi.p25;
+ valLoad = loadAssi.svload25;
+ break;
+ case 25:
+ valPos = posAssi.p26;
+ valLoad = loadAssi.svload26;
+ break;
+ case 26:
+ valPos = posAssi.p27;
+ valLoad = loadAssi.svload27;
+ break;
+ case 27:
+ valPos = posAssi.p28;
+ valLoad = loadAssi.svload28;
+ break;
+ case 28:
+ valPos = posAssi.p29;
+ valLoad = loadAssi.svload29;
+ break;
+ case 29:
+ valPos = posAssi.p30;
+ valLoad = loadAssi.svload30;
+ break;
+ case 30:
+ valPos = posAssi.p31;
+ valLoad = loadAssi.svload31;
+ break;
+ case 31:
+ valPos = posAssi.p32;
+ valLoad = loadAssi.svload32;
+ break;
+ default:
+ // 2017.03.01 suggerimento Fabio: in CMS_FANUC in advanced compiler options mettere FS30D=1,SIEMENS=1 x leggere + assi?!?
+ valPos = posAssi.p1;
+ valLoad = loadAssi.svload1;
+ break;
+ }
+
+ // popolo valori...
+ vettAxis[i].mAxLoad.Value = (double)(valLoad.data) / Math.Pow(10, valLoad.dec);
+ newPos = (double)(valPos.abs.data) / Math.Pow(10, valPos.abs.dec);
+ vettAxis[i].mAxPosAct.Value = newPos;
+ vettAxis[i].mAxPosTgt.Value = newPos + (double)(valPos.dist.data) / Math.Pow(10, valPos.dist.dec);
+
+ vettAxis[i].mAxFeedAct.Value = FeedRate;
+
+ // calcolo distanza e salvo valore...
+ distPerc = newPos - prevPosAxis[i];
+
+ // sistemo direzione +/- (POS/NEG se lineari, CCW/CW se rotativi)
+ if (distPerc != 0)
+ {
+ newDir = Convert.ToInt32(distPerc / Math.Abs(distPerc));
+ }
+ else
+ {
+ newDir = prevDirAxis[i];
+ }
+
+ // verifico tipo direzione da tipo asse...
+ tipoAsse = vettAxis[i].mAxType.Value.ToString();
+ if (tipoAsse == "LINEAR")
+ {
+ // ?: conditional operator.
+ direzione = (newDir > 0) ? "POSITIVE" : "NEGATIVE";
+ }
+ else if (tipoAsse == "ROTARY")
+ {
+ direzione = (newDir > 0) ? "CLOCKWISE" : "COUNTER_CLOCKWISE";
+ }
+
+ vettAxis[i].mAxDir.Value = direzione;
+
+
+ if (utils.CRB("verbose"))
+ {
+ sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3} | {4}", valPos.abs.name, (double)(valPos.abs.data) / Math.Pow(10, valPos.abs.dec), valPos.dist.name, (double)(valPos.dist.data) / Math.Pow(10, valPos.dist.dec), direzione));
+ }
+
+ // salvo valori vettore prec...
+ prevPosAxis[i] = newPos;
+ prevDirAxis[i] = newDir;
+
+ //vettAxis[i].mAxMainProc.Value = AxData.AxisMainProc;
+ //vettAxis[i].mAxIsMaster.Value = AxData.AxisIsMaster;
+ //vettAxis[i].mAxMastId.Value = AxData.AxisMastId;
+ vettAxis[i].mAxFeedOver.Value = FeedRateOver;
+ //vettAxis[i].mAxAccelAct.Value = AxData.AxisAccel;
+ //vettAxis[i].mAxBattery.Value = AxData.AxisBattery;
+ }
+ catch
+ {
+ lg.Error(string.Format("Errore in lettura asse {0}", i));
+ }
+ }
+
+ parentForm.dataMonitor_3 += sb.ToString();
+ }
+ }
}
diff --git a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs
index 28c10da..6afcffe 100644
--- a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs
+++ b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs
@@ -713,6 +713,10 @@ namespace MTC_Adapter
///
public uint[] currNumCambiUt;
///
+ /// Vettore ATTUALE dei contatori GENERICI
+ ///
+ public uint[] currCounters;
+ ///
/// Vettore ATTUALE dei contatori del numero movimenti Slitta Magazzino
///
public uint[] currSlittaMag;
@@ -782,6 +786,10 @@ namespace MTC_Adapter
///
public uint[] istNumCambiUt;
///
+ /// Vettore ISTANTANEO dei contatori generici
+ ///
+ public uint[] istCounters;
+ ///
/// Vettore ISTANTANEO dei contatori del numero movimenti Slitta Magazzino
///
public uint[] istSlittaMag;
@@ -834,6 +842,10 @@ namespace MTC_Adapter
///
public bool hasBigEndian = false;
///
+ /// Verifica se siano stati già mostrati gli allarmi x debug...
+ ///
+ public bool alarmMsgDispl = true;
+ ///
/// dimensione massima vettore memorie UT
///
public short numMemUt = 200;
@@ -1033,6 +1045,10 @@ namespace MTC_Adapter
///
public Event mOperator = new Event("OperatorId");
///
+ /// Vettore CONTATORI generici
+ ///
+ public Event[] mCounters;
+ ///
/// Vettore EVENTS letti da area status
///
public Event[] mStatusEvents;
@@ -1157,6 +1173,16 @@ namespace MTC_Adapter
mAdapter.AddDataItem(mUnkStatus);
mAdapter.AddDataItem(mUnkStrobe);
+#if false
+ // contatori generici
+ vettCounters = new ObjCount[adpConf.nCounters];
+ for (int i = 0; i < adpConf.nCounters; i++)
+ {
+ vettCounters[i] = new ObjCount(adpConf.Counters[i]);
+ mAdapter.AddDataItem(vettCounters[i].mCounter);
+ }
+#endif
+
// Aree memoria
vettMemArea = new MemArea[adpConf.nMemArea];
for (int i = 0; i < adpConf.nMemArea; i++)
@@ -1385,6 +1411,7 @@ namespace MTC_Adapter
// carico dati x Maintenance
if (utils.CRB("verbose")) lg.Info("Inizio caricamento vettore variabili manutenzione gestite");
int totRighe = 0;
+ int numCounters = 0;
string fileName = string.Format(@"{0}\{1}", utils.confDir, utils.CRS("CounterListFilePath"));
string linea;
totRighe = File.ReadLines(fileName).Count();
@@ -1400,6 +1427,11 @@ namespace MTC_Adapter
if (linea.Substring(0, 1) != "#")
{
maintData[numRiga] = decodeOtherData(linea, utils.CRC("testCharSep"), memPre, baseAddr, memSize);
+ // se è un counter lo processo come tale..
+ if (maintData[numRiga].varName.StartsWith("Counter_"))
+ {
+ numCounters++;
+ }
numRiga++;
}
}
@@ -1409,6 +1441,22 @@ namespace MTC_Adapter
Array.Resize(ref maintData, numRiga);
if (utils.CRB("verbose")) lg.Info(string.Format("Fine caricamento vettore di {0} variabili manutenzione gestite", numRiga));
+
+ // ora inizializzo l'insieme degli events dei COUNTERS generici...
+ mCounters = new Event[numCounters];
+ currCounters = new uint[numCounters];
+ istCounters = new uint[numCounters];
+ int idx = 0;
+ foreach (otherData item in maintData)
+ {
+ if (item.varName.StartsWith("Counter_"))
+ {
+ mCounters[idx] = new Event(item.varName);
+ mAdapter.AddDataItem(mCounters[idx]);
+ idx++;
+ }
+ }
+ if (utils.CRB("verbose")) lg.Info(string.Format("inizializzato vettore di {0} MTC.EVENTS delle variabili CONTATORI generiche", numRiga));
}
///
/// Lettura file gestione dati analogici da PLC
@@ -1693,10 +1741,16 @@ namespace MTC_Adapter
currSlittaMag[i] = getStoredValUInt(string.Format("SlittaMagazzino_{0:00}_Count", i + 1));
}
+ for (int i = 0; i < mCounters.Length; i++)
+ {
+ currCounters[i] = getStoredValUInt(string.Format("Counter_{0:000}", i + 1));
+ }
+
for (int i = 0; i < currAdpConf.nProtMag; i++)
{
currProtMag[i] = getStoredValUInt(string.Format("ProtMagazzino_{0:00}_Count", i + 1));
}
+
}
catch (Exception exc)
{
@@ -2065,12 +2119,14 @@ namespace MTC_Adapter
}
}
- private void resetDebugConsole()
+ public void resetDebugConsole()
{
// resetto console debug...
parentForm.dataMonitor_1 = "";
parentForm.dataMonitor_2 = "";
parentForm.dataMonitor_3 = "";
+ // indico msg allarme NON inviati
+ alarmMsgDispl = false;
}
///
@@ -2100,7 +2156,7 @@ namespace MTC_Adapter
sb2.AppendLine(string.Format("UT: ToolId {0} | VitaRes {1} | TipoVita {2} ", vettUnOp[i].mUnOpToolId.Value, vettUnOp[i].mUnOpVitaRes.Value, vettUnOp[i].mUnOpVitaResType.Value));
}
parentForm.dataMonitor_2 = sb2.ToString();
-
+
// gestisco lettura dati status da PLC...
getStatusDataFromPlc();
// gestisco lettura dati analogici da PLC...
@@ -3189,7 +3245,6 @@ namespace MTC_Adapter
{
// leggo 32bit alla volta...
AlarmBlock = (StFlag32)BitConverter.ToUInt32(AlarmFlags, i * 4);
-
for (int j = 0; j < 32; j++)
{
// converto! e aggiungo allarmi sollevati al corretto controller allarmi...
@@ -3287,6 +3342,20 @@ namespace MTC_Adapter
{
istSlittaTast = tabDatiMtz[i];
}
+ else if (maintData[i].varName.StartsWith("Counter_"))
+ {
+ try
+ {
+ numero = Convert.ToInt32(maintData[i].varName.Replace("Counter_", ""));
+ }
+ catch
+ {
+ }
+ if (numero > 0)
+ {
+ istCounters[numero - 1] = tabDatiMtz[i];
+ }
+ }
else if (maintData[i].varName.StartsWith("Path_"))
{
if (maintData[i].varName.EndsWith("_PZ_TOT"))
@@ -3296,8 +3365,7 @@ namespace MTC_Adapter
numero = Convert.ToInt32(maintData[i].varName.Replace("Path_", "").Replace("_PZ_TOT", ""));
}
catch
- {
- }
+ { }
if (numero > 0)
{
vettPath[numero - 1].mPathPartCount.Value = tabDatiMtz[i];
@@ -3538,6 +3606,7 @@ namespace MTC_Adapter
needSave = procPzProd(needSave);
needSave = procGiriTotUnOp(needSave);
needSave = procNumCU(needSave);
+ needSave = procCounters(needSave);
needSave = procMovTotAssi(needSave);
needSave = procAccTimeAssi(needSave);
needSave = procNumInvAssi(needSave);
@@ -4474,6 +4543,40 @@ namespace MTC_Adapter
return needSave;
}
///
+ /// Processing delle variabili generiche Counters
+ ///
+ ///
+ ///
+ public bool procCounters(bool needSave)
+ {
+ uint delta = 0;
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < mCounters.Length; i++)
+ {
+ delta = istCounters[i] - currCounters[i];
+ // controllo delta < 50% max...
+ if (delta < uint.MaxValue / 2)
+ {
+ //processo comunque sempre...
+ uint contTot = updateValUIntByIncr(i, delta, "Counter_{0:000}");
+ // passo valore totale all'adapter
+ mCounters[i].Value = contTot;
+ // controllo valore riferimento...
+ if (delta > 0)
+ {
+ // segnalo necessità salvataggio!
+ needSave = true;
+ }
+ // ...aggiorno valore riferimento...
+ currCounters[i] = istCounters[i];
+ }
+ sb.AppendLine(mCounters[i].ToString().Replace("|", " | "));
+ }
+ // salvo su maschera...
+ parentForm.dataMonitor_2 += sb.ToString();
+ return needSave;
+ }
+ ///
/// Processing delle variabili sui componenti SlittaMag
///
///
diff --git a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs
index 4d4adb1..a0c1dc7 100644
--- a/MTC_Adapter/MTC_Adapter/AdapterOsai.cs
+++ b/MTC_Adapter/MTC_Adapter/AdapterOsai.cs
@@ -178,7 +178,6 @@ namespace MTC_Adapter
///
/// Vettore degli allarmi CNC attivi
///
- //public CMSCncLib.OPENcontrol.MSGERROR allarmiCNC;
public Dictionary allarmiCNC = new Dictionary();
///
/// estende l'init della classe base...
@@ -200,7 +199,7 @@ namespace MTC_Adapter
vettGCodes_02 = new ushort[14];
contChkGCod = utils.CRI("contChkGCod");
- // è littel endian (NON serve conversione)
+ // è little endian (NON serve conversione)
hasBigEndian = false;
lg.Info("Start init Adapter OSAI all'IP {0}", utils.CRS("ipPLC"));
@@ -912,7 +911,10 @@ namespace MTC_Adapter
parentForm.commPlcActive = true;
inizio = DateTime.Now;
OSAI_ref.getPathGCodeMod(1, ref vettGCodes_01);
- OSAI_ref.getPathGCodeMod(2, ref vettGCodes_02);
+ if (currAdpConf.nPath > 1)
+ {
+ OSAI_ref.getPathGCodeMod(2, ref vettGCodes_02);
+ }
if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
parentForm.commPlcActive = false;
}
@@ -920,7 +922,7 @@ namespace MTC_Adapter
{
contChkGCod--;
}
-
+
for (int i = 0; i < currAdpConf.nPath; i++)
{
// accodo dati path in DataMonitor...
diff --git a/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs b/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs
index bf4f175..45b4291 100644
--- a/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs
+++ b/MTC_Adapter/MTC_Adapter/AdapterSiemens.cs
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
+using Siemens.Sinumerik.Operate.Services;
namespace MTC_Adapter
{
@@ -186,7 +187,7 @@ namespace MTC_Adapter
///
/// Vettore degli allarmi CNC attivi
///
- public CMSCncLib.Focas1.ODBALMMSG2 allarmiCNC;
+ public Alarm[] allarmiCNC;
///
/// estende l'init della classe base...
@@ -202,7 +203,7 @@ namespace MTC_Adapter
MemBlock_MST = new byte[46];
// salto NON necessario!
saltoMST = 0;
- // è littel endian (SERVE conversione)
+ // è little endian (SERVE conversione)
hasBigEndian = true;
lg.Info("Start init Adapter SIEMENS");
@@ -614,47 +615,12 @@ namespace MTC_Adapter
bool fatto = false;
try
{
-#if false
- // se ho allarmi li accodo...
- if (allNcData.lastncerror != 0)
- {
-
- if (utils.CRI("loglevel") > 5)
- {
- lg.Info(string.Format("Allarmi CNC: {0} ", allNcData.lastncerror));
- }
- string alarmText = string.Format("CNC Alarm - Cod: {0}", allNcData.lastncerror);
-
- // tolgo eventuali allarmi CNC...
- allarmiCNC.Clear();
- allarmiCNC.Add(allNcData.lastncerror.ToString(), alarmText);
-
- //// 2017.05.09 gestione allarmi commentata
- //mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, alarmText, allNcData.lastncerror.ToString(), "", "");
- //// mostro in form!
- //sb1.AppendLine(alarmText);
- //parentForm.dataMonitor_1 += sb1.ToString();
-
- //// 2017.05.09 gestione allarmi commentata
- //// il codice è corretto (manca prima aprte codice + traduzione), se cerco di trovare oggett completo NON c'è, verificare con Andrea...
- //sb1.AppendLine(string.Format("Allarmi CNC: {0}", allNcData.lastncerror));
-
- parentForm.commPlcActive = true;
- //inizio = DateTime.Now;
- //OSAI_ref.O_ReadCurrentErrorMsg(ref allarmiCNC);
- //if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
- //checkCNCAlarms();
- parentForm.commPlcActive = false;
- }
- else
- {
- allarmiCNC.Clear();
- allarmiCNC = new Dictionary();
- // 2017.05.09 gestione allarmi commentata
- //allarmiCNC = new CMSCncLib.OPENcontrol.MSGERROR();
- }
- fatto = true;
-#endif
+ parentForm.commPlcActive = true;
+ inizio = DateTime.Now;
+ allarmiCNC = SIEMENS_ref.getCncAlarm();
+ if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
+ parentForm.commPlcActive = false;
+ fatto = true;
}
catch
{ }
@@ -765,36 +731,41 @@ namespace MTC_Adapter
private void checkCNCAlarms()
{
// faccio parse allarmi: se ci sono invio e presento
- sendAlarmIfPresent(allarmiCNC.msg1);
- sendAlarmIfPresent(allarmiCNC.msg2);
- sendAlarmIfPresent(allarmiCNC.msg3);
- sendAlarmIfPresent(allarmiCNC.msg4);
- sendAlarmIfPresent(allarmiCNC.msg5);
- sendAlarmIfPresent(allarmiCNC.msg6);
- sendAlarmIfPresent(allarmiCNC.msg7);
- sendAlarmIfPresent(allarmiCNC.msg8);
- sendAlarmIfPresent(allarmiCNC.msg9);
- sendAlarmIfPresent(allarmiCNC.msg10);
+ if (allarmiCNC != null)
+ {
+ if (allarmiCNC.Length > 0)
+ {
+ foreach (Alarm allarme in allarmiCNC)
+ {
+ sendAlarmIfPresent(allarme);
+ }
+ }
+ }
+ alarmMsgDispl = true;
}
///
/// Invia singolo allarme CNC se presente
///
///
- protected void sendAlarmIfPresent(CMSCncLib.Focas1.ODBALMMSG2_data allarme)
+ protected void sendAlarmIfPresent(Alarm allarme)
{
// controllo valore...
- if (allarme.alm_no > 0)
+ if (allarme.Id > 0)
{
try
{
StringBuilder sb = new StringBuilder();
if (utils.CRI("loglevel") > 5)
{
- lg.Info(string.Format("Allarmi CNC: NUM {0} | MESS: {1} | ASSE: {2} | TYPE: {3}", allarme.alm_no, allarme.alm_msg, allarme.axis, allarme.type));
+ lg.Info(string.Format("Allarmi CNC: Id {0} | MESS: {1} | CAT: {2} | SRC: {3}", allarme.Id, allarme.Message, allarme.Category, allarme.Source));
}
+
+ // da gestire instance = PATH!!! 1/2, x cui raddoppia i messaggi...
+
+ string codAllarme = string.Format("P{0}:S{1} | {2} | {3}", allarme.Instance+1, allarme.Source.Name, allarme.Id, allarme.Message);
+#if false
// se ho asse accodo ad asse altrimenti no...
- string codAllarme = string.Format("T{0}-N{1}", allarme.type, allarme.alm_no);
if (allarme.axis == 0)
{
mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
@@ -802,10 +773,18 @@ namespace MTC_Adapter
else
{
vettAxis[allarme.axis - 1].mAxAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.alm_msg, codAllarme, "", "");
+ }
+#endif
+ // se NON ancora mostrati allarmi...
+ if (!alarmMsgDispl)
+ {
+ // mostro in form!
+ sb.AppendLine(codAllarme);
+ parentForm.dataMonitor_1 += sb.ToString();
}
- // mostro in form!
- sb.AppendLine(codAllarme);
- parentForm.dataMonitor_1 += sb.ToString();
+
+ mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, allarme.Message, codAllarme, "", "");
+
}
catch (Exception exc)
{
@@ -971,50 +950,16 @@ namespace MTC_Adapter
{
base.getPath();
+ string[,] vettGCod = new string[2, 64];
+ // recupero vettore generale G MODE
+ inizio = DateTime.Now;
+ SIEMENS_ref.getPathGCodeMod(currAdpConf.nPath, ref vettGCod);
+ if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
+
+
+
#if false
- // recupero vettore generale G MODE
- inizio = DateTime.Now;
- CMSCncLib.Focas1.ODBGCD vettGCodes = SIEMENS_ref.getPathGCodeMod();
- if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
-
- string GCodAttivi = "";
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd4.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd5.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd6.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd7.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd8.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd9.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd10.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd11.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd12.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd13.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd14.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd15.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd16.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd17.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd18.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd19.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd20.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd21.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd22.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd23.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd24.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd25.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd26.code);
- GCodAttivi += string.Format("[{0}]", vettGCodes.gcd27.code);
-
- inizio = DateTime.Now;
- vettGCodes = SIEMENS_ref.getPathGCode1Shot();
- if (utils.CRB("recTime")) TimingData.addResult("R-GCodOneShot", DateTime.Now.Subtract(inizio).Ticks);
- if (vettGCodes.gcd0.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
- if (vettGCodes.gcd1.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
- if (vettGCodes.gcd2.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
- if (vettGCodes.gcd3.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
-
+
inizio = DateTime.Now;
CMSCncLib.Focas1.ODB5AXMAN vettTTCoord = SIEMENS_ref.getPathTTCoord();
if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
@@ -1029,8 +974,20 @@ namespace MTC_Adapter
sb_2 = new StringBuilder();
sb_3 = new StringBuilder();
+ // copio gcodes!
+ string GCodAttivi = "";
+ for (int j = 0; j < 64; j++)
+ {
+ // SOLO se è diverso da vuoto...
+ if (vettGCod[i, j] != "")
+ {
+ GCodAttivi += string.Format("[{0}]", vettGCod[i, j]);
+ }
+ }
+
+ vettPath[i].mPathCodG_Act.Value = GCodAttivi;
+ sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
#if false
- vettPath[i].mPathCodG_Act.Value = GCodAttivi;
vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale");
vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale");
@@ -1044,7 +1001,6 @@ namespace MTC_Adapter
vettPath[i].mPathActiveAxes.Value = "";
sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, vettPath[i].mPathCurrProg.Value));
- sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
sb_3.AppendLine(string.Format("Path {0}, Asse 1: {1:N3}", i + 1, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale")));
sb_3.AppendLine(string.Format("Path {0}, Asse 2: {1:N3}", i + 1, ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale")));
@@ -1125,7 +1081,7 @@ namespace MTC_Adapter
if (utils.CRB("verbose"))
{
- sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3} | {4}", i, newPos, 0, "-", direzione));
+ sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3} | {4}", i, newPos, ValAssi[i].PosTgt, "", direzione));
}
// salvo valori vettore prec...
diff --git a/MTC_Adapter/MTC_Adapter/App.CMS-FANUC.config b/MTC_Adapter/MTC_Adapter/App.CMS-FANUC.config
index 822e337..9c12d45 100644
--- a/MTC_Adapter/MTC_Adapter/App.CMS-FANUC.config
+++ b/MTC_Adapter/MTC_Adapter/App.CMS-FANUC.config
@@ -7,7 +7,7 @@
-
+
diff --git a/MTC_Adapter/MTC_Adapter/App.config b/MTC_Adapter/MTC_Adapter/App.config
index afdd4a0..be754da 100644
--- a/MTC_Adapter/MTC_Adapter/App.config
+++ b/MTC_Adapter/MTC_Adapter/App.config
@@ -1,9 +1,7 @@
-
-
@@ -40,9 +38,11 @@
ipPLC = "192.168.139.1"-->
-
+
+
+
-
+
diff --git a/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml b/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml
index a3cdf8c..b2257b3 100644
--- a/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml
+++ b/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml
@@ -1,8 +1,8 @@
1
- ADAPTER_OSAI
- OSAI
+ ADAPTER_SIEMENS
+ SIEMENS
0
0
0
@@ -36,13 +36,29 @@
-
+
- ProtMagazzino_01
+ Counter_001
- ProtMagazzino_02
+ Counter_002
+
+
+
+ Counter_003
+
+
+
+
+
+ SlittaMagazzino_01
+
+
+
+
+
+ ProtMagazzino_01
@@ -81,10 +97,6 @@
Path_01
-
- Path_02
-
-
@@ -171,5 +183,135 @@
+
+ Axis_07
+
+
+ Axis_07_Type
+ LINEAR
+
+
+ Axis_07_Grp
+ 00
+
+
+
+
+ Axis_08
+
+
+ Axis_08_Type
+ LINEAR
+
+
+ Axis_08_Grp
+ 00
+
+
+
+
+ Axis_09
+
+
+ Axis_09_Type
+ LINEAR
+
+
+ Axis_09_Grp
+ 00
+
+
+
+
+ Axis_10
+
+
+ Axis_10_Type
+ LINEAR
+
+
+ Axis_10_Grp
+ 00
+
+
+
+
+ Axis_11
+
+
+ Axis_11_Type
+ LINEAR
+
+
+ Axis_11_Grp
+ 00
+
+
+
+
+ Axis_12
+
+
+ Axis_12_Type
+ LINEAR
+
+
+ Axis_12_Grp
+ 00
+
+
+
+
+ Axis_13
+
+
+ Axis_13_Type
+ ROTARY
+
+
+ Axis_13_Grp
+ 00
+
+
+
+
+ Axis_14
+
+
+ Axis_14_Type
+ ROTARY
+
+
+ Axis_14_Grp
+ 00
+
+
+
+
+ Axis_15
+
+
+ Axis_15_Type
+ LINEAR
+
+
+ Axis_15_Grp
+ 00
+
+
+
+
+ Axis_16
+
+
+ Axis_16_Type
+ LINEAR
+
+
+ Axis_16_Grp
+ 00
+
+
+
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/DATA/CONF/AlarmList.map b/MTC_Adapter/MTC_Adapter/DATA/CONF/AlarmList.map
index 98bcf27..6698345 100644
--- a/MTC_Adapter/MTC_Adapter/DATA/CONF/AlarmList.map
+++ b/MTC_Adapter/MTC_Adapter/DATA/CONF/AlarmList.map
@@ -1,503 +1,1025 @@
# Commenti con "#", elenco tipo COD_NUM|GRUPPO|LEVEL|DESCRIZIONE completa
-000001|PLC|FAULT|[COD 001] - 152 AXIS X DRIVING GEAR NOT READY
-000002|PLC|FAULT|[COD 002] - 152 AXIS Y DRIVING GEAR NOT READY
-000003|PLC|FAULT|[COD 003] - 152 AXIS Z DRIVING GEAR NOT READY
-000004|PLC|FAULT|[COD 004] - 152 AXIS V DRIVING GEAR NOT READY
-000005|PLC|FAULT|[COD 005] - 152 AXIS B DRIVING GEAR NOT READY
-000006|PLC|FAULT|[COD 006] - 152 AXIS C DRIVING GEAR NOT READY
-000007|PLC|FAULT|[COD 007] - 152 Allarme azionamento asse ID 07
-000008|PLC|FAULT|[COD 008] - 152 Allarme azionamento asse ID 08
-000009|PLC|FAULT|[COD 009] - 152 Allarme azionamento asse ID 09
-000010|PLC|FAULT|[COD 010] - 152 Allarme azionamento asse ID 10
-000011|PLC|FAULT|[COD 011] - 152 Allarme azionamento asse ID 11
-000012|PLC|FAULT|[COD 012] - 152 Allarme azionamento asse ID 12
-000013|PLC|FAULT|[COD 013] - 152 Allarme azionamento asse ID 13
-000014|PLC|FAULT|[COD 014] - 152 Allarme azionamento asse ID 14
-000015|PLC|FAULT|[COD 015] - 152 Allarme azionamento asse ID 15
-000016|PLC|FAULT|[COD 016] - 152 Allarme azionamento asse ID 16
-000017|PLC|FAULT|[COD 017] - 152 Allarme azionamento asse ID 17
-000018|PLC|FAULT|[COD 018] - 152 Allarme azionamento asse ID 18
-000019|PLC|FAULT|[COD 019] - 152 Allarme azionamento asse ID 19
-000020|PLC|FAULT|[COD 020] - 152 Allarme azionamento asse ID 20
-000021|PLC|FAULT|[COD 021] - 152 Allarme azionamento asse ID 21
-000022|PLC|FAULT|[COD 022] - 152 Allarme azionamento asse ID 22
-000023|PLC|FAULT|[COD 023] - 152 Allarme azionamento asse ID 23
-000024|PLC|FAULT|[COD 024] - 152 Allarme azionamento asse ID 24
-000025|PLC|FAULT|[COD 025] - 152 Allarme azionamento asse ID 25
-000026|PLC|FAULT|[COD 026] - 152 Allarme azionamento asse ID 26
-000027|PLC|FAULT|[COD 027] - 152 Allarme azionamento asse ID 27
-000028|PLC|FAULT|[COD 028] - 152 Allarme azionamento asse ID 28
-000029|PLC|FAULT|[COD 029] - 152 Allarme azionamento asse ID 29
-000030|PLC|FAULT|[COD 030] - 152 Allarme azionamento asse ID 30
-000031|PLC|FAULT|[COD 031] - 152 Allarme azionamento asse ID 31
-000032|PLC|FAULT|[COD 032] - 152 Allarme azionamento asse ID 32
-000033|PLC|FAULT|[COD 033] - 152 Allarme azionamento asse ID 33
-000034|PLC|FAULT|[COD 034] - 152 Allarme azionamento asse ID 34
-000035|PLC|FAULT|[COD 035] - 152 Allarme azionamento asse ID 35
-000036|PLC|FAULT|[COD 036] - 152 Allarme azionamento asse ID 36
-000037|PLC|FAULT|[COD 037] - 152 Allarme azionamento asse ID 37
-000038|PLC|FAULT|[COD 038] - 152 Allarme azionamento asse ID 38
-000039|PLC|FAULT|[COD 039] - 152 Allarme azionamento asse ID 39
-000040|PLC|FAULT|[COD 040] - 152 Allarme azionamento asse ID 40
-000041|PLC|FAULT|[COD 041] - 152 Allarme azionamento asse ID 41
-000042|PLC|FAULT|[COD 042] - 152 Allarme azionamento asse ID 42
-000043|PLC|FAULT|[COD 043] - 152 Allarme azionamento asse ID 43
-000044|PLC|FAULT|[COD 044] - 152 Allarme azionamento asse ID 44
-000045|PLC|FAULT|[COD 045] - 152 Allarme azionamento asse ID 45
-000046|PLC|FAULT|[COD 046] - 152 Allarme azionamento asse ID 46
-000047|PLC|FAULT|[COD 047] - 152 Allarme azionamento asse ID 47
-000048|PLC|FAULT|[COD 048] - 152 Allarme azionamento asse ID 48
-000049|PLC|FAULT|[COD 049] - 152 Allarme azionamento asse ID 49
-000050|PLC|FAULT|[COD 050] - 152 Allarme azionamento asse ID 50
-000051|PLC|FAULT|[COD 051] - 152 Allarme azionamento asse ID 51
-000052|PLC|FAULT|[COD 052] - 152 Allarme azionamento asse ID 52
-000053|PLC|FAULT|[COD 053] - 152 Allarme azionamento asse ID 53
-000054|PLC|FAULT|[COD 054] - 152 Allarme azionamento asse ID 54
-000055|PLC|FAULT|[COD 055] - 152 Allarme azionamento asse ID 55
-000056|PLC|FAULT|[COD 056] - 152 Allarme azionamento asse ID 56
-000057|PLC|FAULT|[COD 057] - 152 Allarme azionamento asse ID 57
-000058|PLC|FAULT|[COD 058] - 152 Allarme azionamento asse ID 58
-000059|PLC|FAULT|[COD 059] - 152 Allarme azionamento asse ID 59
-000060|PLC|FAULT|[COD 060] - 152 Allarme azionamento asse ID 60
-000061|PLC|FAULT|[COD 061] - 152 Allarme azionamento asse ID 61
-000062|PLC|FAULT|[COD 062] - 152 Allarme azionamento asse ID 62
-000063|PLC|FAULT|[COD 063] - 152 Allarme azionamento asse ID 63
-000064|PLC|FAULT|[COD 064] - 152 Allarme azionamento asse ID 64
-000065|PLC|FAULT|[COD 065] - Potenza spenta
-000066|PLC|FAULT|[COD 066] - Assi non riferiti
-000067|PLC|FAULT|[COD 067] - Errore nel ciclo azzeramento assi
-000068|PLC|FAULT|[COD 068] - Errore abilitazione assi
-000069|PLC|FAULT|[COD 069] - Assi non abilitati
-000070|PLC|FAULT|[COD 070] - Errore preset origini
-000071|PLC|FAULT|[COD 071] - Livello minimo lubrificazione
-000072|PLC|FAULT|[COD 072] - Contr.tempo esecuzione background
-000073|PLC|FAULT|[COD 073] - Pulsante di start rifiutato
-000074|PLC|FAULT|[COD 074] - Troppi assi selezionati
-000075|PLC|FAULT|[COD 075] - Teach pendant abilitata
-000076|PLC|FAULT|[COD 076] -
-000077|PLC|FAULT|[COD 077] - Errore salvataggio file XML
-000078|PLC|FAULT|[COD 078] - Parametri AMP assi sovrascritti
-000079|PLC|FAULT|[COD 079] - Azion.OsWire in attesa rapid-halt
-000080|PLC|FAULT|[COD 080] - Azion.OsWire attesa I/O emer.man.
-000081|PLC|FAULT|[COD 081] - Anomalia generica function block
-000082|PLC|FAULT|[COD 082] - Nodo di I/O digitale in errore
-000083|PLC|FAULT|[COD 083] - Time-out abilitazione assi
-000084|PLC|FAULT|[COD 084] - Err. gestione file mappatura I/O
-000085|PLC|FAULT|[COD 085] - Azionamenti guasti
-000086|PLC|FAULT|[COD 086] - Errore durante l'inizializzazione
-000087|PLC|FAULT|[COD 087] - Watch dog console Top 5
-000088|PLC|FAULT|[COD 088] - Errore gestione reset
-000089|PLC|FAULT|[COD 089] - Errore file XML configuraz. PLC
-000090|PLC|FAULT|[COD 090] - Errore file XML configuraz. assi
-000091|PLC|FAULT|[COD 091] - Errore Ethercat
-000092|PLC|FAULT|[COD 092] -
-000093|PLC|FAULT|[COD 093] - Azionamento mandrino 4 guasto
-000094|PLC|FAULT|[COD 094] - Azionamento mandrino 3 guasto
-000095|PLC|FAULT|[COD 095] - Azionamento mandrino 2 guasto
-000096|PLC|FAULT|[COD 096] - Azionamento mandrino 1 guasto
-000097|PLC|FAULT|[COD 097] - Ripari aperti
-000098|PLC|FAULT|[COD 098] - Mancanza pressostato aria
-000099|PLC|FAULT|[COD 099] - Intervento termici generici
-000100|PLC|FAULT|[COD 100] - Oltrecorsa asse ausiliario
-000101|PLC|FAULT|[COD 101] - Teach pendant liveman
-000102|PLC|FAULT|[COD 102] - Disabilitazione assi
-000103|PLC|FAULT|[COD 103] -
-000104|PLC|FAULT|[COD 104] -
-000105|PLC|FAULT|[COD 105] -
-000106|PLC|FAULT|[COD 106] -
-000107|PLC|FAULT|[COD 107] -
-000108|PLC|FAULT|[COD 108] -
-000109|PLC|FAULT|[COD 109] -
-000110|PLC|FAULT|[COD 110] -
-000111|PLC|FAULT|[COD 111] -
-000112|PLC|FAULT|[COD 112] -
-000113|PLC|FAULT|[COD 113] - Rotaz. mandr. 1 con pezzo sbloc.
-000114|PLC|FAULT|[COD 114] - Rotaz. mandr. 1 con utens. sbloc.
-000115|PLC|FAULT|[COD 115] - Err.parità sensori uten.1 blo/sbl
-000116|PLC|FAULT|[COD 116] - Memoria utens. in mandr. 1 errata
-000117|PLC|FAULT|[COD 117] - Rotaz. mandr. 1 con riferim. alti
-000118|PLC|FAULT|[COD 118] -
-000119|PLC|FAULT|[COD 119] -
-000120|PLC|FAULT|[COD 120] -
-000121|PLC|FAULT|[COD 121] -
-000122|PLC|FAULT|[COD 122] -
-000123|PLC|FAULT|[COD 123] -
-000124|PLC|FAULT|[COD 124] -
-000125|PLC|FAULT|[COD 125] -
-000126|PLC|FAULT|[COD 126] -
-000127|PLC|FAULT|[COD 127] -
-000128|PLC|FAULT|[COD 128] -
-000129|PLC|FAULT|[COD 129] - Pezzo 1 non bloccato
-000130|PLC|FAULT|[COD 130] - Pezzo 1 non sbloccato
-000131|PLC|FAULT|[COD 131] - Utensile 1 non sbloccato
-000132|PLC|FAULT|[COD 132] - Utensile 1 non bloccato
-000133|PLC|FAULT|[COD 133] - Cambio utensile 1 fuori fase
-000134|PLC|FAULT|[COD 134] - Cappa aspirazione non alta
-000135|PLC|FAULT|[COD 135] - Cappa aspirazione non bassa
-000136|PLC|FAULT|[COD 136] - Uten.mand.1 non allineato con RCM
-000137|PLC|FAULT|[COD 137] -
-000138|PLC|FAULT|[COD 138] -
-000139|PLC|FAULT|[COD 139] -
-000140|PLC|FAULT|[COD 140] -
-000141|PLC|FAULT|[COD 141] -
-000142|PLC|FAULT|[COD 142] -
-000143|PLC|FAULT|[COD 143] -
-000144|PLC|FAULT|[COD 144] -
-000145|PLC|FAULT|[COD 145] - Errore gestione asse ausiliario w
-000146|PLC|FAULT|[COD 146] - Messaggio dal processo 1
-000147|PLC|FAULT|[COD 147] - Pulsante sblocco uten.1 rifiutato
-000148|PLC|FAULT|[COD 148] - Rotazione G96 non ammessa Mandr.1
-000149|PLC|FAULT|[COD 149] - Attesa mandrino 1 a regime
-000150|PLC|FAULT|[COD 150] - Errore gestione mandrino 1
-000151|PLC|FAULT|[COD 151] - Modalità rotaz.G96/G97 variata P1
-000152|PLC|FAULT|[COD 152] - Errore funzione T programmata Pr1
-000153|PLC|FAULT|[COD 153] - Errore aggiornamento offset ut. 1
-000154|PLC|FAULT|[COD 154] - Errore gestione assi condivisi
-000155|PLC|FAULT|[COD 155] - Premere start per iniziare RCM
-000156|PLC|FAULT|[COD 156] - Premere start per riprendere lav.
-000157|PLC|FAULT|[COD 157] - Errore nel ciclo di ricerca mem.
-000158|PLC|FAULT|[COD 158] - Attesa sistema pronto SW/HW
-000159|PLC|FAULT|[COD 159] -
-000160|PLC|FAULT|[COD 160] -
-000161|PLC|FAULT|[COD 161] - Rotaz. mandr. 2 con pezzo sbloc.
-000162|PLC|FAULT|[COD 162] - Rotaz. mandr. 2 con utens. sbloc.
-000163|PLC|FAULT|[COD 163] - Err.parità sensori uten.2 blo/sbl
-000164|PLC|FAULT|[COD 164] - Memoria utens. in mandr. 2 errata
-000165|PLC|FAULT|[COD 165] -
-000166|PLC|FAULT|[COD 166] -
-000167|PLC|FAULT|[COD 167] - --- ATTESA CONFERMA CMS CONTROL
-000168|PLC|FAULT|[COD 168] - --- ADAPTER MTCONNECT NON DISPONIBILE
-000169|PLC|FAULT|[COD 169] - 720 LIQUIDO NEBULIZZATORE NON OK
-000170|PLC|FAULT|[COD 170] - 666 SPINDLE 2 SAFETY DEVICE FAILURE
-000171|PLC|FAULT|[COD 171] - 546 B-Z AXIS NOT IN ZERO POSITION
-000172|PLC|FAULT|[COD 172] - 229 THERMAL RELAY HYDRAULIC PUMP 2
-000173|PLC|FAULT|[COD 173] - 120 RANGE ACTIVATION NOT OK 2
-000174|PLC|FAULT|[COD 174] - 135 CONVERTER 2 IN WARNING
-000175|PLC|FAULT|[COD 175] - 135 CONVERTER 2 IN FAULT
-000176|PLC|FAULT|[COD 176] - 520 STALL MODE FUNCTION ACTIVE 2
-000177|PLC|FAULT|[COD 177] - 135 CONVERTER 2 BLOCKED
-000178|PLC|FAULT|[COD 178] - 168 CONVERTER 2 DISABLED
-000179|PLC|FAULT|[COD 179] - 163 CONVERTER 2 BRAKE OUT OF ORDER
-000180|PLC|FAULT|[COD 180] - 100 CONVERTER 2 OFF
-000181|PLC|FAULT|[COD 181] - 514 TOOL CRIB 4 PROTECTION NOT IN POSITION
-000182|PLC|FAULT|[COD 182] - 181 TOOL CHANGE 2 PROGRAM NOT CALLD
-000183|PLC|FAULT|[COD 183] - 489 COUPLING 2 FAILURE
-000184|PLC|FAULT|[COD 184] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER A
-000185|PLC|FAULT|[COD 185] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER B
-000186|PLC|FAULT|[COD 186] - 228 THERMAL RELAY TOOL COOLANT PUMP 2
-000187|PLC|FAULT|[COD 187] - 487 SPINDLE 2 JOINT INSUFFICIENT WATER
-000188|PLC|FAULT|[COD 188] - 488 INSUFFICIENT TOOL 2 COOLING
-000189|PLC|FAULT|[COD 189] - 493 A+ AXIS ONLY ENABLED TO MOVEMENT
-000190|PLC|FAULT|[COD 190] - 490 TOOLS POSITION CHECK 2
-000191|PLC|FAULT|[COD 191] - 432 TOOL 2 NOT UNCLAMPED
-000192|PLC|FAULT|[COD 192] - 450 TOOL 2 NOT LOCKED
-000193|PLC|FAULT|[COD 193] - 407 OVER EXTRA-STROKE A AXIS
-000194|PLC|FAULT|[COD 194] - 407 OVER EXTRA-STROKE B AXIS
-000195|PLC|FAULT|[COD 195] - 818 DOORS OPENED WITH SLAB ON MANIPULATOR
-000196|PLC|FAULT|[COD 196] - 514 PROTEZIONE MAGAZZINO 3 NON IN POSIZIONE
-000197|PLC|FAULT|[COD 197] - 545 UTENSILE ERRATO PER APERTURA MANIPOLATORE
-000198|PLC|FAULT|[COD 198] - 545 ROTATION WITHOUT WATER NOT ALLOWED
-000199|PLC|FAULT|[COD 199] - 561 LASER NOT IN POSITION
-000200|PLC|FAULT|[COD 200] - --- VENTOSA SINCR. 1 NON OK
-000201|PLC|FAULT|[COD 201] - --- VENTOSA SINCR. 2 NON OK
-000202|PLC|FAULT|[COD 202] - --- VENTOSA SINCR. 3 NON OK
-000203|PLC|FAULT|[COD 203] - --- VENTOSA SINCR. 4 NON OK
-000204|PLC|FAULT|[COD 204] - --- VENTOSA SINCR. 5 NON OK
-000205|PLC|FAULT|[COD 205] - --- VENTOSA SINCR. 6 NON OK
-000206|PLC|FAULT|[COD 206] - --- VENTOSA SINCR. 7 NON OK
-000207|PLC|FAULT|[COD 207] - --- VENTOSA SINCR. 8 NON OK
-000208|PLC|FAULT|[COD 208] - --- VENTOSA SINCR. 9 NON OK
-000209|PLC|FAULT|[COD 209] - --- VENTOSA SINCR. 10 NON OK
-000210|PLC|FAULT|[COD 210] - --- VENTOSA SINCR. 11 NON OK
-000211|PLC|FAULT|[COD 211] - --- VENTOSA SINCR. 12 NON OK
-000212|PLC|FAULT|[COD 212] - --- VENTOSA SINCR. 13 NON OK
-000213|PLC|FAULT|[COD 213] - --- VENTOSA SINCR. 14 NON OK
-000214|PLC|FAULT|[COD 214] - --- VENTOSA SINCR. 15 NON OK
-000215|PLC|FAULT|[COD 215] - --- VENTOSA SINCR. 16 NON OK
-000216|PLC|FAULT|[COD 216] - --- VENTOSA SINCR. 17 NON OK
-000217|PLC|FAULT|[COD 217] - --- VENTOSA SINCR. 18 NON OK
-000218|PLC|FAULT|[COD 218] - --- VENTOSA SINCR. 19 NON OK
-000219|PLC|FAULT|[COD 219] - --- VENTOSA SINCR. 20 NON OK
-000220|PLC|FAULT|[COD 220] - --- VENTOSA SINCR. 21 NON OK
-000221|PLC|FAULT|[COD 221] - --- VENTOSA SINCR. 22 NON OK
-000222|PLC|FAULT|[COD 222] - --- VENTOSA SINCR. 23 NON OK
-000223|PLC|FAULT|[COD 223] - --- VENTOSA SINCR. 24 NON OK
-000224|PLC|FAULT|[COD 224] - 534 VENTOSE IN MOVIMENTO
-000225|PLC|FAULT|[COD 225] - 503 PULIZIA CONI IN CORSO
-000226|PLC|FAULT|[COD 226] - 177 MODULO FRENATURA AZIONAMENTO ASSE U NON OK
-000227|PLC|FAULT|[COD 227] - 488 RECYCLED WATER NOT OK
-000228|PLC|FAULT|[COD 228] - 443 RAFFREDDAMENTO POMPA VUOTO 2 NON OK
-000229|PLC|FAULT|[COD 229] - 538 ROTARY TABLE NOT IN POSITION
-000230|PLC|FAULT|[COD 230] - 346 PARATIA NON IN POSIZIONE
-000231|PLC|FAULT|[COD 231] - 595 SAFETY BARRIERS
-000232|PLC|FAULT|[COD 232] - 666 SETTING FEED ERROR
-000233|PLC|FAULT|[COD 233] - 805 SAFETY DOOR LOCK ERROR
-000234|PLC|FAULT|[COD 234] - 666 AXES FEED OUT OF RANGE
-000235|PLC|FAULT|[COD 235] - 124 INCORRECT VECTRON DATASET CONFIGURATION FILE
-000236|PLC|FAULT|[COD 236] - 442 BLADE CRIB 1 NOT IN POSITION
-000237|PLC|FAULT|[COD 237] - 442 BLADE CRIB 2 NOT IN POSITION
-000238|PLC|FAULT|[COD 238] - 125 VECTRON PARAMETERS WRITING IN PROGRESS
-000239|PLC|FAULT|[COD 239] - 546 Z AXIS NOT IN POSITION
-000240|PLC|FAULT|[COD 240] - 285 THERMAL RELAY LOAD ROLLER HYDRAULIC PUMP MOTOR
-000241|PLC|FAULT|[COD 241] - --- AUTOMATIC ZEROING HEIDENAHIN NOT OK
-000242|PLC|FAULT|[COD 242] - --- HEIDENAHIN ACTIVATION NOT ALLOWED WITH TOOL
-000243|PLC|FAULT|[COD 243] - 561 HEIDENAHIN NOT IN POSITION
-000244|PLC|FAULT|[COD 244] - 442 BLADE CRIB NOT IN POSITION
-000245|PLC|FAULT|[COD 245] - 533 COLLET NOT IN POSITION
-000246|PLC|FAULT|[COD 246] - 199 SPINDLE 1 NOT IN POSITION
-000247|PLC|FAULT|[COD 247] - 124 INCORRECT TRANSPORTS CONFIGURATION FILE
-000248|PLC|FAULT|[COD 248] - 556 INTERRUPTED LOAD/UNLOAD CYCLE
-000249|PLC|FAULT|[COD 249] - 553 LOADING/UNLOADING CYCLE BLOCKED
-000250|PLC|FAULT|[COD 250] - 575 PIECE IN LOADING/UNLOADING PHASE
-000251|PLC|FAULT|[COD 251] - 548 ROLLER LOADER NOT IN POSITION
-000252|PLC|FAULT|[COD 252] - 576 PIECE-LOADER EMPTY
-000253|PLC|FAULT|[COD 253] - 135 CONVERTER UNLOAD BELT NOT READY
-000254|PLC|FAULT|[COD 254] - 135 CONVERTER MACHINE BELT NOT READY
-000255|PLC|FAULT|[COD 255] - 135 CONVERTER LOAD BELT NOT READY
-000256|PLC|FAULT|[COD 256] - 135 CONVERTER UNLOAD ROLLER NOT READY
-000257|PLC|FAULT|[COD 257] - 135 CONVERTER MACHINE ROLLER NOT READY
-000258|PLC|FAULT|[COD 258] - 135 CONVERTER LOAD ROLLER NOT READY
-000259|PLC|FAULT|[COD 259] - 549 SAFETY UNLOAD BELT
-000260|PLC|FAULT|[COD 260] - 549 SAFETY MACHINE BELT
-000261|PLC|FAULT|[COD 261] - 549 SAFETY LOAD BELT
-000262|PLC|FAULT|[COD 262] - 549 SAFETY UNLOAD ROLLER
-000263|PLC|FAULT|[COD 263] - 549 SAFETY MACHINE ROLLER
-000264|PLC|FAULT|[COD 264] - 549 SAFETY LOAD ROLLER
-000265|PLC|FAULT|[COD 265] - 599 MANUAL MOVEMENT UNLOAD BELT NOT ALLOWED
-000266|PLC|FAULT|[COD 266] - 599 MANUAL MOVEMENT MACHINE BELT NOT ALLOWED
-000267|PLC|FAULT|[COD 267] - 599 MANUAL MOVEMENT LOAD BELT NOT ALLOWED
-000268|PLC|FAULT|[COD 268] - 599 MANUAL MOVEMENT UNLOAD ROLLER NOT ALLOWED
-000269|PLC|FAULT|[COD 269] - 599 MANUAL MOVEMENT MACHINE ROLLER NOT ALLOWED
-000270|PLC|FAULT|[COD 270] - 599 MANUAL MOVEMENT LOAD ROLLER NOT ALLOWED
-000271|PLC|FAULT|[COD 271] - 125 UNLOAD BELT PARAMETERS ERROR
-000272|PLC|FAULT|[COD 272] - 125 MACHINE BELT PARAMETERS ERROR
-000273|PLC|FAULT|[COD 273] - 125 LOAD BELT PARAMETERS ERROR
-000274|PLC|FAULT|[COD 274] - 125 UNLOAD ROLLER PARAMETERS ERROR
-000275|PLC|FAULT|[COD 275] - 125 MACHINE ROLLER PARAMETERS ERROR
-000276|PLC|FAULT|[COD 276] - 125 LOAD ROLLER PARAMETERS ERROR
-000277|PLC|FAULT|[COD 277] - 285 THERMAL RELAY MACHINE ROLLER MOTOR
-000278|PLC|FAULT|[COD 278] - 285 THERMAL RELAY UNLOAD ROLLER MOTOR
-000279|PLC|FAULT|[COD 279] - 285 THERMAL RELAY LOAD BELT MOTOR
-000280|PLC|FAULT|[COD 280] - 285 THERMAL RELAY MACHINE BELT MOTOR
-000281|PLC|FAULT|[COD 281] - 285 THERMAL RELAY UNLOAD BELT MOTOR
-000282|PLC|FAULT|[COD 282] - 125 SAVING FGE POINTS
-000283|PLC|FAULT|[COD 283] - 287 PROTEZIONE TERMICA IMPIANTO CERIO
-000284|PLC|FAULT|[COD 284] - 659 ACCENSIONE PROLUNGATA POMPA CERIO
-000285|PLC|FAULT|[COD 285] - 705 AMP SETTINGS FOR N.T.S. ERROR
-000286|PLC|FAULT|[COD 286] - 779 NTS IN LOW POSITION
-000287|PLC|FAULT|[COD 287] - 779 NTS NOT IN POSITION
-000288|PLC|FAULT|[COD 288] - 599 Q MOVEMENT NOT ALLOWED
-000289|PLC|FAULT|[COD 289] - 493 Q+ AXIS ONLY ENABLED TO MOVEMENT
-000290|PLC|FAULT|[COD 290] - 493 Q- AXIS ONLY ENABLED TO MOVEMENT
-000291|PLC|FAULT|[COD 291] - 250 SHAPES DETECTOR ON SPINDLE
-000292|PLC|FAULT|[COD 292] - 250 PULIZIA PIANO IN CORSO
-000293|PLC|FAULT|[COD 293] - 124 ERRORE FILE CONFIGURAZINE SICU-CU
-000294|PLC|FAULT|[COD 294] - 442 TOOL CRIB 2 NOT IN POSITION
-000295|PLC|FAULT|[COD 295] - 514 TOOL CRIB 2 PROTECTION NOT IN POSITION
-000296|PLC|FAULT|[COD 296] - 545 AXES NOT IN PROBING POSITION
-000297|PLC|FAULT|[COD 297] - 251 PROBE CYCLE INTERRUPTED
-000298|PLC|FAULT|[COD 298] - 251 PRESETTING LASER CYCLE INTERRUPTED
-000299|PLC|FAULT|[COD 299] - 495 SINGLE AXIS ZEROING NOT ENABLE
-000300|PLC|FAULT|[COD 300] - 285 RELAIS THERMIQUE ROULEAUX MACHINE
-000301|PLC|FAULT|[COD 301] - 438 SPINDLE OFF WITH PROBE ACTIVATED
-000302|PLC|FAULT|[COD 302] - 538 TABLE NOT POSITIONED
-000303|PLC|FAULT|[COD 303] - 294 SUCTION CUPS NOT IN POSITION
-000304|PLC|FAULT|[COD 304] - 547 COLLISION MANIPULATOR AND PROBE
-000305|PLC|FAULT|[COD 305] - 197 REMOVE PARTS FROM MANIPULATOR
-000306|PLC|FAULT|[COD 306] - 545 AXES NOT IN POSITION TO OPEN MANIPULATOR
-000307|PLC|FAULT|[COD 307] - 538 AXIS MOVEMENT NOT ALLOWED WITH MANIPULATOR OPEN
-000308|PLC|FAULT|[COD 308] - 305 MANIPLATOR VACUUM CLAMPS NOT OK
-000309|PLC|FAULT|[COD 309] - 197 PART NOT LOCKED BY MANIPULATOR
-000310|PLC|FAULT|[COD 310] - 785 CONSENSO APERTURA PORTE NEGATO
-000311|PLC|FAULT|[COD 311] - 482 PIECE CLEANING WATER NOT OK
-000312|PLC|FAULT|[COD 312] - 488 INSUFFICIENT TOOL DRILL COOLING
-000313|PLC|FAULT|[COD 313] - 482 MANIPULATOR WATER NOT OK
-000314|PLC|FAULT|[COD 314] - 146 FIELDBUS KO (375)
-000315|PLC|FAULT|[COD 315] - 250 CICLO RAVVIVA FORETTI IN CORSO
-000316|PLC|FAULT|[COD 316] - 250 CICLO RAVVIVA MOLE IN CORSO
-000317|PLC|FAULT|[COD 317] - 407 OVER EXTRA-STROKE X AXIS
-000318|PLC|FAULT|[COD 318] - 407 OVER EXTRA-STROKE Y AXIS
-000319|PLC|FAULT|[COD 319] - 407 OVER EXTRA-STROKE Z AXIS
-000320|PLC|FAULT|[COD 320] - 407 OVER EXTRA-STROKE V AXIS
-000321|PLC|FAULT|[COD 321] - 148 AXES PRE-ALERTED
-000322|PLC|FAULT|[COD 322] - 147 AXES ALERTED
-000323|PLC|FAULT|[COD 323] - 149 Z AXIS PRE-ALERTED
-000324|PLC|FAULT|[COD 324] - 149 W AXIS PRE-ALERTED
-000325|PLC|FAULT|[COD 325] - 747 LAYING THE TOOL DOWN TO THE FLOOR (START)
-000326|PLC|FAULT|[COD 326] - 748 TAKE UP TOOL FROM THE FLOOR (START)
-000327|PLC|FAULT|[COD 327] - 151 DRIVING GEARS NOT POWERED
-000328|PLC|FAULT|[COD 328] - 150 SERVO DRIVES NOT ENABLED
-000329|PLC|FAULT|[COD 329] - 656 CLUTCH LOCKED
-000330|PLC|FAULT|[COD 330] - 655 CLUTCH NOT LOCKED
-000331|PLC|FAULT|[COD 331] - 404 Z-AXIS BALANCING INSUFFICIENT
-000332|PLC|FAULT|[COD 332] - 464 TOOL LIFE EXHAUSTED
-000333|PLC|FAULT|[COD 333] - 484 MACHINE STOPPED
-000334|PLC|FAULT|[COD 334] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER X
-000335|PLC|FAULT|[COD 335] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER Y
-000336|PLC|FAULT|[COD 336] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER Z
-000337|PLC|FAULT|[COD 337] - 305 VACUUM CLAMPING INEFFICIENT
-000338|PLC|FAULT|[COD 338] - 177 SERVO-DRIVE BRAKING MODULE OUT OF ORDER V
-000339|PLC|FAULT|[COD 339] - 593 SAFETY GUARDS
-000340|PLC|FAULT|[COD 340] - 594 CHECK DOORS SECURITY
-000341|PLC|FAULT|[COD 341] - 584 OPENING DOORS REQUEST
-000342|PLC|FAULT|[COD 342] - 487 SPINDLE JOINT INSUFFICIENT WATER
-000343|PLC|FAULT|[COD 343] - 488 INSUFFICIENT TOOL COOLING
-000344|PLC|FAULT|[COD 344] - 594 FRONT DOORS NOT LOCKED
-000345|PLC|FAULT|[COD 345] - 594 BACK DOORS NOT LOCKED
-000346|PLC|FAULT|[COD 346] - 584 LATERAL DOOR NOT LOCKED
-000347|PLC|FAULT|[COD 347] - 124 INCORRECT PLC CONFIGURATION FILE
-000348|PLC|FAULT|[COD 348] - 124 INCORRECT I/O FILE
-000349|PLC|FAULT|[COD 349] - AXES AMP PARAMETER OVERWRITE
-000350|PLC|FAULT|[COD 350] - ERROR DURING BOOT
-000351|PLC|FAULT|[COD 351] - 124 INCORRECT CONFIG.COLLISIONI FILE
-000352|PLC|FAULT|[COD 352] - 124 INCORRECT CONFIG.COMPENSAZIONE FILE
-000353|PLC|FAULT|[COD 353] - 124 INCORRECT CONFIG.MACCHINA FILE
-000354|PLC|FAULT|[COD 354] - 489 COUPLING FAILURE
-000355|PLC|FAULT|[COD 355] - 146 BUS ETHERCAT NOT OK
-000356|PLC|FAULT|[COD 356] - 145 AXIS BOARDS NOT READY
-000357|PLC|FAULT|[COD 357] - 583 MACHINE OFF
-000358|PLC|FAULT|[COD 358] - 443 VACUUM PUMP COOLING SYSTEM MALFUNCTION
-000359|PLC|FAULT|[COD 359] - 406 EMERGENCY PUSH-BUTTON
-000360|PLC|FAULT|[COD 360] - 583 E-STOP CONTACT OPEN
-000361|PLC|FAULT|[COD 361] - 667 SAFETY CIRCUIT FAILURE
-000362|PLC|FAULT|[COD 362] - 666 SAFETY DEVICE FAILURE
-000363|PLC|FAULT|[COD 363] - 127 OVERRIDE AT ZERO
-000364|PLC|FAULT|[COD 364] - 305 VACUUM CLAMPING 2 INEFFICIENT
-000365|PLC|FAULT|[COD 365] - 127 RAPID OVERRIDE AT ZERO
-000366|PLC|FAULT|[COD 366] - 406 POWER OFF BUTTON PUSHED
-000367|PLC|FAULT|[COD 367] - 577 TABLE IN MOTION
-000368|PLC|FAULT|[COD 368] - 590 FRONT DOORS NOT CLOSED
-000369|PLC|FAULT|[COD 369] - 590 BACK DOORS NOT CLOSED
-000370|PLC|FAULT|[COD 370] - 230 THERMAL RELAY VACUUM PUMP 1
-000371|PLC|FAULT|[COD 371] - 230 THERMAL RELAY VACUUM PUMP 2
-000372|PLC|FAULT|[COD 372] - 229 THERMAL RELAY HYDRAULIC PUMP
-000373|PLC|FAULT|[COD 373] - 641 TABLE CHANGE INTERRUPTED
-000374|PLC|FAULT|[COD 374] - 534 TABLE LOCKING PIN NOT UP
-000375|PLC|FAULT|[COD 375] - 534 TABLE LOCKING PIN NOT DOWN
-000376|PLC|FAULT|[COD 376] - 403 OVERHEATING ELECTRICAL BOX
-000377|PLC|FAULT|[COD 377] - 260 AUTOMATIC ADJUSTMENT OF FEED OVERRIDE IN PROGRESS
-000378|PLC|FAULT|[COD 378] - 305 VACUUM CLAMPING 1 INEFFICIENT
-000379|PLC|FAULT|[COD 379] - 611 TOOL CHANGE MOTOR NON IN POSITION
-000380|PLC|FAULT|[COD 380] - 459 B AXIS LOCKED
-000381|PLC|FAULT|[COD 381] - 458 B AXIS UNLOCKED
-000382|PLC|FAULT|[COD 382] - 459 C AXIS LOCKED
-000383|PLC|FAULT|[COD 383] - 458 C AXIS UNLOCKED
-000384|PLC|FAULT|[COD 384] - 305 VACUUM CLAMPING INC. PLANE 1 INEFFICIENT
-000385|PLC|FAULT|[COD 385] - 305 VACUUM CLAMPING INC. PLANE 2 INEFFICIENT
-000386|PLC|FAULT|[COD 386] - 229 THERMAL RELAY RECYCLE WATER PUMP
-000387|PLC|FAULT|[COD 387] - 228 THERMAL RELAY TOOL COOLANT PUMP
-000388|PLC|FAULT|[COD 388] - 590 CABIN DOOR NOT CLOSED
-000389|PLC|FAULT|[COD 389] - 179 TOOL CHANGE MOTOR NOT POWERED/ENABLED
-000390|PLC|FAULT|[COD 390] - 300 RIGHT PRESSURE CLAMPING INEFFICIENT
-000391|PLC|FAULT|[COD 391] - 300 LEFT PRESSURE CLAMPING INEFFICIENT
-000392|PLC|FAULT|[COD 392] - 360 REFERENCE CYLINDERS 1 NOT IN POSITION
-000393|PLC|FAULT|[COD 393] - 360 REFERENCE CYLINDERS 2 NOT IN POSITION
-000394|PLC|FAULT|[COD 394] - 124 INCORRECT CONFIG.MOTORI CANBUS
-000395|PLC|FAULT|[COD 395] - 135 TOOL CHANGE CONVERTER BLOCKED
-000396|PLC|FAULT|[COD 396] - 135 TOOL CHANGE CONVERTER ON WARNIG
-000397|PLC|FAULT|[COD 397] - 530 EXTERNAL MACHINE PANEL ENABLED
-000398|PLC|FAULT|[COD 398] - 412 AXIS AUTOMATIC ZEROING UNDER WAY
-000399|PLC|FAULT|[COD 399] - 442 TOOL CRIB 1 NOT IN POSITION
-000400|PLC|FAULT|[COD 400] - 514 TOOL CRIB 1 PROTECTION NOT IN POSITION
-000401|PLC|FAULT|[COD 401] - 495 AXIS ZEROING WITH TOOL IN ELECTROSPINDLE
-000402|PLC|FAULT|[COD 402] - 606 PART-PROGRAM NOT FOUND (PC)
-000403|PLC|FAULT|[COD 403] - 163 CONVERTER BRAKE OUT OF ORDER
-000404|PLC|FAULT|[COD 404] - 603 PRESS START CYCLE
-000405|PLC|FAULT|[COD 405] - 001 TOOLTABLES CHECKED? PRESS SOFTKEY «YES»
-000406|PLC|FAULT|[COD 406] - 002 ARE YOU SURE? PRESS SOFTKEY «YES»
-000407|PLC|FAULT|[COD 407] - 606 PART-PROGRAM NOT FOUND
-000408|PLC|FAULT|[COD 408] - 135 CONVERTER BLOCKED
-000409|PLC|FAULT|[COD 409] - 106 STOP FROM EXTERNAL PUSH-BUTTON PANEL
-000410|PLC|FAULT|[COD 410] - 105 MACHINE IN HOLD STATUS
-000411|PLC|FAULT|[COD 411] - 168 CONVERTER DISABLED
-000412|PLC|FAULT|[COD 412] - 700 TABLES UNDER MODIFICATION
-000413|PLC|FAULT|[COD 413] - 161 VECTRON COMMUNICATION ERROR
-000414|PLC|FAULT|[COD 414] - 162 VECTRON FATAL ERROR: STOP THE MACHINE
-000415|PLC|FAULT|[COD 415] - 176 FAULTY SPINDLE POWER SUPPLY
-000416|PLC|FAULT|[COD 416] - 125 WEAR CONSTANT OUT OF RANGE
-000417|PLC|FAULT|[COD 417] - 125 WRONG PARAMETER READING
-000418|PLC|FAULT|[COD 418] - 125 PRESSURE RANGE NOT CORRECT
-000419|PLC|FAULT|[COD 419] - 106 STOP FROM EXTERNAL PUSH-BUTTON CONTROL PANEL
-000420|PLC|FAULT|[COD 420] - 125 COMPENSATION VERSOR ERROR
-000421|PLC|FAULT|[COD 421] - 245 THERMAL CUT-OUT TOOL CRIB PROTECTION
-000422|PLC|FAULT|[COD 422] - 741 TOOL CHANGE CODE PROCESS NOT SELECTED
-000423|PLC|FAULT|[COD 423] - 390 T FUNCTION NOT PERMITTED
-000424|PLC|FAULT|[COD 424] - 804 MOVE FEED/RAPID OVERRIDE
-000425|PLC|FAULT|[COD 425] - 661 UNLOAD THE TOOL AND LOAD IT IN HIS POSITION ON THE TOOL CRIB
-000426|PLC|FAULT|[COD 426] - 657 PLATFORM BALANCE HEAD NOT IN POSITION
-000427|PLC|FAULT|[COD 427] - 741 HEADS 1 NOT SELECTED
-000428|PLC|FAULT|[COD 428] - 488 RAFFREDDAMENTO DISCO INFERIORE
-000429|PLC|FAULT|[COD 429] - 294 DISCO TAGLIO INFERIORE NON IN POSIZIONE
-000430|PLC|FAULT|[COD 430] - 181 TOOL CHANGE PROGRAM NOT CALLED
-000431|PLC|FAULT|[COD 431] - 546 Z AXIS NOT IN ZERO POSITION
-000432|PLC|FAULT|[COD 432] - 545 B AXIS NOT IN POSITION
-000433|PLC|FAULT|[COD 433] - 689 TOOLMANAGER WARNING
-000434|PLC|FAULT|[COD 434] - 689 TOOLMANAGER WARNING
-000435|PLC|FAULT|[COD 435] - 250 PRESETTING LASER ENABLED
-000436|PLC|FAULT|[COD 436] - 817 HEADS SELECTION ERROR
-000437|PLC|FAULT|[COD 437] - 517 INCORRECT VALUE FROM TABLE
-000438|PLC|FAULT|[COD 438] - 390 M07 FUNCTION NOT PERMITTED
-000439|PLC|FAULT|[COD 439] - 411 AXES WITHOUT ZERO POINTS (M97-HOME)
-000440|PLC|FAULT|[COD 440] - 390 T FUNCTION NOT PERMITTED
-000441|PLC|FAULT|[COD 441] - 399 GREASE TANK EMPTY
-000442|PLC|FAULT|[COD 442] - 400 LUBRICATION INEFFICIENT
-000443|PLC|FAULT|[COD 443] - 152 DRIVING GEARS NOT READY
-000444|PLC|FAULT|[COD 444] - 530 SETTING MODE ENABLED
-000445|PLC|FAULT|[COD 445] - 398 INSUFFICIENT AIR PRESSURE
-000446|PLC|FAULT|[COD 446] - 528 “PROGRAM TEST” MODE ACTIVE
-000447|PLC|FAULT|[COD 447] - 125 FLOATING WRONG PARAMETER
-000448|PLC|FAULT|[COD 448] - 561 PROBE NOT IN POSITION
-000449|PLC|FAULT|[COD 449] - 100 CONVERTER OFF
-000450|PLC|FAULT|[COD 450] - 520 STALL MODE FUNCTION ACTIVE
-000451|PLC|FAULT|[COD 451] - 120 RANGE ACTIVATION NOT OK
-000452|PLC|FAULT|[COD 452] - 135 CONVERTER IN FAULT
-000453|PLC|FAULT|[COD 453] - 135 CONVERTER IN WARNING
-000454|PLC|FAULT|[COD 454] - 235 SPINDLE THERMAL PROTECTION
-000455|PLC|FAULT|[COD 455] - 522 SPINDLE R.P.M. TOO HIGH
-000456|PLC|FAULT|[COD 456] - 115 SPINDLE SPEED CONTROL
-000457|PLC|FAULT|[COD 457] - 498 MAXIMAL CHARGE ON THE SPINDLE
-000458|PLC|FAULT|[COD 458] - 441 SPINDLE COOLING SYSTEM MALFUNCTION
-000459|PLC|FAULT|[COD 459] - 672 COOLANT CIRCUIT OUT OF ORDER
-000460|PLC|FAULT|[COD 460] - 490 TOOLS POSITION CHECK
-000461|PLC|FAULT|[COD 461] - 666 SPINDLE SAFETY DEVICE FAILURE
-000462|PLC|FAULT|[COD 462] - --- TURNING OFF ---
-000463|PLC|FAULT|[COD 463] - 450 TOOL NOT LOCKED
-000464|PLC|FAULT|[COD 464] - 432 TOOL NOT UNCLAMPED
-000465|PLC|FAULT|[COD 465] - 503 TOOL-CHANGE IN EXECUTION
-000466|PLC|FAULT|[COD 466] - 504 TOOL-CHANGE INTERRUPTED
-000467|PLC|FAULT|[COD 467] - 493 Z+ AXIS ONLY ENABLED TO MOVEMENT
-000468|PLC|FAULT|[COD 468] - 493 Z- AXIS ONLY ENABLED TO MOVEMENT
-000469|PLC|FAULT|[COD 469] - 493 Y+ AXIS ONLY ENABLED TO MOVEMENT
-000470|PLC|FAULT|[COD 470] - 493 Y- AXIS ONLY ENABLED TO MOVEMENT
-000471|PLC|FAULT|[COD 471] - 493 X+ AXIS ONLY ENABLED TO MOVEMENT
-000472|PLC|FAULT|[COD 472] - 493 X- AXIS ONLY ENABLED TO MOVEMENT
-000473|PLC|FAULT|[COD 473] - 493 C+ AXIS ONLY ENABLED TO MOVEMENT
-000474|PLC|FAULT|[COD 474] - 493 C- AXIS ONLY ENABLED TO MOVEMENT
-000475|PLC|FAULT|[COD 475] - 493 B+ AXIS ONLY ENABLED TO MOVEMENT
-000476|PLC|FAULT|[COD 476] - 493 B- AXIS ONLY ENABLED TO MOVEMENT
-000477|PLC|FAULT|[COD 477] - 484 MACHINE STOPPED BY LUBRICATION INEFFICIENT
-000478|PLC|FAULT|[COD 478] - 654 VERIFY AXES COLLISION
-000479|PLC|FAULT|[COD 479] - --- SAFETY COLLISION FUNCTION OFF ---
-000480|PLC|FAULT|[COD 480] - 573 POSITIVE OVERSTROKE FLOATING AXIS
-000481|PLC|FAULT|[COD 481] - 573 NEGATIVE OVERSTROKE FLOATING AXIS
-000482|PLC|FAULT|[COD 482] - 538 TABLE MOVEMENT NOT ALLOWED
-000483|PLC|FAULT|[COD 483] - 538 TABLE RELEASE NOT ALLOWED
-000484|PLC|FAULT|[COD 484] - 235 SONDA TERMICA MANDRINO 2
-000485|PLC|FAULT|[COD 485] - 522 GIRI TROPPO ELEVATI MANDRINO 2
-000486|PLC|FAULT|[COD 486] - 115 CONTROLLO VELOCITÀ MANDRINO 2
-000487|PLC|FAULT|[COD 487] - 498 CARICO MASSIMO SUL MANDRINO 2
-000488|PLC|FAULT|[COD 488] - 176 MANDRINO 2 NON INIZIALIZZATO
-000489|PLC|FAULT|[COD 489] - 741 UNITÀ OPERATRICE 2: MANDRINO NON SELEZIONATO O IN CAMBIO UTENSIL
-000490|PLC|FAULT|[COD 490] - 538 AXES MOVEMENT NOT ENABLED-PROBE IN POSITION
-000491|PLC|FAULT|[COD 491] - 595 SAFETY LOAD BARRIERS
-000492|PLC|FAULT|[COD 492] - 595 SAFETY UNLOAD BARRIERS
-000493|PLC|FAULT|[COD 493] - 550 CHECK POPUP MODULE
-000494|PLC|FAULT|[COD 494] - 550 ASCENT POPUP MODULE NOT ALLOWE
-000495|PLC|FAULT|[COD 495] - 550 POPUP MODULE UP
-000496|PLC|FAULT|[COD 496] - 552 CHECK INPUT BULKHEAD
-000497|PLC|FAULT|[COD 497] - 552 CHECK OUTPUT BULKHEAD
-000498|PLC|FAULT|[COD 498] - 551 WAITING INPUT BULKHEAD OPEN
-000499|PLC|FAULT|[COD 499] - 551 WAITING INPUT BULKHEAD CLOSE
-000500|PLC|FAULT|[COD 500] - 551 WAITING OUTPUT BULKHEAD OPEN
-000501|PLC|FAULT|[COD 501] - 551 WAITING OUTPUT BULKHEAD CLOSE
-000502|PLC|FAULT|[COD 502] - 550 WAITING POPUP IN POSITION
\ No newline at end of file
+000001|PLC|FAULT|[COD 001000] - 334 ERRORE COMUNICAZIONE PROFIBUS
+000002|PLC|FAULT|[COD 001001] - 700 TABELLE IN MODIFICA
+000003|PLC|FAULT|[COD 001002] - 404 BILANCIAMENTO ASSE Z INSUFFICIENTE
+000004|PLC|FAULT|[COD 001003] - 403 SURRISCALDAMENTO ARMADIO ELETTRICO
+000005|PLC|FAULT|[COD 001004] - 173 CAMBIARE LA BATTERIA
+000006|PLC|FAULT|[COD 001005] - 407 UNO O PIU ASSI IN EXTRA CORSA
+000007|PLC|FAULT|[COD 001006] - 406 PULSANTI DI EMERGENZA
+000008|PLC|FAULT|[COD 001007] - ...
+000009|PLC|FAULT|[COD 001008] - 583 MACCHINA SPENTA
+000010|PLC|FAULT|[COD 001009] - 782 RICHIESTA ESECUZIONE TEST DI SICUREZZA
+000011|PLC|FAULT|[COD 001010] - 783 INCONSISTENZA SEGNALI DUALCHEK (PARATIA)
+000012|PLC|FAULT|[COD 001011] - 784 SOVRACORRENTE MODULI I/O LINK
+000013|PLC|FAULT|[COD 001012] - 667 CIRCUITO DI SICUREZZA GUASTO
+000014|PLC|FAULT|[COD 001013] - 404 BILANCIAMENTO ASSE W INSUFFICIENTE
+000015|PLC|FAULT|[COD 001014] - 584 PORTA DI SICUREZZA AUSILIARIA 1 NON CHIUSA
+000016|PLC|FAULT|[COD 001015] - 584 PORTA DI SICUREZZA AUSILIARIA 2 NON CHIUSA
+000017|PLC|FAULT|[COD 001016] - 001 HAI VERIFICATO TABELLE UTENSILI ? PREMERE SOFTKEY SI
+000018|PLC|FAULT|[COD 001017] - 002 SEI SICURO ? PREMERE SOFTKEY SI
+000019|PLC|FAULT|[COD 001018] - 666 MODULO CONTROLLO MANDRINO FERMO NON OK
+000020|PLC|FAULT|[COD 001019] - 666 DISPOSITIVO DI SICUREZZA GUASTO
+000021|PLC|FAULT|[COD 001020] - 689 STATUS UTENSILE NON OK
+000022|PLC|FAULT|[COD 001021] - 688 ERRORE TOOLTABLE - SINCRONISMO DATI
+000023|PLC|FAULT|[COD 001022] - 688 ERRORE TOOLTABLE - UTENSILE NON TROVATO
+000024|PLC|FAULT|[COD 001023] - 688 ERRORE TOOLTABLE - PASTIGLIA NON TROVATA
+000025|PLC|FAULT|[COD 001024] - 688 ERRORE TOOLTABLE - FAMIGLIA NON TROVATA
+000026|PLC|FAULT|[COD 001025] - 688 ERRORE TOOLTABLE - MAGAZZINO/POSTO NON TROVATO
+000027|PLC|FAULT|[COD 001026] - 688 ERRORE TOOLTABLE - VITA UT. ESAURITA PER FAMIGLIA
+000028|PLC|FAULT|[COD 001027] - 688 ERRORE TOOLTABLE - POSTO MAGAZZINO NON TROVATO
+000029|PLC|FAULT|[COD 001028] - ...
+000030|PLC|FAULT|[COD 001029] - ...
+000031|PLC|FAULT|[COD 001030] - ...
+000032|PLC|FAULT|[COD 001031] - 146 FIELDBUS KO (375)
+000033|PLC|FAULT|[COD 001032] -
+000034|PLC|FAULT|[COD 001033] -
+000035|PLC|FAULT|[COD 001034] -
+000036|PLC|FAULT|[COD 001035] -
+000037|PLC|FAULT|[COD 001036] -
+000038|PLC|FAULT|[COD 001037] -
+000039|PLC|FAULT|[COD 001038] -
+000040|PLC|FAULT|[COD 001039] -
+000041|PLC|FAULT|[COD 001040] -
+000042|PLC|FAULT|[COD 001041] -
+000043|PLC|FAULT|[COD 001042] -
+000044|PLC|FAULT|[COD 001043] -
+000045|PLC|FAULT|[COD 001044] -
+000046|PLC|FAULT|[COD 001045] -
+000047|PLC|FAULT|[COD 001046] -
+000048|PLC|FAULT|[COD 001047] -
+000049|PLC|FAULT|[COD 001048] -
+000050|PLC|FAULT|[COD 001049] -
+000051|PLC|FAULT|[COD 001050] -
+000052|PLC|FAULT|[COD 001051] -
+000053|PLC|FAULT|[COD 001052] -
+000054|PLC|FAULT|[COD 001053] -
+000055|PLC|FAULT|[COD 001054] -
+000056|PLC|FAULT|[COD 001055] -
+000057|PLC|FAULT|[COD 001056] -
+000058|PLC|FAULT|[COD 001057] -
+000059|PLC|FAULT|[COD 001058] -
+000060|PLC|FAULT|[COD 001059] -
+000061|PLC|FAULT|[COD 001060] -
+000062|PLC|FAULT|[COD 001061] -
+000063|PLC|FAULT|[COD 001062] -
+000064|PLC|FAULT|[COD 001063] -
+000065|PLC|FAULT|[COD 001064] -
+000066|PLC|FAULT|[COD 001065] -
+000067|PLC|FAULT|[COD 001066] -
+000068|PLC|FAULT|[COD 001067] -
+000069|PLC|FAULT|[COD 001068] -
+000070|PLC|FAULT|[COD 001069] -
+000071|PLC|FAULT|[COD 001070] -
+000072|PLC|FAULT|[COD 001071] -
+000073|PLC|FAULT|[COD 001072] -
+000074|PLC|FAULT|[COD 001073] -
+000075|PLC|FAULT|[COD 001074] -
+000076|PLC|FAULT|[COD 001075] -
+000077|PLC|FAULT|[COD 001076] -
+000078|PLC|FAULT|[COD 001077] -
+000079|PLC|FAULT|[COD 001078] -
+000080|PLC|FAULT|[COD 001079] -
+000081|PLC|FAULT|[COD 001080] -
+000082|PLC|FAULT|[COD 001081] -
+000083|PLC|FAULT|[COD 001082] -
+000084|PLC|FAULT|[COD 001083] -
+000085|PLC|FAULT|[COD 001084] -
+000086|PLC|FAULT|[COD 001085] -
+000087|PLC|FAULT|[COD 001086] -
+000088|PLC|FAULT|[COD 001087] -
+000089|PLC|FAULT|[COD 001088] -
+000090|PLC|FAULT|[COD 001089] -
+000091|PLC|FAULT|[COD 001090] -
+000092|PLC|FAULT|[COD 001091] -
+000093|PLC|FAULT|[COD 001092] -
+000094|PLC|FAULT|[COD 001093] -
+000095|PLC|FAULT|[COD 001094] -
+000096|PLC|FAULT|[COD 001095] -
+000097|PLC|FAULT|[COD 001096] -
+000098|PLC|FAULT|[COD 001097] -
+000099|PLC|FAULT|[COD 001098] -
+000100|PLC|FAULT|[COD 001099] -
+000101|PLC|FAULT|[COD 001100] -
+000102|PLC|FAULT|[COD 001101] -
+000103|PLC|FAULT|[COD 001102] -
+000104|PLC|FAULT|[COD 001103] -
+000105|PLC|FAULT|[COD 001104] -
+000106|PLC|FAULT|[COD 001105] -
+000107|PLC|FAULT|[COD 001106] -
+000108|PLC|FAULT|[COD 001107] -
+000109|PLC|FAULT|[COD 001108] -
+000110|PLC|FAULT|[COD 001109] -
+000111|PLC|FAULT|[COD 001110] -
+000112|PLC|FAULT|[COD 001111] -
+000113|PLC|FAULT|[COD 001112] -
+000114|PLC|FAULT|[COD 001113] -
+000115|PLC|FAULT|[COD 001114] -
+000116|PLC|FAULT|[COD 001115] -
+000117|PLC|FAULT|[COD 001116] -
+000118|PLC|FAULT|[COD 001117] -
+000119|PLC|FAULT|[COD 001118] -
+000120|PLC|FAULT|[COD 001119] -
+000121|PLC|FAULT|[COD 001120] -
+000122|PLC|FAULT|[COD 001121] -
+000123|PLC|FAULT|[COD 001122] -
+000124|PLC|FAULT|[COD 001123] -
+000125|PLC|FAULT|[COD 001124] -
+000126|PLC|FAULT|[COD 001125] -
+000127|PLC|FAULT|[COD 001126] -
+000128|PLC|FAULT|[COD 001127] -
+000129|PLC|FAULT|[COD 001128] -
+000130|PLC|FAULT|[COD 001129] -
+000131|PLC|FAULT|[COD 001130] -
+000132|PLC|FAULT|[COD 001131] -
+000133|PLC|FAULT|[COD 001132] -
+000134|PLC|FAULT|[COD 001133] -
+000135|PLC|FAULT|[COD 001134] -
+000136|PLC|FAULT|[COD 001135] -
+000137|PLC|FAULT|[COD 001136] -
+000138|PLC|FAULT|[COD 001137] -
+000139|PLC|FAULT|[COD 001138] -
+000140|PLC|FAULT|[COD 001139] -
+000141|PLC|FAULT|[COD 001140] -
+000142|PLC|FAULT|[COD 001141] -
+000143|PLC|FAULT|[COD 001142] -
+000144|PLC|FAULT|[COD 001143] -
+000145|PLC|FAULT|[COD 001144] -
+000146|PLC|FAULT|[COD 001145] -
+000147|PLC|FAULT|[COD 001146] -
+000148|PLC|FAULT|[COD 001147] -
+000149|PLC|FAULT|[COD 001148] -
+000150|PLC|FAULT|[COD 001149] -
+000151|PLC|FAULT|[COD 001150] -
+000152|PLC|FAULT|[COD 001151] -
+000153|PLC|FAULT|[COD 001152] -
+000154|PLC|FAULT|[COD 001153] -
+000155|PLC|FAULT|[COD 001154] -
+000156|PLC|FAULT|[COD 001155] -
+000157|PLC|FAULT|[COD 001156] -
+000158|PLC|FAULT|[COD 001157] -
+000159|PLC|FAULT|[COD 001158] -
+000160|PLC|FAULT|[COD 001159] -
+000161|PLC|FAULT|[COD 001160] -
+000162|PLC|FAULT|[COD 001161] -
+000163|PLC|FAULT|[COD 001162] -
+000164|PLC|FAULT|[COD 001163] -
+000165|PLC|FAULT|[COD 001164] -
+000166|PLC|FAULT|[COD 001165] -
+000167|PLC|FAULT|[COD 001166] -
+000168|PLC|FAULT|[COD 001167] -
+000169|PLC|FAULT|[COD 001168] -
+000170|PLC|FAULT|[COD 001169] -
+000171|PLC|FAULT|[COD 001170] -
+000172|PLC|FAULT|[COD 001171] -
+000173|PLC|FAULT|[COD 001172] -
+000174|PLC|FAULT|[COD 001173] -
+000175|PLC|FAULT|[COD 001174] -
+000176|PLC|FAULT|[COD 001175] -
+000177|PLC|FAULT|[COD 001176] -
+000178|PLC|FAULT|[COD 001177] -
+000179|PLC|FAULT|[COD 001178] -
+000180|PLC|FAULT|[COD 001179] -
+000181|PLC|FAULT|[COD 001180] -
+000182|PLC|FAULT|[COD 001181] -
+000183|PLC|FAULT|[COD 001182] -
+000184|PLC|FAULT|[COD 001183] -
+000185|PLC|FAULT|[COD 001184] -
+000186|PLC|FAULT|[COD 001185] -
+000187|PLC|FAULT|[COD 001186] -
+000188|PLC|FAULT|[COD 001187] -
+000189|PLC|FAULT|[COD 001188] -
+000190|PLC|FAULT|[COD 001189] -
+000191|PLC|FAULT|[COD 001190] -
+000192|PLC|FAULT|[COD 001191] -
+000193|PLC|FAULT|[COD 001192] -
+000194|PLC|FAULT|[COD 001193] -
+000195|PLC|FAULT|[COD 001194] -
+000196|PLC|FAULT|[COD 001195] -
+000197|PLC|FAULT|[COD 001196] -
+000198|PLC|FAULT|[COD 001197] -
+000199|PLC|FAULT|[COD 001198] -
+000200|PLC|FAULT|[COD 001199] -
+000201|PLC|FAULT|[COD 001200] -
+000202|PLC|FAULT|[COD 001201] -
+000203|PLC|FAULT|[COD 001202] -
+000204|PLC|FAULT|[COD 001203] -
+000205|PLC|FAULT|[COD 001204] -
+000206|PLC|FAULT|[COD 001205] -
+000207|PLC|FAULT|[COD 001206] -
+000208|PLC|FAULT|[COD 001207] -
+000209|PLC|FAULT|[COD 001208] -
+000210|PLC|FAULT|[COD 001209] -
+000211|PLC|FAULT|[COD 001210] -
+000212|PLC|FAULT|[COD 001211] -
+000213|PLC|FAULT|[COD 001212] -
+000214|PLC|FAULT|[COD 001213] -
+000215|PLC|FAULT|[COD 001214] -
+000216|PLC|FAULT|[COD 001215] -
+000217|PLC|FAULT|[COD 001216] -
+000218|PLC|FAULT|[COD 001217] -
+000219|PLC|FAULT|[COD 001218] -
+000220|PLC|FAULT|[COD 001219] -
+000221|PLC|FAULT|[COD 001220] -
+000222|PLC|FAULT|[COD 001221] -
+000223|PLC|FAULT|[COD 001222] -
+000224|PLC|FAULT|[COD 001223] -
+000225|PLC|FAULT|[COD 001224] -
+000226|PLC|FAULT|[COD 001225] -
+000227|PLC|FAULT|[COD 001226] -
+000228|PLC|FAULT|[COD 001227] -
+000229|PLC|FAULT|[COD 001228] -
+000230|PLC|FAULT|[COD 001229] -
+000231|PLC|FAULT|[COD 001230] -
+000232|PLC|FAULT|[COD 001231] -
+000233|PLC|FAULT|[COD 001232] -
+000234|PLC|FAULT|[COD 001233] -
+000235|PLC|FAULT|[COD 001234] -
+000236|PLC|FAULT|[COD 001235] -
+000237|PLC|FAULT|[COD 001236] -
+000238|PLC|FAULT|[COD 001237] -
+000239|PLC|FAULT|[COD 001238] -
+000240|PLC|FAULT|[COD 001239] -
+000241|PLC|FAULT|[COD 001240] -
+000242|PLC|FAULT|[COD 001241] -
+000243|PLC|FAULT|[COD 001242] -
+000244|PLC|FAULT|[COD 001243] -
+000245|PLC|FAULT|[COD 001244] -
+000246|PLC|FAULT|[COD 001245] -
+000247|PLC|FAULT|[COD 001246] -
+000248|PLC|FAULT|[COD 001247] -
+000249|PLC|FAULT|[COD 001248] -
+000250|PLC|FAULT|[COD 001249] -
+000251|PLC|FAULT|[COD 001250] -
+000252|PLC|FAULT|[COD 001251] -
+000253|PLC|FAULT|[COD 001252] -
+000254|PLC|FAULT|[COD 001253] -
+000255|PLC|FAULT|[COD 001254] -
+000256|PLC|FAULT|[COD 001255] -
+000257|PLC|FAULT|[COD 002000] - 444 PRESSIONE LIQUIDO DI RAFFREDDAMENTO INSUFFICIENTE
+000258|PLC|FAULT|[COD 002001] - 441 MALFUNZIONAMENTO RAFFREDDAMENTO MANDRINI
+000259|PLC|FAULT|[COD 002002] - 276 LIMITI SOFTWARE ASSE X NON ATTUALI
+000260|PLC|FAULT|[COD 002003] - 512 CAMBIO ZONA INTERROTTO
+000261|PLC|FAULT|[COD 002004] - 346 PARATIA NON IN POSIZIONE
+000262|PLC|FAULT|[COD 002005] - 607 PREMERE PRENOTAZIONE CAMBIO ZONA
+000263|PLC|FAULT|[COD 002006] - 150 AZIONAMENTI NON ABILITATI
+000264|PLC|FAULT|[COD 002007] - 161 COMUNICAZIONE INVERTER IN ERRORE
+000265|PLC|FAULT|[COD 002008] - 162 FATAL ERROR INVERTER
+000266|PLC|FAULT|[COD 002009] - 398 PRESSIONE ARIA INSUFFICIENTE
+000267|PLC|FAULT|[COD 002010] - 400 LUBRIFICAZIONE INEFFICIENTE
+000268|PLC|FAULT|[COD 002011] - 460 ASSE B BLOCCATO
+000269|PLC|FAULT|[COD 002012] - 458 ASSE B NON BLOCCATO
+000270|PLC|FAULT|[COD 002013] - 460 ASSE C BLOCCATO
+000271|PLC|FAULT|[COD 002014] - 458 ASSE C NON BLOCCATO
+000272|PLC|FAULT|[COD 002015] - 105 MACCHINA IN HOLD
+000273|PLC|FAULT|[COD 002016] - 614 PREMERE LA SOFTKEY RIPRISTINO ACCOPPIAMENTO Z-W
+000274|PLC|FAULT|[COD 002017] - 593 PROTEZIONI DI SICUREZZA
+000275|PLC|FAULT|[COD 002018] - 362 MONTANTE CENTRALE NON IN POSIZIONE
+000276|PLC|FAULT|[COD 002019] - 157 SICUREZZE ANTICADUTA ASSE Z NON OK
+000277|PLC|FAULT|[COD 002020] - 158 PIOLO ANTICADUTA ASSE Z NON IN POSIZIONE
+000278|PLC|FAULT|[COD 002021] - 115 CONTROLLO VELOCITA MANDRINO
+000279|PLC|FAULT|[COD 002022] - 135 CONVERTITORE IN BLOCCO
+000280|PLC|FAULT|[COD 002023] - 514 PROTEZIONE SUPPORTO LASER NON IN POSIZIONE
+000281|PLC|FAULT|[COD 002024] - 561 LASER NON IN POSIZIONE
+000282|PLC|FAULT|[COD 002025] - 230 RELE TERMICO POMPA VUOTO 1
+000283|PLC|FAULT|[COD 002026] - 230 RELE TERMICO POMPA VUOTO 2
+000284|PLC|FAULT|[COD 002027] - 200 RELE TERMICO MANDRINO
+000285|PLC|FAULT|[COD 002028] - 168 CONVERTITORE NON ABILITATO
+000286|PLC|FAULT|[COD 002029] - 333 COMUNICAZIONE VOLANTINO IN ERRORE
+000287|PLC|FAULT|[COD 002030] - 390 FUNZIONE T NON PERMESSA
+000288|PLC|FAULT|[COD 002031] - 429 UTENSILE IN MANDRINO NON OK
+000289|PLC|FAULT|[COD 002032] - 245 PROTEZIONE TERMICA ASSE A
+000290|PLC|FAULT|[COD 002033] - 245 PROTEZIONE TERMICA ASSE C
+000291|PLC|FAULT|[COD 002034] - 004 VUOI ATTIVARE IL PROGRAMMA? PREMERE LA SOFTKEY SI OPPURE RESET
+000292|PLC|FAULT|[COD 002035] - 490 VERIFICA POSIZIONE UTENSILI
+000293|PLC|FAULT|[COD 002036] - 522 NUMERO DI GIRI TROPPO ELEVATI
+000294|PLC|FAULT|[COD 002037] - 498 CARICO MASSIMO SUL MANDRINO
+000295|PLC|FAULT|[COD 002038] - 397 CIRCUITO REFRIGERANTE UTENSILE NON OK
+000296|PLC|FAULT|[COD 002039] - 465 UTENSILE ROTTO
+000297|PLC|FAULT|[COD 002040] - 559 LASER/TASTATORE IN MANDRINO
+000298|PLC|FAULT|[COD 002041] - 572 TASTATORE NON PRONTO
+000299|PLC|FAULT|[COD 002042] - 514 PROTEZIONE SUPPORTO TASTATORE NON IN POSIZIONE
+000300|PLC|FAULT|[COD 002043] - 561 TASTATORE NON IN POSIZIONE
+000301|PLC|FAULT|[COD 002044] - 163 FRENO CONVERTITORE NON OK
+000302|PLC|FAULT|[COD 002045] - 572 RADIO PROBE - BATTERIA SCARICA
+000303|PLC|FAULT|[COD 002046] - 640 TAVOLE NON IN POSIZIONE CORRETTA
+000304|PLC|FAULT|[COD 002047] - 673 ASSE Z NON OK PER CAMBIO TAVOLA
+000305|PLC|FAULT|[COD 002048] - 641 CAMBIO TAVOLA INTERROTTO
+000306|PLC|FAULT|[COD 002049] - 130 PROBE DEVICE NON OK - DISATTIVARE DRY RUN
+000307|PLC|FAULT|[COD 002050] - 276 LIMITI SOFTWARE ASSE C NON ATTUALI
+000308|PLC|FAULT|[COD 002051] - 495 AZZERAMENTO ASSI CON UTENSILE NON CONSENTITO
+000309|PLC|FAULT|[COD 002052] - 479 PORTELLE ASPIRAZIONE DESTRA NON IN POSIZIONE
+000310|PLC|FAULT|[COD 002053] - 479 PORTELLE ASPIRAZIONE SINISTRA NON IN POSIZIONE
+000311|PLC|FAULT|[COD 002054] - ...
+000312|PLC|FAULT|[COD 002055] - ...
+000313|PLC|FAULT|[COD 002056] - ...
+000314|PLC|FAULT|[COD 002057] - ...
+000315|PLC|FAULT|[COD 002058] - 444 PRESSIONE LIQUIDO DI RAFFREDDAMENTO MOTORI TORQUE INSUFFICIENTE(TORQUE)
+000316|PLC|FAULT|[COD 002059] - 672 CIRCUITO LIQUIDO DI RAFFREDDAMENTO MOTORI TORQUE NON OK
+000317|PLC|FAULT|[COD 002060] - 265 ASSE X NON IN POSIZIONE PER AZZERAMENTO
+000318|PLC|FAULT|[COD 002061] - 265 ASSE Y NON IN POSIZIONE PER AZZERAMENTO
+000319|PLC|FAULT|[COD 002062] - 265 ASSE Z NON IN POSIZIONE PER AZZERAMENTO
+000320|PLC|FAULT|[COD 002063] - ...
+000321|PLC|FAULT|[COD 002064] - 551 CONDIZIONI NON OK PER GRUPPO A FORARE
+000322|PLC|FAULT|[COD 002065] - 265 ASSE B NON IN POSIZIONE PER AZZERAMENTO
+000323|PLC|FAULT|[COD 002066] - 265 ASSE C NON IN POSIZIONE PER AZZERAMENTO
+000324|PLC|FAULT|[COD 002067] - 270 RELE TERMICO GRUPPO DI FORATURA
+000325|PLC|FAULT|[COD 002068] - ...
+000326|PLC|FAULT|[COD 002069] - ...
+000327|PLC|FAULT|[COD 002070] - 105 STOP DA DISPOSITIVO DI MONITORAGGIO
+000328|PLC|FAULT|[COD 002071] - ...
+000329|PLC|FAULT|[COD 002072] - 551 CONDIZIONI NON OK PER GRUPPO A FORARE
+000330|PLC|FAULT|[COD 002073] - 265 ASSE B NON IN POSIZIONE PER AZZERAMENTO
+000331|PLC|FAULT|[COD 002074] - 265 ASSE C NON IN POSIZIONE PER AZZERAMENTO
+000332|PLC|FAULT|[COD 002075] - 270 RELE TERMICO GRUPPO DI FORATURA
+000333|PLC|FAULT|[COD 002076] - ...
+000334|PLC|FAULT|[COD 002077] - ...
+000335|PLC|FAULT|[COD 002078] - 105 STOP DA DISPOSITIVO DI MONITORAGGIO
+000336|PLC|FAULT|[COD 002079] - ...
+000337|PLC|FAULT|[COD 002080] -
+000338|PLC|FAULT|[COD 002081] -
+000339|PLC|FAULT|[COD 002082] -
+000340|PLC|FAULT|[COD 002083] -
+000341|PLC|FAULT|[COD 002084] -
+000342|PLC|FAULT|[COD 002085] -
+000343|PLC|FAULT|[COD 002086] -
+000344|PLC|FAULT|[COD 002087] -
+000345|PLC|FAULT|[COD 002088] -
+000346|PLC|FAULT|[COD 002089] -
+000347|PLC|FAULT|[COD 002090] -
+000348|PLC|FAULT|[COD 002091] -
+000349|PLC|FAULT|[COD 002092] -
+000350|PLC|FAULT|[COD 002093] -
+000351|PLC|FAULT|[COD 002094] -
+000352|PLC|FAULT|[COD 002095] -
+000353|PLC|FAULT|[COD 002096] -
+000354|PLC|FAULT|[COD 000000] -
+000355|PLC|FAULT|[COD 000000] -
+000356|PLC|FAULT|[COD 000000] -
+000357|PLC|FAULT|[COD 000000] -
+000358|PLC|FAULT|[COD 000000] -
+000359|PLC|FAULT|[COD 000000] -
+000360|PLC|FAULT|[COD 000000] -
+000361|PLC|FAULT|[COD 000000] -
+000362|PLC|FAULT|[COD 000000] -
+000363|PLC|FAULT|[COD 000000] -
+000364|PLC|FAULT|[COD 000000] -
+000365|PLC|FAULT|[COD 000000] -
+000366|PLC|FAULT|[COD 000000] -
+000367|PLC|FAULT|[COD 000000] -
+000368|PLC|FAULT|[COD 000000] -
+000369|PLC|FAULT|[COD 002100] - 503 CAMBIO UTENSILE IN CORSO
+000370|PLC|FAULT|[COD 002101] - 781 UNO O PIU ASSI SENZA RIFERIMENTO
+000371|PLC|FAULT|[COD 002102] - 674 MACCHINA NON IN ZONA DI LAVORO
+000372|PLC|FAULT|[COD 002103] - 785 CONSENSO APERTURA PORTE NEGATO
+000373|PLC|FAULT|[COD 002104] - 520 FUNZIONE STALL MODE ATTIVA
+000374|PLC|FAULT|[COD 002105] - 450 UTENSILE MANDRINO NON BLOCCATO
+000375|PLC|FAULT|[COD 002106] - 780 STAZIONE OCCUPATA MAGAZZINO
+000376|PLC|FAULT|[COD 002107] - 530 PULSANTIERA ESTERNA ABILITATA
+000377|PLC|FAULT|[COD 002108] - 504 CAMBIO UTENSILE INTERROTTO
+000378|PLC|FAULT|[COD 002109] - 363 MONTANTE CENTRALE ALTO
+000379|PLC|FAULT|[COD 002110] - =--- PREALLARME TERMICO TORQUE A
+000380|PLC|FAULT|[COD 002111] - 498 CARICO MASSIMO SUL MANDRINO SUPERATO SOGLIA S1
+000381|PLC|FAULT|[COD 002112] - --- PREALLARME TERMICO TORQUE C
+000382|PLC|FAULT|[COD 002113] - 432 UTENSILE NON SGANCIATO
+000383|PLC|FAULT|[COD 002114] - 475 CUFFIA ASPIRAZIONE NON IN POSIZIONE
+000384|PLC|FAULT|[COD 002115] - 498 CARICO MASSIMO SUL MANDRINO SUPERATO SOGLIA S6
+000385|PLC|FAULT|[COD 002116] - 505 MOVIMENTO CONSENTITO Z+
+000386|PLC|FAULT|[COD 002117] - 545 ASSE Z NON IN POSIZIONE
+000387|PLC|FAULT|[COD 002118] - 528 MODALITA PROVA PROGRAMMA ATTIVA
+000388|PLC|FAULT|[COD 002119] - 351 MESSAGGI PLC INVIATO SMS
+000389|PLC|FAULT|[COD 002120] - 603 INDICARE IL NOME DELL OPERATORE E CAUSA ARRESTO MACCHINA
+000390|PLC|FAULT|[COD 002121] - 538 TAVOLA NON POSIZIONATA
+000391|PLC|FAULT|[COD 002122] - 595 BARRIERE DI SICUREZZA
+000392|PLC|FAULT|[COD 002123] - 689 AVVISO TOOLTABLE - T INTERPRETATA COME MANINA
+000393|PLC|FAULT|[COD 002124] - 689 AVVISO TOOLTABLE - T INTERPRETATA COME ID UTENSILE
+000394|PLC|FAULT|[COD 002125] - 260 REGOLAZIONE AUTOMATICA FEED OVERRIDE IN CORSO
+000395|PLC|FAULT|[COD 002126] - 464 VITA UTENSILE ESAURITA
+000396|PLC|FAULT|[COD 002127] - 003 SEI SICURO DI VOLER CAMBIARE ORIGINE ? PREMERE SOFTKEY SI O RESET
+000397|PLC|FAULT|[COD 002128] - 305 BLOCCAGGIO A DEPRESSIONE 1 INEFFICIENTE
+000398|PLC|FAULT|[COD 002129] - 305 BLOCCAGGIO A DEPRESSIONE 2 INEFFICIENTE
+000399|PLC|FAULT|[COD 002130] - 300 BLOCCAGGIO A PRESSIONE 1 INEFFICIENTE
+000400|PLC|FAULT|[COD 002131] - 300 BLOCCAGGIO A PRESSIONE 2 INEFFICIENTE
+000401|PLC|FAULT|[COD 002132] - 305 BLOCCAGGIO A DEPRESSIONE SUPPLEMENTARE 1 INEFFICIENTE
+000402|PLC|FAULT|[COD 002133] - 305 BLOCCAGGIO A DEPRESSIONE SUPPLEMENTARE 2 INEFFICIENTE
+000403|PLC|FAULT|[COD 002134] - 584 PORTE DI SICUREZZA 1 NON CHIUSE
+000404|PLC|FAULT|[COD 002135] - 584 PORTE DI SICUREZZA 2 NON CHIUSE
+000405|PLC|FAULT|[COD 002136] - 406 PULSANTE POWER-OFF PREMUTO
+000406|PLC|FAULT|[COD 002137] - 412 AZZERAMENTO AUTOMATICO ASSI IN CORSO
+000407|PLC|FAULT|[COD 002138] - 689 AVVISO TOOLTABLE - RICHIESTA CONFERMA ATTREZZAGGIO
+000408|PLC|FAULT|[COD 002139] - 700 TABELLE IN MODIFICA
+000409|PLC|FAULT|[COD 002140] - 442 MAGAZZINO DISCO MOBILE NON IN POSIZIONE
+000410|PLC|FAULT|[COD 002141] - 442 MAGAZZINO PICK-UP 1 NON IN POSIZIONE
+000411|PLC|FAULT|[COD 002142] - 442 MAGAZZINO PICK-UP 2 NON IN POSIZIONE
+000412|PLC|FAULT|[COD 002143] - 442 MAGAZINO LATERALE 1 NON IN POSIZIONE
+000413|PLC|FAULT|[COD 002144] - 442 MAGAZINO LATERALE 2 NON IN POSIZIONE
+000414|PLC|FAULT|[COD 002145] - 514 PROTEZIONE MAGAZZINO PICK-UP 1 NON IN POSIZIONE
+000415|PLC|FAULT|[COD 002146] - 514 PROTEZIONE MAGAZZINO PICK-UP 2 NON IN POSIZIONE
+000416|PLC|FAULT|[COD 002147] - 514 PROTEZIONE MAGAZZINO LATERALE 1 NON IN POSIZIONE
+000417|PLC|FAULT|[COD 002148] - 514 PROTEZIONE MAGAZZINO LATERALE 2 NON IN POSIZIONE
+000418|PLC|FAULT|[COD 002149] - 334 ERRORE COMUNICAZIONE CANBUS
+000419|PLC|FAULT|[COD 002150] - 147 CAMBIO UTENSILE 1 IN ALLARME
+000420|PLC|FAULT|[COD 002151] - 160 AZIONAMENTO CAMBIO UTENSILE 1 NON PRONTO
+000421|PLC|FAULT|[COD 002152] - 151 AZIONAMENTO CAMBIO UTENSILE 1 NON ALIMENTATO
+000422|PLC|FAULT|[COD 002153] - 442 MAGAZZINO UTENSILI DISCO 1 NON IN POSIZIONE
+000423|PLC|FAULT|[COD 002154] - 289 ATTREZZAGGIO CAMBIO UTENSILE 1 IN CORSO
+000424|PLC|FAULT|[COD 002155] - 584 PORTA DI SICUREZZA MAGAZZINO DISCO 1 NON CHIUSA
+000425|PLC|FAULT|[COD 002156] - 514 PROTEZIONE MAGAZZINO DISCO 1 NON IN POSIZIONE
+000426|PLC|FAULT|[COD 002157] - 147 CAMBIO UTENSILE 2 IN ALLARME
+000427|PLC|FAULT|[COD 002158] - 160 AZIONAMENTO CAMBIO UTENSILE 2 NON PRONTO
+000428|PLC|FAULT|[COD 002159] - 151 AZIONAMENTO CAMBIO UTENSILE 2 NON ALIMENTATO
+000429|PLC|FAULT|[COD 002160] - 442 MAGAZZINO UTENSILI DISCO 2 NON IN POSIZIONE
+000430|PLC|FAULT|[COD 002161] - 289 ATTREZZAGGIO CAMBIO UTENSILE 2 IN CORSO
+000431|PLC|FAULT|[COD 002162] - 584 PORTA DI SICUREZZA MAGAZZINO DISCO 2 NON CHIUSA
+000432|PLC|FAULT|[COD 002163] - 514 PROTEZIONE MAGAZZINO DISCO 2 NON IN POSIZIONE
+000433|PLC|FAULT|[COD 002164] -
+000434|PLC|FAULT|[COD 002165] - 550 GRUPPO DI FORATURA NON IN POSIZIONE
+000435|PLC|FAULT|[COD 002166] - ...
+000436|PLC|FAULT|[COD 002167] - ...
+000437|PLC|FAULT|[COD 002168] - ...
+000438|PLC|FAULT|[COD 002169] - ...
+000439|PLC|FAULT|[COD 002170] - 250 CICLO DI ATTREZZAGGIO AUTOMATICO IN CORSO
+000440|PLC|FAULT|[COD 002171] - 251 CICLO DI ATTREZZAGGIO AUTOMATICO INTERROTTO
+000441|PLC|FAULT|[COD 002172] - 605 DISPOSITIVO DI REGISTRAZIONE DATI UTENSILI NON IN POSIZIONE
+000442|PLC|FAULT|[COD 002173] - ...
+000443|PLC|FAULT|[COD 002174] - ...
+000444|PLC|FAULT|[COD 002175] - ...
+000445|PLC|FAULT|[COD 002176] - 130 DISPOSITIVO MONITORAGGIO NON PRONTO
+000446|PLC|FAULT|[COD 002177] - 773 LIMITE 1 MONITORAGGIO NON OK
+000447|PLC|FAULT|[COD 002178] - 773 LIMITE 2 MONITORAGGIO NON OK
+000448|PLC|FAULT|[COD 002179] - 773 LIMITE 3 MONITORAGGIO NON OK
+000449|PLC|FAULT|[COD 002180] - ...
+000450|PLC|FAULT|[COD 002181] -
+000451|PLC|FAULT|[COD 002182] -
+000452|PLC|FAULT|[COD 002183] -
+000453|PLC|FAULT|[COD 002184] -
+000454|PLC|FAULT|[COD 002185] -
+000455|PLC|FAULT|[COD 002186] -
+000456|PLC|FAULT|[COD 002187] -
+000457|PLC|FAULT|[COD 002188] -
+000458|PLC|FAULT|[COD 002189] -
+000459|PLC|FAULT|[COD 002190] -
+000460|PLC|FAULT|[COD 002191] -
+000461|PLC|FAULT|[COD 002192] -
+000462|PLC|FAULT|[COD 002193] -
+000463|PLC|FAULT|[COD 002194] -
+000464|PLC|FAULT|[COD 002195] -
+000465|PLC|FAULT|[COD 000000] -
+000466|PLC|FAULT|[COD 000000] -
+000467|PLC|FAULT|[COD 000000] -
+000468|PLC|FAULT|[COD 000000] -
+000469|PLC|FAULT|[COD 000000] -
+000470|PLC|FAULT|[COD 000000] -
+000471|PLC|FAULT|[COD 000000] -
+000472|PLC|FAULT|[COD 000000] -
+000473|PLC|FAULT|[COD 000000] -
+000474|PLC|FAULT|[COD 000000] -
+000475|PLC|FAULT|[COD 000000] -
+000476|PLC|FAULT|[COD 000000] -
+000477|PLC|FAULT|[COD 000000] -
+000478|PLC|FAULT|[COD 000000] -
+000479|PLC|FAULT|[COD 000000] -
+000480|PLC|FAULT|[COD 000000] -
+000481|PLC|FAULT|[COD 000000] -
+000482|PLC|FAULT|[COD 000000] -
+000483|PLC|FAULT|[COD 000000] -
+000484|PLC|FAULT|[COD 000000] -
+000485|PLC|FAULT|[COD 000000] -
+000486|PLC|FAULT|[COD 000000] -
+000487|PLC|FAULT|[COD 000000] -
+000488|PLC|FAULT|[COD 000000] -
+000489|PLC|FAULT|[COD 000000] -
+000490|PLC|FAULT|[COD 000000] -
+000491|PLC|FAULT|[COD 000000] -
+000492|PLC|FAULT|[COD 000000] -
+000493|PLC|FAULT|[COD 000000] -
+000494|PLC|FAULT|[COD 000000] -
+000495|PLC|FAULT|[COD 000000] -
+000496|PLC|FAULT|[COD 000000] -
+000497|PLC|FAULT|[COD 000000] -
+000498|PLC|FAULT|[COD 000000] -
+000499|PLC|FAULT|[COD 000000] -
+000500|PLC|FAULT|[COD 000000] -
+000501|PLC|FAULT|[COD 000000] -
+000502|PLC|FAULT|[COD 000000] -
+000503|PLC|FAULT|[COD 000000] -
+000504|PLC|FAULT|[COD 000000] -
+000505|PLC|FAULT|[COD 000000] -
+000506|PLC|FAULT|[COD 000000] -
+000507|PLC|FAULT|[COD 000000] -
+000508|PLC|FAULT|[COD 000000] -
+000509|PLC|FAULT|[COD 000000] -
+000510|PLC|FAULT|[COD 000000] -
+000511|PLC|FAULT|[COD 000000] -
+000512|PLC|FAULT|[COD 000000] -
+000513|PLC|FAULT|[COD 000000] -
+000514|PLC|FAULT|[COD 000000] -
+000515|PLC|FAULT|[COD 000000] -
+000516|PLC|FAULT|[COD 000000] -
+000517|PLC|FAULT|[COD 000000] -
+000518|PLC|FAULT|[COD 000000] -
+000519|PLC|FAULT|[COD 000000] -
+000520|PLC|FAULT|[COD 000000] -
+000521|PLC|FAULT|[COD 000000] -
+000522|PLC|FAULT|[COD 000000] -
+000523|PLC|FAULT|[COD 000000] -
+000524|PLC|FAULT|[COD 000000] -
+000525|PLC|FAULT|[COD 000000] -
+000526|PLC|FAULT|[COD 000000] -
+000527|PLC|FAULT|[COD 000000] -
+000528|PLC|FAULT|[COD 000000] -
+000529|PLC|FAULT|[COD 000000] -
+000530|PLC|FAULT|[COD 000000] -
+000531|PLC|FAULT|[COD 000000] -
+000532|PLC|FAULT|[COD 000000] -
+000533|PLC|FAULT|[COD 000000] -
+000534|PLC|FAULT|[COD 000000] -
+000535|PLC|FAULT|[COD 000000] -
+000536|PLC|FAULT|[COD 000000] -
+000537|PLC|FAULT|[COD 000000] -
+000538|PLC|FAULT|[COD 000000] -
+000539|PLC|FAULT|[COD 000000] -
+000540|PLC|FAULT|[COD 000000] -
+000541|PLC|FAULT|[COD 000000] -
+000542|PLC|FAULT|[COD 000000] -
+000543|PLC|FAULT|[COD 000000] -
+000544|PLC|FAULT|[COD 000000] -
+000545|PLC|FAULT|[COD 000000] -
+000546|PLC|FAULT|[COD 000000] -
+000547|PLC|FAULT|[COD 000000] -
+000548|PLC|FAULT|[COD 000000] -
+000549|PLC|FAULT|[COD 000000] -
+000550|PLC|FAULT|[COD 000000] -
+000551|PLC|FAULT|[COD 000000] -
+000552|PLC|FAULT|[COD 000000] -
+000553|PLC|FAULT|[COD 000000] -
+000554|PLC|FAULT|[COD 000000] -
+000555|PLC|FAULT|[COD 000000] -
+000556|PLC|FAULT|[COD 000000] -
+000557|PLC|FAULT|[COD 000000] -
+000558|PLC|FAULT|[COD 000000] -
+000559|PLC|FAULT|[COD 000000] -
+000560|PLC|FAULT|[COD 000000] -
+000561|PLC|FAULT|[COD 000000] -
+000562|PLC|FAULT|[COD 000000] -
+000563|PLC|FAULT|[COD 000000] -
+000564|PLC|FAULT|[COD 000000] -
+000565|PLC|FAULT|[COD 000000] -
+000566|PLC|FAULT|[COD 000000] -
+000567|PLC|FAULT|[COD 000000] -
+000568|PLC|FAULT|[COD 000000] -
+000569|PLC|FAULT|[COD 000000] -
+000570|PLC|FAULT|[COD 000000] -
+000571|PLC|FAULT|[COD 000000] -
+000572|PLC|FAULT|[COD 000000] -
+000573|PLC|FAULT|[COD 000000] -
+000574|PLC|FAULT|[COD 000000] -
+000575|PLC|FAULT|[COD 000000] -
+000576|PLC|FAULT|[COD 000000] -
+000577|PLC|FAULT|[COD 000000] -
+000578|PLC|FAULT|[COD 000000] -
+000579|PLC|FAULT|[COD 000000] -
+000580|PLC|FAULT|[COD 000000] -
+000581|PLC|FAULT|[COD 000000] -
+000582|PLC|FAULT|[COD 000000] -
+000583|PLC|FAULT|[COD 000000] -
+000584|PLC|FAULT|[COD 000000] -
+000585|PLC|FAULT|[COD 000000] -
+000586|PLC|FAULT|[COD 000000] -
+000587|PLC|FAULT|[COD 000000] -
+000588|PLC|FAULT|[COD 000000] -
+000589|PLC|FAULT|[COD 000000] -
+000590|PLC|FAULT|[COD 000000] -
+000591|PLC|FAULT|[COD 000000] -
+000592|PLC|FAULT|[COD 000000] -
+000593|PLC|FAULT|[COD 000000] -
+000594|PLC|FAULT|[COD 000000] -
+000595|PLC|FAULT|[COD 000000] -
+000596|PLC|FAULT|[COD 000000] -
+000597|PLC|FAULT|[COD 000000] -
+000598|PLC|FAULT|[COD 000000] -
+000599|PLC|FAULT|[COD 000000] -
+000600|PLC|FAULT|[COD 000000] -
+000601|PLC|FAULT|[COD 000000] -
+000602|PLC|FAULT|[COD 000000] -
+000603|PLC|FAULT|[COD 000000] -
+000604|PLC|FAULT|[COD 000000] -
+000605|PLC|FAULT|[COD 000000] -
+000606|PLC|FAULT|[COD 000000] -
+000607|PLC|FAULT|[COD 000000] -
+000608|PLC|FAULT|[COD 000000] -
+000609|PLC|FAULT|[COD 000000] -
+000610|PLC|FAULT|[COD 000000] -
+000611|PLC|FAULT|[COD 000000] -
+000612|PLC|FAULT|[COD 000000] -
+000613|PLC|FAULT|[COD 000000] -
+000614|PLC|FAULT|[COD 000000] -
+000615|PLC|FAULT|[COD 000000] -
+000616|PLC|FAULT|[COD 000000] -
+000617|PLC|FAULT|[COD 000000] -
+000618|PLC|FAULT|[COD 000000] -
+000619|PLC|FAULT|[COD 000000] -
+000620|PLC|FAULT|[COD 000000] -
+000621|PLC|FAULT|[COD 000000] -
+000622|PLC|FAULT|[COD 000000] -
+000623|PLC|FAULT|[COD 000000] -
+000624|PLC|FAULT|[COD 000000] -
+000625|PLC|FAULT|[COD 000000] -
+000626|PLC|FAULT|[COD 000000] -
+000627|PLC|FAULT|[COD 000000] -
+000628|PLC|FAULT|[COD 000000] -
+000629|PLC|FAULT|[COD 000000] -
+000630|PLC|FAULT|[COD 000000] -
+000631|PLC|FAULT|[COD 000000] -
+000632|PLC|FAULT|[COD 000000] -
+000633|PLC|FAULT|[COD 000000] -
+000634|PLC|FAULT|[COD 000000] -
+000635|PLC|FAULT|[COD 000000] -
+000636|PLC|FAULT|[COD 000000] -
+000637|PLC|FAULT|[COD 000000] -
+000638|PLC|FAULT|[COD 000000] -
+000639|PLC|FAULT|[COD 000000] -
+000640|PLC|FAULT|[COD 000000] -
+000641|PLC|FAULT|[COD 000000] -
+000642|PLC|FAULT|[COD 000000] -
+000643|PLC|FAULT|[COD 000000] -
+000644|PLC|FAULT|[COD 000000] -
+000645|PLC|FAULT|[COD 000000] -
+000646|PLC|FAULT|[COD 000000] -
+000647|PLC|FAULT|[COD 000000] -
+000648|PLC|FAULT|[COD 000000] -
+000649|PLC|FAULT|[COD 000000] -
+000650|PLC|FAULT|[COD 000000] -
+000651|PLC|FAULT|[COD 000000] -
+000652|PLC|FAULT|[COD 000000] -
+000653|PLC|FAULT|[COD 000000] -
+000654|PLC|FAULT|[COD 000000] -
+000655|PLC|FAULT|[COD 000000] -
+000656|PLC|FAULT|[COD 000000] -
+000657|PLC|FAULT|[COD 000000] -
+000658|PLC|FAULT|[COD 000000] -
+000659|PLC|FAULT|[COD 000000] -
+000660|PLC|FAULT|[COD 000000] -
+000661|PLC|FAULT|[COD 000000] -
+000662|PLC|FAULT|[COD 000000] -
+000663|PLC|FAULT|[COD 000000] -
+000664|PLC|FAULT|[COD 000000] -
+000665|PLC|FAULT|[COD 000000] -
+000666|PLC|FAULT|[COD 000000] -
+000667|PLC|FAULT|[COD 000000] -
+000668|PLC|FAULT|[COD 000000] -
+000669|PLC|FAULT|[COD 000000] -
+000670|PLC|FAULT|[COD 000000] -
+000671|PLC|FAULT|[COD 000000] -
+000672|PLC|FAULT|[COD 000000] -
+000673|PLC|FAULT|[COD 000000] -
+000674|PLC|FAULT|[COD 000000] -
+000675|PLC|FAULT|[COD 000000] -
+000676|PLC|FAULT|[COD 000000] -
+000677|PLC|FAULT|[COD 000000] -
+000678|PLC|FAULT|[COD 000000] -
+000679|PLC|FAULT|[COD 000000] -
+000680|PLC|FAULT|[COD 000000] -
+000681|PLC|FAULT|[COD 000000] -
+000682|PLC|FAULT|[COD 000000] -
+000683|PLC|FAULT|[COD 000000] -
+000684|PLC|FAULT|[COD 000000] -
+000685|PLC|FAULT|[COD 000000] -
+000686|PLC|FAULT|[COD 000000] -
+000687|PLC|FAULT|[COD 000000] -
+000688|PLC|FAULT|[COD 000000] -
+000689|PLC|FAULT|[COD 000000] -
+000690|PLC|FAULT|[COD 000000] -
+000691|PLC|FAULT|[COD 000000] -
+000692|PLC|FAULT|[COD 000000] -
+000693|PLC|FAULT|[COD 000000] -
+000694|PLC|FAULT|[COD 000000] -
+000695|PLC|FAULT|[COD 000000] -
+000696|PLC|FAULT|[COD 000000] -
+000697|PLC|FAULT|[COD 000000] -
+000698|PLC|FAULT|[COD 000000] -
+000699|PLC|FAULT|[COD 000000] -
+000700|PLC|FAULT|[COD 000000] -
+000701|PLC|FAULT|[COD 000000] -
+000702|PLC|FAULT|[COD 000000] -
+000703|PLC|FAULT|[COD 000000] -
+000704|PLC|FAULT|[COD 000000] -
+000705|PLC|FAULT|[COD 000000] -
+000706|PLC|FAULT|[COD 000000] -
+000707|PLC|FAULT|[COD 000000] -
+000708|PLC|FAULT|[COD 000000] -
+000709|PLC|FAULT|[COD 000000] -
+000710|PLC|FAULT|[COD 000000] -
+000711|PLC|FAULT|[COD 000000] -
+000712|PLC|FAULT|[COD 000000] -
+000713|PLC|FAULT|[COD 000000] -
+000714|PLC|FAULT|[COD 000000] -
+000715|PLC|FAULT|[COD 000000] -
+000716|PLC|FAULT|[COD 000000] -
+000717|PLC|FAULT|[COD 000000] -
+000718|PLC|FAULT|[COD 000000] -
+000719|PLC|FAULT|[COD 000000] -
+000720|PLC|FAULT|[COD 000000] -
+000721|PLC|FAULT|[COD 000000] -
+000722|PLC|FAULT|[COD 000000] -
+000723|PLC|FAULT|[COD 000000] -
+000724|PLC|FAULT|[COD 000000] -
+000725|PLC|FAULT|[COD 000000] -
+000726|PLC|FAULT|[COD 000000] -
+000727|PLC|FAULT|[COD 000000] -
+000728|PLC|FAULT|[COD 000000] -
+000729|PLC|FAULT|[COD 000000] -
+000730|PLC|FAULT|[COD 000000] -
+000731|PLC|FAULT|[COD 000000] -
+000732|PLC|FAULT|[COD 000000] -
+000733|PLC|FAULT|[COD 000000] -
+000734|PLC|FAULT|[COD 000000] -
+000735|PLC|FAULT|[COD 000000] -
+000736|PLC|FAULT|[COD 000000] -
+000737|PLC|FAULT|[COD 000000] -
+000738|PLC|FAULT|[COD 000000] -
+000739|PLC|FAULT|[COD 000000] -
+000740|PLC|FAULT|[COD 000000] -
+000741|PLC|FAULT|[COD 000000] -
+000742|PLC|FAULT|[COD 000000] -
+000743|PLC|FAULT|[COD 000000] -
+000744|PLC|FAULT|[COD 000000] -
+000745|PLC|FAULT|[COD 000000] -
+000746|PLC|FAULT|[COD 000000] -
+000747|PLC|FAULT|[COD 000000] -
+000748|PLC|FAULT|[COD 000000] -
+000749|PLC|FAULT|[COD 000000] -
+000750|PLC|FAULT|[COD 000000] -
+000751|PLC|FAULT|[COD 000000] -
+000752|PLC|FAULT|[COD 000000] -
+000753|PLC|FAULT|[COD 000000] -
+000754|PLC|FAULT|[COD 000000] -
+000755|PLC|FAULT|[COD 000000] -
+000756|PLC|FAULT|[COD 000000] -
+000757|PLC|FAULT|[COD 000000] -
+000758|PLC|FAULT|[COD 000000] -
+000759|PLC|FAULT|[COD 000000] -
+000760|PLC|FAULT|[COD 000000] -
+000761|PLC|FAULT|[COD 000000] -
+000762|PLC|FAULT|[COD 000000] -
+000763|PLC|FAULT|[COD 000000] -
+000764|PLC|FAULT|[COD 000000] -
+000765|PLC|FAULT|[COD 000000] -
+000766|PLC|FAULT|[COD 000000] -
+000767|PLC|FAULT|[COD 000000] -
+000768|PLC|FAULT|[COD 000000] -
+000769|PLC|FAULT|[COD 000000] -
+000770|PLC|FAULT|[COD 000000] -
+000771|PLC|FAULT|[COD 000000] -
+000772|PLC|FAULT|[COD 000000] -
+000773|PLC|FAULT|[COD 000000] -
+000774|PLC|FAULT|[COD 000000] -
+000775|PLC|FAULT|[COD 000000] -
+000776|PLC|FAULT|[COD 000000] -
+000777|PLC|FAULT|[COD 000000] -
+000778|PLC|FAULT|[COD 000000] -
+000779|PLC|FAULT|[COD 000000] -
+000780|PLC|FAULT|[COD 000000] -
+000781|PLC|FAULT|[COD 000000] -
+000782|PLC|FAULT|[COD 000000] -
+000783|PLC|FAULT|[COD 000000] -
+000784|PLC|FAULT|[COD 000000] -
+000785|PLC|FAULT|[COD 000000] -
+000786|PLC|FAULT|[COD 000000] -
+000787|PLC|FAULT|[COD 000000] -
+000788|PLC|FAULT|[COD 000000] -
+000789|PLC|FAULT|[COD 000000] -
+000790|PLC|FAULT|[COD 000000] -
+000791|PLC|FAULT|[COD 000000] -
+000792|PLC|FAULT|[COD 000000] -
+000793|PLC|FAULT|[COD 000000] -
+000794|PLC|FAULT|[COD 000000] -
+000795|PLC|FAULT|[COD 000000] -
+000796|PLC|FAULT|[COD 000000] -
+000797|PLC|FAULT|[COD 000000] -
+000798|PLC|FAULT|[COD 000000] -
+000799|PLC|FAULT|[COD 000000] -
+000800|PLC|FAULT|[COD 000000] -
+000801|PLC|FAULT|[COD 000000] -
+000802|PLC|FAULT|[COD 000000] -
+000803|PLC|FAULT|[COD 000000] -
+000804|PLC|FAULT|[COD 000000] -
+000805|PLC|FAULT|[COD 000000] -
+000806|PLC|FAULT|[COD 000000] -
+000807|PLC|FAULT|[COD 000000] -
+000808|PLC|FAULT|[COD 000000] -
+000809|PLC|FAULT|[COD 000000] -
+000810|PLC|FAULT|[COD 000000] -
+000811|PLC|FAULT|[COD 000000] -
+000812|PLC|FAULT|[COD 000000] -
+000813|PLC|FAULT|[COD 000000] -
+000814|PLC|FAULT|[COD 000000] -
+000815|PLC|FAULT|[COD 000000] -
+000816|PLC|FAULT|[COD 000000] -
+000817|PLC|FAULT|[COD 000000] -
+000818|PLC|FAULT|[COD 000000] -
+000819|PLC|FAULT|[COD 000000] -
+000820|PLC|FAULT|[COD 000000] -
+000821|PLC|FAULT|[COD 000000] -
+000822|PLC|FAULT|[COD 000000] -
+000823|PLC|FAULT|[COD 000000] -
+000824|PLC|FAULT|[COD 000000] -
+000825|PLC|FAULT|[COD 000000] -
+000826|PLC|FAULT|[COD 000000] -
+000827|PLC|FAULT|[COD 000000] -
+000828|PLC|FAULT|[COD 000000] -
+000829|PLC|FAULT|[COD 000000] -
+000830|PLC|FAULT|[COD 000000] -
+000831|PLC|FAULT|[COD 000000] -
+000832|PLC|FAULT|[COD 000000] -
+000833|PLC|FAULT|[COD 000000] -
+000834|PLC|FAULT|[COD 000000] -
+000835|PLC|FAULT|[COD 000000] -
+000836|PLC|FAULT|[COD 000000] -
+000837|PLC|FAULT|[COD 000000] -
+000838|PLC|FAULT|[COD 000000] -
+000839|PLC|FAULT|[COD 000000] -
+000840|PLC|FAULT|[COD 000000] -
+000841|PLC|FAULT|[COD 000000] -
+000842|PLC|FAULT|[COD 000000] -
+000843|PLC|FAULT|[COD 000000] -
+000844|PLC|FAULT|[COD 000000] -
+000845|PLC|FAULT|[COD 000000] -
+000846|PLC|FAULT|[COD 000000] -
+000847|PLC|FAULT|[COD 000000] -
+000848|PLC|FAULT|[COD 000000] -
+000849|PLC|FAULT|[COD 000000] -
+000850|PLC|FAULT|[COD 000000] -
+000851|PLC|FAULT|[COD 000000] -
+000852|PLC|FAULT|[COD 000000] -
+000853|PLC|FAULT|[COD 000000] -
+000854|PLC|FAULT|[COD 000000] -
+000855|PLC|FAULT|[COD 000000] -
+000856|PLC|FAULT|[COD 000000] -
+000857|PLC|FAULT|[COD 000000] -
+000858|PLC|FAULT|[COD 000000] -
+000859|PLC|FAULT|[COD 000000] -
+000860|PLC|FAULT|[COD 000000] -
+000861|PLC|FAULT|[COD 000000] -
+000862|PLC|FAULT|[COD 000000] -
+000863|PLC|FAULT|[COD 000000] -
+000864|PLC|FAULT|[COD 000000] -
+000865|PLC|FAULT|[COD 000000] -
+000866|PLC|FAULT|[COD 000000] -
+000867|PLC|FAULT|[COD 000000] -
+000868|PLC|FAULT|[COD 000000] -
+000869|PLC|FAULT|[COD 000000] -
+000870|PLC|FAULT|[COD 000000] -
+000871|PLC|FAULT|[COD 000000] -
+000872|PLC|FAULT|[COD 000000] -
+000873|PLC|FAULT|[COD 000000] -
+000874|PLC|FAULT|[COD 000000] -
+000875|PLC|FAULT|[COD 000000] -
+000876|PLC|FAULT|[COD 000000] -
+000877|PLC|FAULT|[COD 000000] -
+000878|PLC|FAULT|[COD 000000] -
+000879|PLC|FAULT|[COD 000000] -
+000880|PLC|FAULT|[COD 000000] -
+000881|PLC|FAULT|[COD 000000] -
+000882|PLC|FAULT|[COD 000000] -
+000883|PLC|FAULT|[COD 000000] -
+000884|PLC|FAULT|[COD 000000] -
+000885|PLC|FAULT|[COD 000000] -
+000886|PLC|FAULT|[COD 000000] -
+000887|PLC|FAULT|[COD 000000] -
+000888|PLC|FAULT|[COD 000000] -
+000889|PLC|FAULT|[COD 000000] -
+000890|PLC|FAULT|[COD 000000] -
+000891|PLC|FAULT|[COD 000000] -
+000892|PLC|FAULT|[COD 000000] -
+000893|PLC|FAULT|[COD 000000] -
+000894|PLC|FAULT|[COD 000000] -
+000895|PLC|FAULT|[COD 000000] -
+000896|PLC|FAULT|[COD 000000] -
+000897|PLC|FAULT|[COD 000000] -
+000898|PLC|FAULT|[COD 000000] -
+000899|PLC|FAULT|[COD 000000] -
+000900|PLC|FAULT|[COD 000000] -
+000901|PLC|FAULT|[COD 000000] -
+000902|PLC|FAULT|[COD 000000] -
+000903|PLC|FAULT|[COD 000000] -
+000904|PLC|FAULT|[COD 000000] -
+000905|PLC|FAULT|[COD 000000] -
+000906|PLC|FAULT|[COD 000000] -
+000907|PLC|FAULT|[COD 000000] -
+000908|PLC|FAULT|[COD 000000] -
+000909|PLC|FAULT|[COD 000000] -
+000910|PLC|FAULT|[COD 000000] -
+000911|PLC|FAULT|[COD 000000] -
+000912|PLC|FAULT|[COD 000000] -
+000913|PLC|FAULT|[COD 000000] -
+000914|PLC|FAULT|[COD 000000] -
+000915|PLC|FAULT|[COD 000000] -
+000916|PLC|FAULT|[COD 000000] -
+000917|PLC|FAULT|[COD 000000] -
+000918|PLC|FAULT|[COD 000000] -
+000919|PLC|FAULT|[COD 000000] -
+000920|PLC|FAULT|[COD 000000] -
+000921|PLC|FAULT|[COD 000000] -
+000922|PLC|FAULT|[COD 000000] -
+000923|PLC|FAULT|[COD 000000] -
+000924|PLC|FAULT|[COD 000000] -
+000925|PLC|FAULT|[COD 000000] -
+000926|PLC|FAULT|[COD 000000] -
+000927|PLC|FAULT|[COD 000000] -
+000928|PLC|FAULT|[COD 000000] -
+000929|PLC|FAULT|[COD 000000] -
+000930|PLC|FAULT|[COD 000000] -
+000931|PLC|FAULT|[COD 000000] -
+000932|PLC|FAULT|[COD 000000] -
+000933|PLC|FAULT|[COD 000000] -
+000934|PLC|FAULT|[COD 000000] -
+000935|PLC|FAULT|[COD 000000] -
+000936|PLC|FAULT|[COD 000000] -
+000937|PLC|FAULT|[COD 000000] -
+000938|PLC|FAULT|[COD 000000] -
+000939|PLC|FAULT|[COD 000000] -
+000940|PLC|FAULT|[COD 000000] -
+000941|PLC|FAULT|[COD 000000] -
+000942|PLC|FAULT|[COD 000000] -
+000943|PLC|FAULT|[COD 000000] -
+000944|PLC|FAULT|[COD 000000] -
+000945|PLC|FAULT|[COD 000000] -
+000946|PLC|FAULT|[COD 000000] -
+000947|PLC|FAULT|[COD 000000] -
+000948|PLC|FAULT|[COD 000000] -
+000949|PLC|FAULT|[COD 000000] -
+000950|PLC|FAULT|[COD 000000] -
+000951|PLC|FAULT|[COD 000000] -
+000952|PLC|FAULT|[COD 000000] -
+000953|PLC|FAULT|[COD 000000] -
+000954|PLC|FAULT|[COD 000000] -
+000955|PLC|FAULT|[COD 000000] -
+000956|PLC|FAULT|[COD 000000] -
+000957|PLC|FAULT|[COD 000000] -
+000958|PLC|FAULT|[COD 000000] -
+000959|PLC|FAULT|[COD 000000] -
+000960|PLC|FAULT|[COD 000000] -
+000961|PLC|FAULT|[COD 000000] -
+000962|PLC|FAULT|[COD 000000] -
+000963|PLC|FAULT|[COD 000000] -
+000964|PLC|FAULT|[COD 000000] -
+000965|PLC|FAULT|[COD 000000] -
+000966|PLC|FAULT|[COD 000000] -
+000967|PLC|FAULT|[COD 000000] -
+000968|PLC|FAULT|[COD 000000] -
+000969|PLC|FAULT|[COD 000000] -
+000970|PLC|FAULT|[COD 000000] -
+000971|PLC|FAULT|[COD 000000] -
+000972|PLC|FAULT|[COD 000000] -
+000973|PLC|FAULT|[COD 000000] -
+000974|PLC|FAULT|[COD 000000] -
+000975|PLC|FAULT|[COD 000000] -
+000976|PLC|FAULT|[COD 000000] -
+000977|PLC|FAULT|[COD 000000] -
+000978|PLC|FAULT|[COD 000000] -
+000979|PLC|FAULT|[COD 000000] -
+000980|PLC|FAULT|[COD 000000] -
+000981|PLC|FAULT|[COD 000000] -
+000982|PLC|FAULT|[COD 000000] -
+000983|PLC|FAULT|[COD 000000] -
+000984|PLC|FAULT|[COD 000000] -
+000985|PLC|FAULT|[COD 000000] -
+000986|PLC|FAULT|[COD 000000] -
+000987|PLC|FAULT|[COD 000000] -
+000988|PLC|FAULT|[COD 000000] -
+000989|PLC|FAULT|[COD 000000] -
+000990|PLC|FAULT|[COD 000000] -
+000991|PLC|FAULT|[COD 000000] -
+000992|PLC|FAULT|[COD 000000] -
+000993|PLC|FAULT|[COD 000000] -
+000994|PLC|FAULT|[COD 000000] -
+000995|PLC|FAULT|[COD 000000] -
+000996|PLC|FAULT|[COD 000000] -
+000997|PLC|FAULT|[COD 000000] -
+000998|PLC|FAULT|[COD 000000] -
+000999|PLC|FAULT|[COD 000000] -
+001000|PLC|FAULT|[COD 000000] -
+001001|PLC|FAULT|[COD 000000] -
+001002|PLC|FAULT|[COD 000000] -
+001003|PLC|FAULT|[COD 000000] -
+001004|PLC|FAULT|[COD 000000] -
+001005|PLC|FAULT|[COD 000000] -
+001006|PLC|FAULT|[COD 000000] -
+001007|PLC|FAULT|[COD 000000] -
+001008|PLC|FAULT|[COD 000000] -
+001009|PLC|FAULT|[COD 000000] -
+001010|PLC|FAULT|[COD 000000] -
+001011|PLC|FAULT|[COD 000000] -
+001012|PLC|FAULT|[COD 000000] -
+001013|PLC|FAULT|[COD 000000] -
+001014|PLC|FAULT|[COD 000000] -
+001015|PLC|FAULT|[COD 000000] -
+001016|PLC|FAULT|[COD 000000] -
+001017|PLC|FAULT|[COD 000000] -
+001018|PLC|FAULT|[COD 000000] -
+001019|PLC|FAULT|[COD 000000] -
+001020|PLC|FAULT|[COD 000000] -
+001021|PLC|FAULT|[COD 000000] -
+001022|PLC|FAULT|[COD 000000] -
+001023|PLC|FAULT|[COD 000000] -
+001024|PLC|FAULT|[COD 000000] -
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/DATA/CONF/AnalogData.map b/MTC_Adapter/MTC_Adapter/DATA/CONF/AnalogData.map
index 9e81ede..cef4b8f 100644
--- a/MTC_Adapter/MTC_Adapter/DATA/CONF/AnalogData.map
+++ b/MTC_Adapter/MTC_Adapter/DATA/CONF/AnalogData.map
@@ -1,7 +1,4 @@
# Commenti con cancelletto, struttura un variabile per riga, tipo chiave|valore (occhio che il separatore è configurato da .cofig come "testCharSep"); spazi e tabulazioni dovrei trimmarli in acquisizione (qui inseriti per comodità di lettura)
-001|Axis_01_Load |NUM
-002|Axis_02_Load |NUM
-003|Axis_03_Load |NUM
-004|Axis_04_Load |NUM
-005|Axis_05_Load |NUM
-006|Axis_06_Load |NUM
\ No newline at end of file
+001|Analog_01 |NUM
+001|Analog_02 |NUM
+001|Analog_03 |NUM
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/DATA/CONF/CounterList.map b/MTC_Adapter/MTC_Adapter/DATA/CONF/CounterList.map
index 55e0c09..064fc1a 100644
--- a/MTC_Adapter/MTC_Adapter/DATA/CONF/CounterList.map
+++ b/MTC_Adapter/MTC_Adapter/DATA/CONF/CounterList.map
@@ -21,12 +21,15 @@
020|VacAct_02_Count |COUNT
021|Lubro_01_Num |COUNT
022|SlittaTastatore_Count |COUNT
-023|ProtMagazzino_01_Count |COUNT
-024|ProtMagazzino_02_Count |COUNT
+023|SlittaMagazzino_01_Count |COUNT
+024|ProtMagazzino_01_Count |COUNT
025|UnOp_01_NumCambiUT |COUNT
026|Axis_01_AccTime |COUNT
027|Axis_02_AccTime |COUNT
028|Axis_03_AccTime |COUNT
029|Axis_04_AccTime |COUNT
030|Axis_05_AccTime |COUNT
-031|Axis_06_AccTime |COUNT
\ No newline at end of file
+031|Axis_06_AccTime |COUNT
+032|Counter_001 |COUNT
+033|Counter_002 |COUNT
+034|Counter_003 |COUNT
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/DATA/CONF/IOT_StringList.map b/MTC_Adapter/MTC_Adapter/DATA/CONF/IOT_StringList.map
index 7e9dfac..4664554 100644
--- a/MTC_Adapter/MTC_Adapter/DATA/CONF/IOT_StringList.map
+++ b/MTC_Adapter/MTC_Adapter/DATA/CONF/IOT_StringList.map
@@ -1,5 +1,5 @@
# Commenti con cancelletto, struttura un variabile per riga, tipo chiave|valore (occhio che il separatore è configurato da .cofig come "testCharSep"); spazi e tabulazioni dovrei trimmarli in acquisizione (qui inseriti per comodità di lettura)
-1 001|IOT_PGMID_A1 |STRING
-2 002|IOT_PGMID_A2 |STRING
-3 003|IOT_PGMID_A3 |STRING
-4 004|IOT_PGMID_A4 |STRING
\ No newline at end of file
+001|IOT_PGMID_A1 |STRING
+002|IOT_PGMID_A2 |STRING
+003|IOT_PGMID_A3 |STRING
+004|IOT_PGMID_A4 |STRING
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/ExtLib/Siemens.Sinumerik.Operate.Services.Wrapper.dll b/MTC_Adapter/MTC_Adapter/ExtLib/Siemens.Sinumerik.Operate.Services.Wrapper.dll
new file mode 100644
index 0000000..b8d54cf
Binary files /dev/null and b/MTC_Adapter/MTC_Adapter/ExtLib/Siemens.Sinumerik.Operate.Services.Wrapper.dll differ
diff --git a/MTC_Adapter/MTC_Adapter/ExtLib/Siemens.Sinumerik.Operate.Services.dll b/MTC_Adapter/MTC_Adapter/ExtLib/Siemens.Sinumerik.Operate.Services.dll
new file mode 100644
index 0000000..f00469d
Binary files /dev/null and b/MTC_Adapter/MTC_Adapter/ExtLib/Siemens.Sinumerik.Operate.Services.dll differ
diff --git a/MTC_Adapter/MTC_Adapter/MTC-Adapter.csproj b/MTC_Adapter/MTC_Adapter/MTC-Adapter.csproj
index 6697bc8..365e857 100644
--- a/MTC_Adapter/MTC_Adapter/MTC-Adapter.csproj
+++ b/MTC_Adapter/MTC_Adapter/MTC-Adapter.csproj
@@ -104,6 +104,10 @@
..\packages\NLog.4.4.4\lib\net45\NLog.dll
True
+
+ False
+ ExtLib\Siemens.Sinumerik.Operate.Services.dll
+
@@ -178,6 +182,8 @@
Designer
+
+
diff --git a/MTC_Adapter/MTC_Adapter/MainForm.Designer.cs b/MTC_Adapter/MTC_Adapter/MainForm.Designer.cs
index dd4688e..1f63910 100644
--- a/MTC_Adapter/MTC_Adapter/MainForm.Designer.cs
+++ b/MTC_Adapter/MTC_Adapter/MainForm.Designer.cs
@@ -143,8 +143,8 @@
this.tpStatus = new System.Windows.Forms.TabPage();
this.gbMonitor = new System.Windows.Forms.GroupBox();
this.lblOutMessage3 = new System.Windows.Forms.Label();
- this.lblOutMessage = new System.Windows.Forms.Label();
this.lblOutMessage2 = new System.Windows.Forms.Label();
+ this.lblOutMessage = new System.Windows.Forms.Label();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.STATUS_ACK_DW3 = new System.Windows.Forms.TextBox();
this.label52 = new System.Windows.Forms.Label();
@@ -1411,8 +1411,8 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.gbMonitor.BackColor = System.Drawing.Color.Black;
this.gbMonitor.Controls.Add(this.lblOutMessage3);
- this.gbMonitor.Controls.Add(this.lblOutMessage);
this.gbMonitor.Controls.Add(this.lblOutMessage2);
+ this.gbMonitor.Controls.Add(this.lblOutMessage);
this.gbMonitor.ForeColor = System.Drawing.SystemColors.Control;
this.gbMonitor.Location = new System.Drawing.Point(0, 266);
this.gbMonitor.Margin = new System.Windows.Forms.Padding(0);
@@ -1425,40 +1425,42 @@
//
// lblOutMessage3
//
+ this.lblOutMessage3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblOutMessage3.AutoSize = true;
- this.lblOutMessage3.Font = new System.Drawing.Font("Arial Narrow", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblOutMessage3.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblOutMessage3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.lblOutMessage3.Location = new System.Drawing.Point(607, 15);
+ this.lblOutMessage3.Location = new System.Drawing.Point(527, 15);
this.lblOutMessage3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblOutMessage3.Name = "lblOutMessage3";
- this.lblOutMessage3.Size = new System.Drawing.Size(17, 16);
+ this.lblOutMessage3.Size = new System.Drawing.Size(16, 15);
this.lblOutMessage3.TabIndex = 62;
this.lblOutMessage3.Text = "...";
//
+ // lblOutMessage2
+ //
+ this.lblOutMessage2.Anchor = System.Windows.Forms.AnchorStyles.Top;
+ this.lblOutMessage2.AutoSize = true;
+ this.lblOutMessage2.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblOutMessage2.ForeColor = System.Drawing.Color.Yellow;
+ this.lblOutMessage2.Location = new System.Drawing.Point(279, 15);
+ this.lblOutMessage2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.lblOutMessage2.Name = "lblOutMessage2";
+ this.lblOutMessage2.Size = new System.Drawing.Size(16, 15);
+ this.lblOutMessage2.TabIndex = 61;
+ this.lblOutMessage2.Text = "...";
+ //
// lblOutMessage
//
this.lblOutMessage.AutoSize = true;
- this.lblOutMessage.Font = new System.Drawing.Font("Arial Narrow", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblOutMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblOutMessage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.lblOutMessage.Location = new System.Drawing.Point(4, 15);
this.lblOutMessage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblOutMessage.Name = "lblOutMessage";
- this.lblOutMessage.Size = new System.Drawing.Size(17, 16);
+ this.lblOutMessage.Size = new System.Drawing.Size(16, 15);
this.lblOutMessage.TabIndex = 60;
this.lblOutMessage.Text = "...";
//
- // lblOutMessage2
- //
- this.lblOutMessage2.AutoSize = true;
- this.lblOutMessage2.Font = new System.Drawing.Font("Arial Narrow", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lblOutMessage2.ForeColor = System.Drawing.Color.Yellow;
- this.lblOutMessage2.Location = new System.Drawing.Point(315, 15);
- this.lblOutMessage2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
- this.lblOutMessage2.Name = "lblOutMessage2";
- this.lblOutMessage2.Size = new System.Drawing.Size(17, 16);
- this.lblOutMessage2.TabIndex = 61;
- this.lblOutMessage2.Text = "...";
- //
// groupBox6
//
this.groupBox6.Controls.Add(this.STATUS_ACK_DW3);
diff --git a/MTC_Adapter/MTC_Adapter/MainForm.resx b/MTC_Adapter/MTC_Adapter/MainForm.resx
index b7d94fe..a8117b7 100644
--- a/MTC_Adapter/MTC_Adapter/MainForm.resx
+++ b/MTC_Adapter/MTC_Adapter/MainForm.resx
@@ -138,6 +138,24 @@
True
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
104, 17
diff --git a/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListFANUC.map b/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListFANUC.map
index 59c12a6..064fc1a 100644
--- a/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListFANUC.map
+++ b/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListFANUC.map
@@ -29,4 +29,7 @@
028|Axis_03_AccTime |COUNT
029|Axis_04_AccTime |COUNT
030|Axis_05_AccTime |COUNT
-031|Axis_06_AccTime |COUNT
\ No newline at end of file
+031|Axis_06_AccTime |COUNT
+032|Counter_001 |COUNT
+033|Counter_002 |COUNT
+034|Counter_003 |COUNT
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListOSAI.map b/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListOSAI.map
index 55e0c09..fd5ce44 100644
--- a/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListOSAI.map
+++ b/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListOSAI.map
@@ -29,4 +29,7 @@
028|Axis_03_AccTime |COUNT
029|Axis_04_AccTime |COUNT
030|Axis_05_AccTime |COUNT
-031|Axis_06_AccTime |COUNT
\ No newline at end of file
+031|Axis_06_AccTime |COUNT
+032|Counter_001 |COUNT
+033|Counter_002 |COUNT
+034|Counter_003 |COUNT
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListSIEMENS.map b/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListSIEMENS.map
index 59c12a6..064fc1a 100644
--- a/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListSIEMENS.map
+++ b/MTC_Adapter/MTC_Adapter/Resources/CMS/CounterListSIEMENS.map
@@ -29,4 +29,7 @@
028|Axis_03_AccTime |COUNT
029|Axis_04_AccTime |COUNT
030|Axis_05_AccTime |COUNT
-031|Axis_06_AccTime |COUNT
\ No newline at end of file
+031|Axis_06_AccTime |COUNT
+032|Counter_001 |COUNT
+033|Counter_002 |COUNT
+034|Counter_003 |COUNT
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/Resources/CMS/FANUC.xml b/MTC_Adapter/MTC_Adapter/Resources/CMS/FANUC.xml
index 9bf8da6..20bfa24 100644
--- a/MTC_Adapter/MTC_Adapter/Resources/CMS/FANUC.xml
+++ b/MTC_Adapter/MTC_Adapter/Resources/CMS/FANUC.xml
@@ -36,18 +36,18 @@
+
+
+ SlittaMagazzino_01
+
+
+
ProtMagazzino_01
-
-
- SlittaMagazzino_
-
-
-
Cooler_01
diff --git a/MTC_Adapter/MTC_Adapter/Resources/CMS/OSAI.xml b/MTC_Adapter/MTC_Adapter/Resources/CMS/OSAI.xml
index a3cdf8c..a97ba3d 100644
--- a/MTC_Adapter/MTC_Adapter/Resources/CMS/OSAI.xml
+++ b/MTC_Adapter/MTC_Adapter/Resources/CMS/OSAI.xml
@@ -36,15 +36,17 @@
+
+
+ SlittaMagazzino_01
+
+
+
ProtMagazzino_01
-
- ProtMagazzino_02
-
-
diff --git a/MTC_Adapter/MTC_Adapter/Resources/CMS/SIEMENS.xml b/MTC_Adapter/MTC_Adapter/Resources/CMS/SIEMENS.xml
index 66f2df4..056e4e8 100644
--- a/MTC_Adapter/MTC_Adapter/Resources/CMS/SIEMENS.xml
+++ b/MTC_Adapter/MTC_Adapter/Resources/CMS/SIEMENS.xml
@@ -36,18 +36,18 @@
+
+
+ SlittaMagazzino_01
+
+
+
ProtMagazzino_01
-
-
- SlittaMagazzino_
-
-
-
Cooler_01
diff --git a/MTC_Adapter/MTC_Adapter/SetupAdapter.Designer.cs b/MTC_Adapter/MTC_Adapter/SetupAdapter.Designer.cs
index 7bd7585..31e0f00 100644
--- a/MTC_Adapter/MTC_Adapter/SetupAdapter.Designer.cs
+++ b/MTC_Adapter/MTC_Adapter/SetupAdapter.Designer.cs
@@ -28,364 +28,397 @@
///
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupAdapter));
- this.txtAdapter = new System.Windows.Forms.TextBox();
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.txtFileName = new System.Windows.Forms.TextBox();
- this.btnSave = new System.Windows.Forms.Button();
- this.btnLoad = new System.Windows.Forms.Button();
- this.label3 = new System.Windows.Forms.Label();
- this.nVacPump = new System.Windows.Forms.TextBox();
- this.label4 = new System.Windows.Forms.Label();
- this.nVacAct = new System.Windows.Forms.TextBox();
- this.label5 = new System.Windows.Forms.Label();
- this.cbTipoAdapt = new System.Windows.Forms.ComboBox();
- this.label6 = new System.Windows.Forms.Label();
- this.nLubro = new System.Windows.Forms.TextBox();
- this.label7 = new System.Windows.Forms.Label();
- this.nCooler = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.nPress = new System.Windows.Forms.TextBox();
- this.label9 = new System.Windows.Forms.Label();
- this.nTempe = new System.Windows.Forms.TextBox();
- this.label10 = new System.Windows.Forms.Label();
- this.nPath = new System.Windows.Forms.TextBox();
- this.label11 = new System.Windows.Forms.Label();
- this.nUnOp = new System.Windows.Forms.TextBox();
- this.label12 = new System.Windows.Forms.Label();
- this.nAssi = new System.Windows.Forms.TextBox();
- this.label13 = new System.Windows.Forms.Label();
- this.nMemArea = new System.Windows.Forms.TextBox();
- this.label14 = new System.Windows.Forms.Label();
- this.nProtMag = new System.Windows.Forms.TextBox();
- this.label15 = new System.Windows.Forms.Label();
- this.nSlittaMag = new System.Windows.Forms.TextBox();
- this.SuspendLayout();
- //
- // txtAdapter
- //
- this.txtAdapter.Location = new System.Drawing.Point(91, 10);
- this.txtAdapter.Name = "txtAdapter";
- this.txtAdapter.Size = new System.Drawing.Size(214, 20);
- this.txtAdapter.TabIndex = 0;
- this.txtAdapter.Text = "CMS_ADAPTER_00";
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(22, 13);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(58, 13);
- this.label1.TabIndex = 1;
- this.label1.Text = "ADAPTER";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(311, 13);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(63, 13);
- this.label2.TabIndex = 3;
- this.label2.Text = "FILE NAME";
- //
- // txtFileName
- //
- this.txtFileName.Location = new System.Drawing.Point(380, 10);
- this.txtFileName.Name = "txtFileName";
- this.txtFileName.Size = new System.Drawing.Size(122, 20);
- this.txtFileName.TabIndex = 2;
- this.txtFileName.Text = "Adapter_ItemList.xml";
- //
- // btnSave
- //
- this.btnSave.Location = new System.Drawing.Point(479, 467);
- this.btnSave.Name = "btnSave";
- this.btnSave.Size = new System.Drawing.Size(201, 38);
- this.btnSave.TabIndex = 4;
- this.btnSave.Text = "SAVE CONFIGURATION";
- this.btnSave.UseVisualStyleBackColor = true;
- this.btnSave.Click += new System.EventHandler(this.btnCreateFile_Click);
- //
- // btnLoad
- //
- this.btnLoad.Location = new System.Drawing.Point(16, 467);
- this.btnLoad.Name = "btnLoad";
- this.btnLoad.Size = new System.Drawing.Size(201, 38);
- this.btnLoad.TabIndex = 5;
- this.btnLoad.Text = "LOAD CONFIGURATION";
- this.btnLoad.UseVisualStyleBackColor = true;
- this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(10, 39);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(75, 13);
- this.label3.TabIndex = 7;
- this.label3.Text = "n° VAC PUMP";
- //
- // nVacPump
- //
- this.nVacPump.Location = new System.Drawing.Point(91, 36);
- this.nVacPump.Name = "nVacPump";
- this.nVacPump.Size = new System.Drawing.Size(33, 20);
- this.nVacPump.TabIndex = 6;
- this.nVacPump.Text = "1";
- //
- // label4
- //
- this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(176, 39);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(60, 13);
- this.label4.TabIndex = 9;
- this.label4.Text = "n° VAC Act";
- //
- // nVacAct
- //
- this.nVacAct.Location = new System.Drawing.Point(242, 36);
- this.nVacAct.Name = "nVacAct";
- this.nVacAct.Size = new System.Drawing.Size(33, 20);
- this.nVacAct.TabIndex = 8;
- this.nVacAct.Text = "2";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(517, 13);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(32, 13);
- this.label5.TabIndex = 10;
- this.label5.Text = "TIPO";
- //
- // cbTipoAdapt
- //
- this.cbTipoAdapt.FormattingEnabled = true;
- this.cbTipoAdapt.Items.AddRange(new object[] {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetupAdapter));
+ this.txtAdapter = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.txtFileName = new System.Windows.Forms.TextBox();
+ this.btnSave = new System.Windows.Forms.Button();
+ this.btnLoad = new System.Windows.Forms.Button();
+ this.label3 = new System.Windows.Forms.Label();
+ this.nVacPump = new System.Windows.Forms.TextBox();
+ this.label4 = new System.Windows.Forms.Label();
+ this.nVacAct = new System.Windows.Forms.TextBox();
+ this.label5 = new System.Windows.Forms.Label();
+ this.cbTipoAdapt = new System.Windows.Forms.ComboBox();
+ this.label6 = new System.Windows.Forms.Label();
+ this.nLubro = new System.Windows.Forms.TextBox();
+ this.label7 = new System.Windows.Forms.Label();
+ this.nCooler = new System.Windows.Forms.TextBox();
+ this.label8 = new System.Windows.Forms.Label();
+ this.nPress = new System.Windows.Forms.TextBox();
+ this.label9 = new System.Windows.Forms.Label();
+ this.nTempe = new System.Windows.Forms.TextBox();
+ this.label10 = new System.Windows.Forms.Label();
+ this.nPath = new System.Windows.Forms.TextBox();
+ this.label11 = new System.Windows.Forms.Label();
+ this.nUnOp = new System.Windows.Forms.TextBox();
+ this.label12 = new System.Windows.Forms.Label();
+ this.nAssi = new System.Windows.Forms.TextBox();
+ this.label13 = new System.Windows.Forms.Label();
+ this.nMemArea = new System.Windows.Forms.TextBox();
+ this.label14 = new System.Windows.Forms.Label();
+ this.nProtMag = new System.Windows.Forms.TextBox();
+ this.label15 = new System.Windows.Forms.Label();
+ this.nSlittaMag = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // txtAdapter
+ //
+ this.txtAdapter.Location = new System.Drawing.Point(121, 12);
+ this.txtAdapter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.txtAdapter.Name = "txtAdapter";
+ this.txtAdapter.Size = new System.Drawing.Size(284, 22);
+ this.txtAdapter.TabIndex = 0;
+ this.txtAdapter.Text = "CMS_ADAPTER_00";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(29, 16);
+ this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(73, 17);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "ADAPTER";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(415, 16);
+ this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(79, 17);
+ this.label2.TabIndex = 3;
+ this.label2.Text = "FILE NAME";
+ //
+ // txtFileName
+ //
+ this.txtFileName.Location = new System.Drawing.Point(507, 12);
+ this.txtFileName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.txtFileName.Name = "txtFileName";
+ this.txtFileName.Size = new System.Drawing.Size(161, 22);
+ this.txtFileName.TabIndex = 2;
+ this.txtFileName.Text = "Adapter_ItemList.xml";
+ //
+ // btnSave
+ //
+ this.btnSave.Location = new System.Drawing.Point(639, 575);
+ this.btnSave.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.btnSave.Name = "btnSave";
+ this.btnSave.Size = new System.Drawing.Size(268, 47);
+ this.btnSave.TabIndex = 4;
+ this.btnSave.Text = "SAVE CONFIGURATION";
+ this.btnSave.UseVisualStyleBackColor = true;
+ this.btnSave.Click += new System.EventHandler(this.btnCreateFile_Click);
+ //
+ // btnLoad
+ //
+ this.btnLoad.Location = new System.Drawing.Point(21, 575);
+ this.btnLoad.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.btnLoad.Name = "btnLoad";
+ this.btnLoad.Size = new System.Drawing.Size(268, 47);
+ this.btnLoad.TabIndex = 5;
+ this.btnLoad.Text = "LOAD CONFIGURATION";
+ this.btnLoad.UseVisualStyleBackColor = true;
+ this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click);
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(13, 48);
+ this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(96, 17);
+ this.label3.TabIndex = 7;
+ this.label3.Text = "n° VAC PUMP";
+ //
+ // nVacPump
+ //
+ this.nVacPump.Location = new System.Drawing.Point(121, 44);
+ this.nVacPump.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nVacPump.Name = "nVacPump";
+ this.nVacPump.Size = new System.Drawing.Size(43, 22);
+ this.nVacPump.TabIndex = 6;
+ this.nVacPump.Text = "1";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(235, 48);
+ this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(77, 17);
+ this.label4.TabIndex = 9;
+ this.label4.Text = "n° VAC Act";
+ //
+ // nVacAct
+ //
+ this.nVacAct.Location = new System.Drawing.Point(323, 44);
+ this.nVacAct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nVacAct.Name = "nVacAct";
+ this.nVacAct.Size = new System.Drawing.Size(43, 22);
+ this.nVacAct.TabIndex = 8;
+ this.nVacAct.Text = "2";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(689, 16);
+ this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(40, 17);
+ this.label5.TabIndex = 10;
+ this.label5.Text = "TIPO";
+ //
+ // cbTipoAdapt
+ //
+ this.cbTipoAdapt.FormattingEnabled = true;
+ this.cbTipoAdapt.Items.AddRange(new object[] {
"DEMO",
"ESAGV",
"FANUC",
"OSAI",
"SIEMENS"});
- this.cbTipoAdapt.Location = new System.Drawing.Point(555, 10);
- this.cbTipoAdapt.Name = "cbTipoAdapt";
- this.cbTipoAdapt.Size = new System.Drawing.Size(121, 21);
- this.cbTipoAdapt.TabIndex = 11;
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(314, 39);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(57, 13);
- this.label6.TabIndex = 13;
- this.label6.Text = "n° LUBRO";
- //
- // nLubro
- //
- this.nLubro.Location = new System.Drawing.Point(380, 36);
- this.nLubro.Name = "nLubro";
- this.nLubro.Size = new System.Drawing.Size(33, 20);
- this.nLubro.TabIndex = 12;
- this.nLubro.Text = "1";
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(473, 39);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(64, 13);
- this.label7.TabIndex = 15;
- this.label7.Text = "n° COOLER";
- //
- // nCooler
- //
- this.nCooler.Location = new System.Drawing.Point(539, 36);
- this.nCooler.Name = "nCooler";
- this.nCooler.Size = new System.Drawing.Size(33, 20);
- this.nCooler.TabIndex = 14;
- this.nCooler.Text = "2";
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Location = new System.Drawing.Point(25, 65);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(56, 13);
- this.label8.TabIndex = 17;
- this.label8.Text = "n° PRESS";
- //
- // nPress
- //
- this.nPress.Location = new System.Drawing.Point(91, 62);
- this.nPress.Name = "nPress";
- this.nPress.Size = new System.Drawing.Size(33, 20);
- this.nPress.TabIndex = 16;
- this.nPress.Text = "1";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Location = new System.Drawing.Point(176, 65);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(50, 13);
- this.label9.TabIndex = 19;
- this.label9.Text = "n° TEMP";
- //
- // nTempe
- //
- this.nTempe.Location = new System.Drawing.Point(242, 62);
- this.nTempe.Name = "nTempe";
- this.nTempe.Size = new System.Drawing.Size(33, 20);
- this.nTempe.TabIndex = 18;
- this.nTempe.Text = "1";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(314, 65);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(49, 13);
- this.label10.TabIndex = 21;
- this.label10.Text = "n° PATH";
- //
- // nPath
- //
- this.nPath.Location = new System.Drawing.Point(380, 62);
- this.nPath.Name = "nPath";
- this.nPath.Size = new System.Drawing.Size(33, 20);
- this.nPath.TabIndex = 20;
- this.nPath.Text = "1";
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Location = new System.Drawing.Point(473, 65);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(52, 13);
- this.label11.TabIndex = 23;
- this.label11.Text = "n° Un OP";
- //
- // nUnOp
- //
- this.nUnOp.Location = new System.Drawing.Point(539, 62);
- this.nUnOp.Name = "nUnOp";
- this.nUnOp.Size = new System.Drawing.Size(33, 20);
- this.nUnOp.TabIndex = 22;
- this.nUnOp.Text = "1";
- //
- // label12
- //
- this.label12.AutoSize = true;
- this.label12.Location = new System.Drawing.Point(25, 91);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(39, 13);
- this.label12.TabIndex = 25;
- this.label12.Text = "n° Assi";
- //
- // nAssi
- //
- this.nAssi.Location = new System.Drawing.Point(91, 88);
- this.nAssi.Name = "nAssi";
- this.nAssi.Size = new System.Drawing.Size(33, 20);
- this.nAssi.TabIndex = 24;
- this.nAssi.Text = "1";
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Location = new System.Drawing.Point(176, 94);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(65, 13);
- this.label13.TabIndex = 27;
- this.label13.Text = "n° MemArea";
- //
- // nMemArea
- //
- this.nMemArea.Location = new System.Drawing.Point(242, 91);
- this.nMemArea.Name = "nMemArea";
- this.nMemArea.Size = new System.Drawing.Size(33, 20);
- this.nMemArea.TabIndex = 26;
- this.nMemArea.Text = "1";
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Location = new System.Drawing.Point(473, 94);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(63, 13);
- this.label14.TabIndex = 31;
- this.label14.Text = "n° Prot Mag";
- //
- // nProtMag
- //
- this.nProtMag.Location = new System.Drawing.Point(539, 91);
- this.nProtMag.Name = "nProtMag";
- this.nProtMag.Size = new System.Drawing.Size(33, 20);
- this.nProtMag.TabIndex = 30;
- this.nProtMag.Text = "0";
- //
- // label15
- //
- this.label15.AutoSize = true;
- this.label15.Location = new System.Drawing.Point(314, 94);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(55, 13);
- this.label15.TabIndex = 29;
- this.label15.Text = "n° Sli Mag";
- //
- // nSlittaMag
- //
- this.nSlittaMag.Location = new System.Drawing.Point(380, 91);
- this.nSlittaMag.Name = "nSlittaMag";
- this.nSlittaMag.Size = new System.Drawing.Size(33, 20);
- this.nSlittaMag.TabIndex = 28;
- this.nSlittaMag.Text = "0";
- //
- // SetupAdapter
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(692, 517);
- this.Controls.Add(this.label14);
- this.Controls.Add(this.nProtMag);
- this.Controls.Add(this.label15);
- this.Controls.Add(this.nSlittaMag);
- this.Controls.Add(this.label13);
- this.Controls.Add(this.nMemArea);
- this.Controls.Add(this.label12);
- this.Controls.Add(this.nAssi);
- this.Controls.Add(this.label11);
- this.Controls.Add(this.nUnOp);
- this.Controls.Add(this.label10);
- this.Controls.Add(this.nPath);
- this.Controls.Add(this.label9);
- this.Controls.Add(this.nTempe);
- this.Controls.Add(this.label8);
- this.Controls.Add(this.nPress);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.nCooler);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.nLubro);
- this.Controls.Add(this.cbTipoAdapt);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.nVacAct);
- this.Controls.Add(this.label3);
- this.Controls.Add(this.nVacPump);
- this.Controls.Add(this.btnLoad);
- this.Controls.Add(this.btnSave);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.txtFileName);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.txtAdapter);
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.Name = "SetupAdapter";
- this.Text = "Adapter Setup Manager";
- this.ResumeLayout(false);
- this.PerformLayout();
+ this.cbTipoAdapt.Location = new System.Drawing.Point(740, 12);
+ this.cbTipoAdapt.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.cbTipoAdapt.Name = "cbTipoAdapt";
+ this.cbTipoAdapt.Size = new System.Drawing.Size(160, 24);
+ this.cbTipoAdapt.TabIndex = 11;
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(419, 48);
+ this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(74, 17);
+ this.label6.TabIndex = 13;
+ this.label6.Text = "n° LUBRO";
+ //
+ // nLubro
+ //
+ this.nLubro.Location = new System.Drawing.Point(507, 44);
+ this.nLubro.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nLubro.Name = "nLubro";
+ this.nLubro.Size = new System.Drawing.Size(43, 22);
+ this.nLubro.TabIndex = 12;
+ this.nLubro.Text = "1";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.Location = new System.Drawing.Point(631, 48);
+ this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(84, 17);
+ this.label7.TabIndex = 15;
+ this.label7.Text = "n° COOLER";
+ //
+ // nCooler
+ //
+ this.nCooler.Location = new System.Drawing.Point(719, 44);
+ this.nCooler.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nCooler.Name = "nCooler";
+ this.nCooler.Size = new System.Drawing.Size(43, 22);
+ this.nCooler.TabIndex = 14;
+ this.nCooler.Text = "2";
+ //
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(33, 80);
+ this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(72, 17);
+ this.label8.TabIndex = 17;
+ this.label8.Text = "n° PRESS";
+ //
+ // nPress
+ //
+ this.nPress.Location = new System.Drawing.Point(121, 76);
+ this.nPress.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nPress.Name = "nPress";
+ this.nPress.Size = new System.Drawing.Size(43, 22);
+ this.nPress.TabIndex = 16;
+ this.nPress.Text = "1";
+ //
+ // label9
+ //
+ this.label9.AutoSize = true;
+ this.label9.Location = new System.Drawing.Point(235, 80);
+ this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(64, 17);
+ this.label9.TabIndex = 19;
+ this.label9.Text = "n° TEMP";
+ //
+ // nTempe
+ //
+ this.nTempe.Location = new System.Drawing.Point(323, 76);
+ this.nTempe.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nTempe.Name = "nTempe";
+ this.nTempe.Size = new System.Drawing.Size(43, 22);
+ this.nTempe.TabIndex = 18;
+ this.nTempe.Text = "1";
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(419, 80);
+ this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(63, 17);
+ this.label10.TabIndex = 21;
+ this.label10.Text = "n° PATH";
+ //
+ // nPath
+ //
+ this.nPath.Location = new System.Drawing.Point(507, 76);
+ this.nPath.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nPath.Name = "nPath";
+ this.nPath.Size = new System.Drawing.Size(43, 22);
+ this.nPath.TabIndex = 20;
+ this.nPath.Text = "1";
+ //
+ // label11
+ //
+ this.label11.AutoSize = true;
+ this.label11.Location = new System.Drawing.Point(631, 80);
+ this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(68, 17);
+ this.label11.TabIndex = 23;
+ this.label11.Text = "n° Un OP";
+ //
+ // nUnOp
+ //
+ this.nUnOp.Location = new System.Drawing.Point(719, 76);
+ this.nUnOp.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nUnOp.Name = "nUnOp";
+ this.nUnOp.Size = new System.Drawing.Size(43, 22);
+ this.nUnOp.TabIndex = 22;
+ this.nUnOp.Text = "1";
+ //
+ // label12
+ //
+ this.label12.AutoSize = true;
+ this.label12.Location = new System.Drawing.Point(33, 112);
+ this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label12.Name = "label12";
+ this.label12.Size = new System.Drawing.Size(52, 17);
+ this.label12.TabIndex = 25;
+ this.label12.Text = "n° Assi";
+ //
+ // nAssi
+ //
+ this.nAssi.Location = new System.Drawing.Point(121, 108);
+ this.nAssi.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nAssi.Name = "nAssi";
+ this.nAssi.Size = new System.Drawing.Size(43, 22);
+ this.nAssi.TabIndex = 24;
+ this.nAssi.Text = "1";
+ //
+ // label13
+ //
+ this.label13.AutoSize = true;
+ this.label13.Location = new System.Drawing.Point(235, 116);
+ this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(86, 17);
+ this.label13.TabIndex = 27;
+ this.label13.Text = "n° MemArea";
+ //
+ // nMemArea
+ //
+ this.nMemArea.Location = new System.Drawing.Point(323, 112);
+ this.nMemArea.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nMemArea.Name = "nMemArea";
+ this.nMemArea.Size = new System.Drawing.Size(43, 22);
+ this.nMemArea.TabIndex = 26;
+ this.nMemArea.Text = "1";
+ //
+ // label14
+ //
+ this.label14.AutoSize = true;
+ this.label14.Location = new System.Drawing.Point(631, 116);
+ this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(83, 17);
+ this.label14.TabIndex = 31;
+ this.label14.Text = "n° Prot Mag";
+ //
+ // nProtMag
+ //
+ this.nProtMag.Location = new System.Drawing.Point(719, 112);
+ this.nProtMag.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nProtMag.Name = "nProtMag";
+ this.nProtMag.Size = new System.Drawing.Size(43, 22);
+ this.nProtMag.TabIndex = 30;
+ this.nProtMag.Text = "0";
+ //
+ // label15
+ //
+ this.label15.AutoSize = true;
+ this.label15.Location = new System.Drawing.Point(419, 116);
+ this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(72, 17);
+ this.label15.TabIndex = 29;
+ this.label15.Text = "n° Sli Mag";
+ //
+ // nSlittaMag
+ //
+ this.nSlittaMag.Location = new System.Drawing.Point(507, 112);
+ this.nSlittaMag.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.nSlittaMag.Name = "nSlittaMag";
+ this.nSlittaMag.Size = new System.Drawing.Size(43, 22);
+ this.nSlittaMag.TabIndex = 28;
+ this.nSlittaMag.Text = "0";
+ //
+ // SetupAdapter
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(923, 636);
+ this.Controls.Add(this.label14);
+ this.Controls.Add(this.nProtMag);
+ this.Controls.Add(this.label15);
+ this.Controls.Add(this.nSlittaMag);
+ this.Controls.Add(this.label13);
+ this.Controls.Add(this.nMemArea);
+ this.Controls.Add(this.label12);
+ this.Controls.Add(this.nAssi);
+ this.Controls.Add(this.label11);
+ this.Controls.Add(this.nUnOp);
+ this.Controls.Add(this.label10);
+ this.Controls.Add(this.nPath);
+ this.Controls.Add(this.label9);
+ this.Controls.Add(this.nTempe);
+ this.Controls.Add(this.label8);
+ this.Controls.Add(this.nPress);
+ this.Controls.Add(this.label7);
+ this.Controls.Add(this.nCooler);
+ this.Controls.Add(this.label6);
+ this.Controls.Add(this.nLubro);
+ this.Controls.Add(this.cbTipoAdapt);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.label4);
+ this.Controls.Add(this.nVacAct);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.nVacPump);
+ this.Controls.Add(this.btnLoad);
+ this.Controls.Add(this.btnSave);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.txtFileName);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.txtAdapter);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+ this.Name = "SetupAdapter";
+ this.Text = "Adapter Setup Manager";
+ this.ResumeLayout(false);
+ this.PerformLayout();
}
@@ -423,5 +456,5 @@
private System.Windows.Forms.TextBox nProtMag;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox nSlittaMag;
- }
+ }
}
\ No newline at end of file
diff --git a/MTC_Adapter/MTC_Adapter/SetupAdapter.cs b/MTC_Adapter/MTC_Adapter/SetupAdapter.cs
index c6b647c..f361855 100644
--- a/MTC_Adapter/MTC_Adapter/SetupAdapter.cs
+++ b/MTC_Adapter/MTC_Adapter/SetupAdapter.cs
@@ -6,543 +6,543 @@ using System.Windows.Forms;
namespace MTC_Adapter
{
- public partial class SetupAdapter : Form
+ public partial class SetupAdapter : Form
+ {
+ public SetupAdapter()
{
- public SetupAdapter()
- {
- InitializeComponent();
+ InitializeComponent();
- // fix icon!
- this.Icon = Icon.ExtractAssociatedIcon(defIconFilePath);
- }
- protected string defIconFilePath
- {
- get
- {
- return string.Format(@"{0}\MTCA.ico", utils.resxDir);
- }
- }
- ///
- /// Percorso file completo
- ///
- protected string filePath
- {
- get
- {
- return string.Format("{0}/{1}", utils.CRS("dataConfPath"), txtFileName.Text);
- }
- }
-
- protected int numVacPump
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nVacPump.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nVacPump.Text = value.ToString();
- }
- }
- protected int numVacAct
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nVacAct.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nVacAct.Text = value.ToString();
- }
- }
- protected int numLubro
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nLubro.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nLubro.Text = value.ToString();
- }
- }
- protected int numCooler
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nCooler.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nCooler.Text = value.ToString();
- }
- }
- protected int numPress
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nPress.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nPress.Text = value.ToString();
- }
- }
- protected int numTemp
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nTempe.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nTempe.Text = value.ToString();
- }
- }
- protected int numPath
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nPath.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nPath.Text = value.ToString();
- }
- }
- protected int numUnOp
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nUnOp.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nUnOp.Text = value.ToString();
- }
- }
- protected int numAxis
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nAssi.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nAssi.Text = value.ToString();
- }
- }
- protected int numMemArea
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nMemArea.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nMemArea.Text = value.ToString();
- }
- }
- protected int numSlittaMag
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nSlittaMag.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nSlittaMag.Text = value.ToString();
- }
- }
- protected int numProtMag
- {
- get
- {
- int answ = 0;
- try
- {
- answ = Convert.ToInt32(nProtMag.Text);
- }
- catch
- { }
- return answ;
- }
- set
- {
- nProtMag.Text = value.ToString();
- }
- }
-
- protected element[] oAxisLoad { get; set; }
-
- private void btnCreateFile_Click(object sender, EventArgs e)
- {
- // creo un nuovo file adapter...
- AdapterConf c = new AdapterConf();
- // nome da txtbox, vers 1
- c.NomeAdapt = txtAdapter.Text;
- c.Version = 1;
- // tipo da selettore
- string valTipo = "";
- try
- {
- valTipo = cbTipoAdapt.SelectedItem.ToString().ToUpper();
- }
- catch
- {
- valTipo = cbTipoAdapt.SelectedText;
- }
- switch (valTipo)
- {
- case "FANUC":
- c.TipoAdapt = tipoAdapter.FANUC;
- break;
- case "OSAI":
- c.TipoAdapt = tipoAdapter.OSAI;
- break;
- case "SIEMENS":
- c.TipoAdapt = tipoAdapter.SIEMENS;
- break;
- case "HMI-ESA":
- case "HMI_ESA":
- case "ESAGV":
- c.TipoAdapt = tipoAdapter.ESAGV;
- break;
- case "DEMO":
- default:
- c.TipoAdapt = tipoAdapter.DEMO;
- break;
- }
-
- // init lista parametri
- List> listaDR;
-
- // MemArea
- if (numMemArea > 0)
- {
- // creo elementi richiesti
- element[] MemArea = new element[numMemArea];
- // ciclo x istanziare!
- for (int i = 0; i < numMemArea; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- MemArea[i] = new element(string.Format("MemArea_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.MemArea = MemArea;
- }
-
- // VAC PUMP
- if (numVacPump > 0)
- {
- // creo elementi richiesti
- element[] VacuumPump = new element[numVacPump];
- // ciclo x istanziare!
- for (int i = 0; i < numVacPump; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- VacuumPump[i] = new element(string.Format("VacPump_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.VacuumPump = VacuumPump;
- }
-
- // VACUUM ACT
- if (numVacAct > 0)
- {
- // creo elementi richiesti
- element[] VacuumAct = new element[numVacAct];
- // ciclo x istanziare!
- for (int i = 0; i < numVacAct; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- VacuumAct[i] = new element(string.Format("VacAct_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.VacuumAct = VacuumAct;
- }
-
- // LUBRO
- if (numLubro > 0)
- {
- // creo elementi richiesti
- element[] Lubro = new element[numLubro];
- // ciclo x istanziare!
- for (int i = 0; i < numLubro; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- Lubro[i] = new element(string.Format("Lubro_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.Lubro = Lubro;
- }
-
- // SlittaMag
- if (numSlittaMag > 0)
- {
- // creo elementi richiesti
- element[] SlittaMag = new element[numSlittaMag];
- // ciclo x istanziare!
- for (int i = 0; i < numSlittaMag; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- SlittaMag[i] = new element(string.Format("SlittaMagazzino_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.SlittaMag = SlittaMag;
- }
-
- // ProtMag
- if (numProtMag > 0)
- {
- // creo elementi richiesti
- element[] ProtMag = new element[numProtMag];
- // ciclo x istanziare!
- for (int i = 0; i < numProtMag; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- ProtMag[i] = new element(string.Format("ProtMagazzino_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.ProtMag = ProtMag;
- }
-
- // COOLER
- if (numCooler > 0)
- {
- // creo elementi richiesti
- element[] Cooler = new element[numCooler];
- // ciclo x istanziare!
- for (int i = 0; i < numCooler; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- Cooler[i] = new element(string.Format("Cooler_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.Cooler = Cooler;
- }
-
- // PRESS
- if (numPress > 0)
- {
- // creo elementi richiesti
- element[] Press = new element[numPress];
- // ciclo x istanziare!
- for (int i = 0; i < numPress; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- Press[i] = new element(string.Format("Press_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.Press = Press;
- }
-
- // TEMPERATURE
- if (numTemp > 0)
- {
- // creo elementi richiesti
- element[] Temp = new element[numTemp];
- // ciclo x istanziare!
- for (int i = 0; i < numTemp; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- Temp[i] = new element(string.Format("Temp_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.Temp = Temp;
- }
-
- // PATH
- if (numPath > 0)
- {
- // creo elementi richiesti
- element[] Path = new element[numPath];
- // ciclo x istanziare!
- for (int i = 0; i < numPath; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- Path[i] = new element(string.Format("Path_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.Path = Path;
- }
-
- // UNITA OPERATRICI
- if (numUnOp > 0)
- {
- // creo elementi richiesti
- element[] UnOp = new element[numUnOp];
- // ciclo x istanziare!
- for (int i = 0; i < numUnOp; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- UnOp[i] = new element(string.Format("UnOp_{0:00}", i + 1), listaDR);
- }
- // salvo oggetto
- c.UnOp = UnOp;
- }
-
- // ASSI
- if (numAxis > 0)
- {
- // creo elementi richiesti
- element[] newAxis = new element[numAxis];
- // ciclo x istanziare!
- for (int i = 0; i < numAxis; i++)
- {
- // inizializzo list x parametri
- listaDR = new List>();
- // se ho un vettore di assi uso i valori già letti..
- if (oAxisLoad != null && oAxisLoad.Length > 0 && i < oAxisLoad.Length)
- {
- newAxis[i] = oAxisLoad[i];
- // se non ho tutto aggiungo...
- if (newAxis[i].dataRefList.Count < 2)
- {
- // copio lista attuale
- listaDR = newAxis[i].dataRefList;
- // in base a cosa manca aggiunto...
- if (listaDR.Count == 0)
- {
- // aggiungo tutto con valori default
- listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Type", i + 1), "LINEAR"));
- listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Grp", i + 1), "00"));
- newAxis[i] = new element(string.Format("Axis_{0:00}", i + 1), listaDR);
- }
- else if (listaDR.Count == 1)
- {
- // aggiungo solo GRP con valori default, IPOTIZZO di avere solo type...
- listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Grp", i + 1), "00"));
- newAxis[i] = new element(string.Format("Axis_{0:00}", i + 1), listaDR);
- }
- }
- }
- else
- {
- // altrimenti popolo con valori default
- listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Type", i + 1), "LINEAR"));
- listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Grp", i + 1), "00"));
- newAxis[i] = new element(string.Format("Axis_{0:00}", i + 1), listaDR);
- }
- }
- // salvo oggetto
- c.Axis = newAxis;
- }
-
- // Serializzo oggetto conf su file
- AdapterConf.Serialize(filePath, c);
- }
-
- private void btnLoad_Click(object sender, EventArgs e)
- {
- // Read the configuration object from a file
- AdapterConf objLoad = AdapterConf.Deserialize(filePath);
-
- txtAdapter.Text = objLoad.NomeAdapt;
- cbTipoAdapt.SelectedText = objLoad.TipoAdapt.ToString();
- // carico valori da file....
- numVacPump = objLoad.nVacuumPump;
- numVacAct = objLoad.nVacuumAct;
- numLubro = objLoad.nLubro;
- numCooler = objLoad.nCooler;
- numPress = objLoad.nPress;
- numTemp = objLoad.nTemp;
- numPath = objLoad.nPath;
- numUnOp = objLoad.nUnOp;
- numAxis = objLoad.nAxis;
- numMemArea = objLoad.nMemArea;
- numSlittaMag = objLoad.nSlittaMag;
- numProtMag = objLoad.nProtMag;
- // salvo assi correnti...
- oAxisLoad = objLoad.Axis;
- }
+ // fix icon!
+ this.Icon = Icon.ExtractAssociatedIcon(defIconFilePath);
}
+ protected string defIconFilePath
+ {
+ get
+ {
+ return string.Format(@"{0}\MTCA.ico", utils.resxDir);
+ }
+ }
+ ///
+ /// Percorso file completo
+ ///
+ protected string filePath
+ {
+ get
+ {
+ return string.Format("{0}/{1}", utils.CRS("dataConfPath"), txtFileName.Text);
+ }
+ }
+
+ protected int numVacPump
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nVacPump.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nVacPump.Text = value.ToString();
+ }
+ }
+ protected int numVacAct
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nVacAct.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nVacAct.Text = value.ToString();
+ }
+ }
+ protected int numLubro
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nLubro.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nLubro.Text = value.ToString();
+ }
+ }
+ protected int numCooler
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nCooler.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nCooler.Text = value.ToString();
+ }
+ }
+ protected int numPress
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nPress.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nPress.Text = value.ToString();
+ }
+ }
+ protected int numTemp
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nTempe.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nTempe.Text = value.ToString();
+ }
+ }
+ protected int numPath
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nPath.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nPath.Text = value.ToString();
+ }
+ }
+ protected int numUnOp
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nUnOp.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nUnOp.Text = value.ToString();
+ }
+ }
+ protected int numAxis
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nAssi.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nAssi.Text = value.ToString();
+ }
+ }
+ protected int numMemArea
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nMemArea.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nMemArea.Text = value.ToString();
+ }
+ }
+ protected int numSlittaMag
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nSlittaMag.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nSlittaMag.Text = value.ToString();
+ }
+ }
+ protected int numProtMag
+ {
+ get
+ {
+ int answ = 0;
+ try
+ {
+ answ = Convert.ToInt32(nProtMag.Text);
+ }
+ catch
+ { }
+ return answ;
+ }
+ set
+ {
+ nProtMag.Text = value.ToString();
+ }
+ }
+
+ protected element[] oAxisLoad { get; set; }
+
+ private void btnCreateFile_Click(object sender, EventArgs e)
+ {
+ // creo un nuovo file adapter...
+ AdapterConf c = new AdapterConf();
+ // nome da txtbox, vers 1
+ c.NomeAdapt = txtAdapter.Text;
+ c.Version = 1;
+ // tipo da selettore
+ string valTipo = "";
+ try
+ {
+ valTipo = cbTipoAdapt.SelectedItem.ToString().ToUpper();
+ }
+ catch
+ {
+ valTipo = cbTipoAdapt.SelectedText;
+ }
+ switch (valTipo)
+ {
+ case "FANUC":
+ c.TipoAdapt = tipoAdapter.FANUC;
+ break;
+ case "OSAI":
+ c.TipoAdapt = tipoAdapter.OSAI;
+ break;
+ case "SIEMENS":
+ c.TipoAdapt = tipoAdapter.SIEMENS;
+ break;
+ case "HMI-ESA":
+ case "HMI_ESA":
+ case "ESAGV":
+ c.TipoAdapt = tipoAdapter.ESAGV;
+ break;
+ case "DEMO":
+ default:
+ c.TipoAdapt = tipoAdapter.DEMO;
+ break;
+ }
+
+ // init lista parametri
+ List> listaDR;
+
+ // MemArea
+ if (numMemArea > 0)
+ {
+ // creo elementi richiesti
+ element[] MemArea = new element[numMemArea];
+ // ciclo x istanziare!
+ for (int i = 0; i < numMemArea; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ MemArea[i] = new element(string.Format("MemArea_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.MemArea = MemArea;
+ }
+
+ // VAC PUMP
+ if (numVacPump > 0)
+ {
+ // creo elementi richiesti
+ element[] VacuumPump = new element[numVacPump];
+ // ciclo x istanziare!
+ for (int i = 0; i < numVacPump; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ VacuumPump[i] = new element(string.Format("VacPump_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.VacuumPump = VacuumPump;
+ }
+
+ // VACUUM ACT
+ if (numVacAct > 0)
+ {
+ // creo elementi richiesti
+ element[] VacuumAct = new element[numVacAct];
+ // ciclo x istanziare!
+ for (int i = 0; i < numVacAct; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ VacuumAct[i] = new element(string.Format("VacAct_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.VacuumAct = VacuumAct;
+ }
+
+ // LUBRO
+ if (numLubro > 0)
+ {
+ // creo elementi richiesti
+ element[] Lubro = new element[numLubro];
+ // ciclo x istanziare!
+ for (int i = 0; i < numLubro; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ Lubro[i] = new element(string.Format("Lubro_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.Lubro = Lubro;
+ }
+
+ // SlittaMag
+ if (numSlittaMag > 0)
+ {
+ // creo elementi richiesti
+ element[] SlittaMag = new element[numSlittaMag];
+ // ciclo x istanziare!
+ for (int i = 0; i < numSlittaMag; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ SlittaMag[i] = new element(string.Format("SlittaMagazzino_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.SlittaMag = SlittaMag;
+ }
+
+ // ProtMag
+ if (numProtMag > 0)
+ {
+ // creo elementi richiesti
+ element[] ProtMag = new element[numProtMag];
+ // ciclo x istanziare!
+ for (int i = 0; i < numProtMag; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ ProtMag[i] = new element(string.Format("ProtMagazzino_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.ProtMag = ProtMag;
+ }
+
+ // COOLER
+ if (numCooler > 0)
+ {
+ // creo elementi richiesti
+ element[] Cooler = new element[numCooler];
+ // ciclo x istanziare!
+ for (int i = 0; i < numCooler; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ Cooler[i] = new element(string.Format("Cooler_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.Cooler = Cooler;
+ }
+
+ // PRESS
+ if (numPress > 0)
+ {
+ // creo elementi richiesti
+ element[] Press = new element[numPress];
+ // ciclo x istanziare!
+ for (int i = 0; i < numPress; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ Press[i] = new element(string.Format("Press_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.Press = Press;
+ }
+
+ // TEMPERATURE
+ if (numTemp > 0)
+ {
+ // creo elementi richiesti
+ element[] Temp = new element[numTemp];
+ // ciclo x istanziare!
+ for (int i = 0; i < numTemp; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ Temp[i] = new element(string.Format("Temp_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.Temp = Temp;
+ }
+
+ // PATH
+ if (numPath > 0)
+ {
+ // creo elementi richiesti
+ element[] Path = new element[numPath];
+ // ciclo x istanziare!
+ for (int i = 0; i < numPath; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ Path[i] = new element(string.Format("Path_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.Path = Path;
+ }
+
+ // UNITA OPERATRICI
+ if (numUnOp > 0)
+ {
+ // creo elementi richiesti
+ element[] UnOp = new element[numUnOp];
+ // ciclo x istanziare!
+ for (int i = 0; i < numUnOp; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ UnOp[i] = new element(string.Format("UnOp_{0:00}", i + 1), listaDR);
+ }
+ // salvo oggetto
+ c.UnOp = UnOp;
+ }
+
+ // ASSI
+ if (numAxis > 0)
+ {
+ // creo elementi richiesti
+ element[] newAxis = new element[numAxis];
+ // ciclo x istanziare!
+ for (int i = 0; i < numAxis; i++)
+ {
+ // inizializzo list x parametri
+ listaDR = new List>();
+ // se ho un vettore di assi uso i valori già letti..
+ if (oAxisLoad != null && oAxisLoad.Length > 0 && i < oAxisLoad.Length)
+ {
+ newAxis[i] = oAxisLoad[i];
+ // se non ho tutto aggiungo...
+ if (newAxis[i].dataRefList.Count < 2)
+ {
+ // copio lista attuale
+ listaDR = newAxis[i].dataRefList;
+ // in base a cosa manca aggiunto...
+ if (listaDR.Count == 0)
+ {
+ // aggiungo tutto con valori default
+ listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Type", i + 1), "LINEAR"));
+ listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Grp", i + 1), "00"));
+ newAxis[i] = new element(string.Format("Axis_{0:00}", i + 1), listaDR);
+ }
+ else if (listaDR.Count == 1)
+ {
+ // aggiungo solo GRP con valori default, IPOTIZZO di avere solo type...
+ listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Grp", i + 1), "00"));
+ newAxis[i] = new element(string.Format("Axis_{0:00}", i + 1), listaDR);
+ }
+ }
+ }
+ else
+ {
+ // altrimenti popolo con valori default
+ listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Type", i + 1), "LINEAR"));
+ listaDR.Add(new DataRefItem(string.Format("Axis_{0:00}_Grp", i + 1), "00"));
+ newAxis[i] = new element(string.Format("Axis_{0:00}", i + 1), listaDR);
+ }
+ }
+ // salvo oggetto
+ c.Axis = newAxis;
+ }
+
+ // Serializzo oggetto conf su file
+ AdapterConf.Serialize(filePath, c);
+ }
+
+ private void btnLoad_Click(object sender, EventArgs e)
+ {
+ // Read the configuration object from a file
+ AdapterConf objLoad = AdapterConf.Deserialize(filePath);
+
+ txtAdapter.Text = objLoad.NomeAdapt;
+ cbTipoAdapt.SelectedText = objLoad.TipoAdapt.ToString();
+ // carico valori da file....
+ numVacPump = objLoad.nVacuumPump;
+ numVacAct = objLoad.nVacuumAct;
+ numLubro = objLoad.nLubro;
+ numCooler = objLoad.nCooler;
+ numPress = objLoad.nPress;
+ numTemp = objLoad.nTemp;
+ numPath = objLoad.nPath;
+ numUnOp = objLoad.nUnOp;
+ numAxis = objLoad.nAxis;
+ numMemArea = objLoad.nMemArea;
+ numSlittaMag = objLoad.nSlittaMag;
+ numProtMag = objLoad.nProtMag;
+ // salvo assi correnti...
+ oAxisLoad = objLoad.Axis;
+ }
+ }
}
diff --git a/MaterialeSetup/OSAI/Appunti_Variabili_2017.07.txt b/MaterialeSetup/OSAI/Appunti_Variabili_2017.07.txt
new file mode 100644
index 0000000..00d9a6f
--- /dev/null
+++ b/MaterialeSetup/OSAI/Appunti_Variabili_2017.07.txt
@@ -0,0 +1,19 @@
+------------------------------------------------------------------------
+Variabile | STATUS | CONTATORE | Altro (Var Analog) | Qta
+------------------------------------------------------------------------
+Rulliere X X Velocità 6
+Mot. Phase X - Velocità + Posiz 10
+Cuffia X X Velocità + Posiz 1
+Magazz UT X X Posizione 2
+Spalliere X X - 6
+Pinza Misur X X - 1
+Pinza Mandr X X - 2
+Slitta tenuta vetro X X - 1
+Mag forat post X X - 3
+Ravvivatore Presett X X - 1
+Slitta Ravvivatore X X - 2
+Fermo Riferimento X X - 2
+Piolo X X - 1
+Ventose (slitta) X X - 10
+Misuratori Pneum X X Posizione 4
+Mis.inverter (alt) - - Posizione 4
diff --git a/MaterialeSetup/SIEMENS/Documentazione_SIEMENS_EN/pi_eng.GID b/MaterialeSetup/SIEMENS/Documentazione_SIEMENS_EN/pi_eng.GID
index 0ed112b..0507783 100644
Binary files a/MaterialeSetup/SIEMENS/Documentazione_SIEMENS_EN/pi_eng.GID and b/MaterialeSetup/SIEMENS/Documentazione_SIEMENS_EN/pi_eng.GID differ