diff --git a/MTC_Sim/.vs/MTC_Sim/v14/.suo b/MTC_Sim/.vs/MTC_Sim/v14/.suo index 05f0bb1..1d00eaf 100644 Binary files a/MTC_Sim/.vs/MTC_Sim/v14/.suo and b/MTC_Sim/.vs/MTC_Sim/v14/.suo differ diff --git a/MTC_Sim/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb b/MTC_Sim/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb index 859f18b..ee05cdf 100644 --- a/MTC_Sim/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb +++ b/MTC_Sim/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb @@ -617,7 +617,6 @@ Namespace CNC Dim nPathIdx As Integer Dim nNumAxisRead As Integer Dim nReturn As Integer - Dim szAssi() As String = {String.Empty} Dim posizAssi As Focas1.ODBPOS @@ -639,6 +638,66 @@ Namespace CNC Return posizAssi End Function + Public Function getAllAxisLoad() As Focas1.ODBSVLOAD + ' RIFERIMENTO: + ' C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\CMS_orig\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 getAllDynData() As Focas1.ODBDY2_1 + ' RIFERIMENTO: + ' C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\CMS_orig\A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rddynamic2.htm + + Dim nPathIdx As Integer + Dim nNumAxisRead As Integer + Dim nReturn As Integer + + Dim allData As Focas1.ODBDY2_1 + ' inizializzo + allData = New Focas1.ODBDY2_1 + + '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_rddynamic2(nLibHandle(nPathIdx), 1, 28 + 4 * (4 * 1), allData) + + If F_CheckRetError_Cnc(nReturn, "cnc_rddynamic2 RefreshAllData CNC.FANUC.CMS_CncLib") Then + Throw New CmsNcException("ERR cnc_rddynamic2 RefreshAllData CNC.FANUC.CMS_CncLib") + End If + End If + + Return allData + + End Function + Public Function getSpindleSpeed() As Focas1.ODBSPEED ' RIFERIMENTO: @@ -647,7 +706,6 @@ Namespace CNC Dim nPathIdx As Integer Dim nNumAxisRead As Integer Dim nReturn As Integer - Dim szAssi() As String = {String.Empty} Dim speedAssi As Focas1.ODBSPEED diff --git a/MTC_Sim/MTC_Sim/AdapterGeneric.cs b/MTC_Sim/MTC_Sim/AdapterGeneric.cs index 0ccfa94..1b67c57 100644 --- a/MTC_Sim/MTC_Sim/AdapterGeneric.cs +++ b/MTC_Sim/MTC_Sim/AdapterGeneric.cs @@ -1275,15 +1275,27 @@ namespace MTC_Sim { // recupero allarme da oggetto in memoria... currAllarm = elencoAllarmi[i * 32 + j]; + // in base al tipo di allarme decodifico condizione... + Condition.Level livello = Condition.Level.NORMAL; + switch (currAllarm.livello) + { + case "WARNING": + livello = Condition.Level.WARNING; + break; + case "FAULT": + default: + livello = Condition.Level.FAULT; + break; + } // in base al gruppo decido dove assegnare come CONDITION... switch (currAllarm.gruppo) { case "PLC": - mAlarmPLC.Add(MTConnect.Condition.Level.FAULT, currAllarm.descrizione, currAllarm.codNum, "", ""); + mAlarmPLC.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", ""); break; case "CNC": default: - mAlarmCNC.Add(MTConnect.Condition.Level.FAULT, currAllarm.descrizione, currAllarm.codNum, "", ""); + mAlarmCNC.Add(livello, currAllarm.descrizione, currAllarm.codNum, "", ""); break; } } diff --git a/MTC_Sim/MTC_Sim/Appunti.txt b/MTC_Sim/MTC_Sim/Appunti.txt index 1f2ae39..ff54345 100644 --- a/MTC_Sim/MTC_Sim/Appunti.txt +++ b/MTC_Sim/MTC_Sim/Appunti.txt @@ -5,17 +5,16 @@ OK 03) lo strobe allarmi va inizializzato all'avvio (carica TUTTI i bit...) OK 04) da strobe allarmi --> vettore allarmi OK 05) CodS 5 cifre OK 06) CodM/CodT 3 cifre - 07) lettura assi: vedere in progetto CMSConnect in OpPanel di FANUC la RefreshAxisNames() + 07) lettura assi: posizioni, velocità, ... - feedrate C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\CMS_orig\A02B-0207-K737_04.20\Document\SpecE\Position\cnc_actf.htm - - pos abs C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\CMS_orig\A02B-0207-K737_04.20\Document\SpecE\Position\cnc_absolute2.htm - ALL? C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\CMS_orig\A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rdaxisdata.htm OK 08) lettura strobe e registrazione NUOVO flusso EVENT x START/STOP/RESET (1 solo con 3 strobe separati) --> gestire!!! OK 09) update gestione SUB MODE OK 10) riallineamento simulatore generico 11) spostare lettura spindle in mandrino/UnOp 12) completare letture assi - 13) completare gestione BIT di semaforo - 14) completare gestione strobe (x i bit "non qualificati") +OK 13) completare gestione BIT di semaforo +OK 14) completare gestione strobe (x i bit "non qualificati")