inizio inserimento metodi SIEMENS x lettura assi (forse...)

This commit is contained in:
Samuele E. Locatelli
2017-05-26 17:59:51 +02:00
parent f419d44119
commit 0950bb47e1
2 changed files with 49 additions and 10 deletions
@@ -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
@@ -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