aggiunta in OSAI regione (commentata) x nuovi metodi IOT
This commit is contained in:
@@ -976,6 +976,323 @@ Retry: nRetry += 1
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#Region "Funzioni specifiche IOT"
|
||||
|
||||
#If False Then
|
||||
Public Function getAllAxisPos() As Focas1.ODBPOS
|
||||
' RIFERIMENTO:
|
||||
' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rdposition.htm
|
||||
|
||||
Dim nPathIdx As Integer
|
||||
Dim nNumAxisRead As Integer
|
||||
Dim nReturn As Integer
|
||||
|
||||
Dim posizAssi As Focas1.ODBPOS
|
||||
|
||||
'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
|
||||
|
||||
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 getAllDynData() As Focas1.ODBDY2_1
|
||||
' RIFERIMENTO:
|
||||
' C:\Users\samuele\Documents\FOCAS 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
|
||||
|
||||
nReturn = Focas1.cnc_rddynamic2(nLibHandle(nPathIdx), 1, 28 + 4 * (4 * 1), allData)
|
||||
'!!! non funziona: con -1 LEGGE 1 SOLO ASSE!!!
|
||||
'nReturn = Focas1.cnc_rddynamic2(nLibHandle(nPathIdx), -1, 28 + 4 * (4 * nNumAxisRead), 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 getCncAlarm() As Focas1.ODBALMMSG2
|
||||
' RIFERIMENTO:
|
||||
' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Misc\cnc_rdalmmsg2.htm
|
||||
' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Misc\cnc_rdalminfo.htm
|
||||
|
||||
Dim nPathIdx As Integer
|
||||
Dim nNumAxisRead As Integer
|
||||
Dim nReturn As Integer
|
||||
|
||||
Dim allData As Focas1.ODBALMMSG2
|
||||
' inizializzo
|
||||
allData = New Focas1.ODBALMMSG2
|
||||
|
||||
'leggo il numero del processo attivo
|
||||
nPathIdx = GetActivePath()
|
||||
'leggo num max assi dal cn
|
||||
nNumAxisRead = Focas1.MAX_AXIS
|
||||
|
||||
' vettore num allarmi MAX da leggere......
|
||||
Dim numAllarmi As Int16
|
||||
numAllarmi = 512
|
||||
|
||||
If Is30Series Then
|
||||
|
||||
' leggo tutto!!!
|
||||
nReturn = Focas1.cnc_rdalmmsg2(nLibHandle(nPathIdx), -1, numAllarmi, allData)
|
||||
|
||||
If F_CheckRetError_Cnc(nReturn, "cnc_rdalmmsg2 GetCncAlarm CNC.FANUC.CMS_CncLib") Then
|
||||
Throw New CmsNcException("ERR cnc_rdalmmsg2 GetCncAlarm CNC.FANUC.CMS_CncLib")
|
||||
End If
|
||||
End If
|
||||
|
||||
Return allData
|
||||
|
||||
End Function
|
||||
|
||||
Public Function getPathGCodeMod() 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), -1, 1, 37, 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
|
||||
|
||||
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
|
||||
|
||||
Public Function getPathTTCoord() As Focas1.ODB5AXMAN
|
||||
' RIFERIMENTO:
|
||||
' C:\Users\samuele\Documents\FOCAS A02B-0207-K737_04.20\Document\SpecE\Position\cnc_rd5axmandt.htm
|
||||
|
||||
Dim nPathIdx As Integer
|
||||
Dim nNumAxisRead As Integer
|
||||
Dim nReturn As Integer
|
||||
|
||||
Dim ttCoord As Focas1.ODB5AXMAN
|
||||
' inizializzo
|
||||
ttCoord = New Focas1.ODB5AXMAN
|
||||
|
||||
'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_rd5axmandt(nLibHandle(nPathIdx), ttCoord)
|
||||
|
||||
If F_CheckRetError_Cnc(nReturn, "cnc_rd3dtooltip RefreshPathTTCoord CNC.FANUC.CMS_CncLib") Then
|
||||
Throw New CmsNcException("ERR cnc_rd3dtooltip RefreshPathTTCoord CNC.FANUC.CMS_CncLib")
|
||||
End If
|
||||
End If
|
||||
|
||||
Return ttCoord
|
||||
|
||||
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
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user