diff --git a/MTC_Adapter/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb b/MTC_Adapter/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb index 57d2523..6915557 100644 --- a/MTC_Adapter/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb +++ b/MTC_Adapter/CMSCncLib/CNC/CNC.FANUC/CNC.FANUC.vb @@ -1393,16 +1393,6 @@ Namespace CNC End Function - - - - - - - - - - Public Overloads Function F_CheckRetError_Cnc(ByVal nReturn As Short, ByVal Position As String) As Boolean Dim szErrorDesc As String diff --git a/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb b/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb index db2d2bb..9e71326 100644 --- a/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb +++ b/MTC_Adapter/CMSCncLib/CNC/CNC.SIEMENS/CNC.SIEMENS.vb @@ -11,6 +11,8 @@ Namespace CNC Inherits CNC Private m_DataSvcRW As DataSvc + Private m_DriveSVC As DrivesSvc + Private itemRead() As Item Private itemWrite As Item @@ -57,6 +59,8 @@ Namespace CNC Try m_DataSvcRW = New DataSvc + m_DriveSVC = New DrivesSvc + Catch ex As System.IO.FileNotFoundException ' intercetta l'exception se non lanciato sopra l'hmi 'MessageBox.Show("CMS Control must be run over Sinumerik Operate!" & vbNewLine & _ @@ -879,6 +883,51 @@ Namespace CNC Return True End Function + + + +#Region "Funzioni specifiche IOT" + + Public Function getAllAxisPos() As Drive() + ' RIFERIMENTO: + ' SinumerikOperate_net.pdf, pag 222 + + 'Dim nPathIdx As Integer + 'Dim nNumAxisRead As Integer + 'Dim nReturn As Integer + + Dim posizAssi As Drive() + + Dim m_SelectedDrive As Drive + Dim m_DrivesList As Drive() + + posizAssi = m_DriveSVC.ListDrives() + + 'm_SelectedDrive = m_DrivesList(0) + + + + ''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_rdposition(nLibHandle(nPathIdx), -1, nNumAxisRead, posizAssi) + + ' If F_CheckRetError_Cnc(nReturn, "cnc_rdposition RefreshAxisPosition CNC.FANUC.CMS_CncLib") Then + ' Throw New CmsNcException("ERR cnc_rdposition RefreshAxisPosition CNC.FANUC.CMS_CncLib") + ' End If + 'End If + + Return posizAssi + + End Function + +#End Region + End Class End Namespace