OmagCUT :
- Migliorata gestione attrezzaggio e scelta lavorazioni.
This commit is contained in:
@@ -42,6 +42,18 @@ Public Class CurrentMachine
|
||||
' Spessore sottopezzo
|
||||
Private m_dAdditionalTable As Double
|
||||
|
||||
' Numero portautensili presenti
|
||||
Private m_ToolChangerNum As Double
|
||||
|
||||
' Lista portautensili
|
||||
Private m_ToolChanger As New List(Of ToolChangerPos)
|
||||
|
||||
' Numero portautensili manuali
|
||||
Private m_ManualToolChangerNum As Double
|
||||
|
||||
' Lista portautensili
|
||||
Private m_ManualToolChanger As New List(Of ToolChangerPos)
|
||||
|
||||
Friend Enum MountedToolConfigs As Integer
|
||||
SAW = 0
|
||||
SAWANDAUXTOOL = 1
|
||||
@@ -199,6 +211,68 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property dToolChangerNum As Double
|
||||
Get
|
||||
Return m_ToolChangerNum
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ToolChanger As List(Of ToolChangerPos)
|
||||
Get
|
||||
Return m_ToolChanger
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ToolChangerName(Index As Integer) As String
|
||||
Get
|
||||
If Index >= 0 And Index < m_ToolChanger.Count Then
|
||||
Return m_ToolChanger(Index).sName
|
||||
Else
|
||||
Return String.Empty
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend WriteOnly Property ToolPos(Index As Integer) As String
|
||||
Set(value As String)
|
||||
If value <> m_ToolChanger(Index).sTool Then
|
||||
m_ToolChanger(Index).sTool = value
|
||||
WritePrivateProfileString(S_TOOLCHANGER, K_POS & Index + 1, value, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property dManualToolChangerNum As Double
|
||||
Get
|
||||
Return m_ManualToolChangerNum
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ManualToolChanger As List(Of ToolChangerPos)
|
||||
Get
|
||||
Return m_ManualToolChanger
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ManualToolChangerName(Index As Integer) As String
|
||||
Get
|
||||
If Index >= 0 And Index < m_ManualToolChanger.Count Then
|
||||
Return m_ManualToolChanger(Index).sName
|
||||
Else
|
||||
Return String.Empty
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend WriteOnly Property ManualToolPos(Index As Integer) As String
|
||||
Set(value As String)
|
||||
If value <> m_ManualToolChanger(Index).sTool Then
|
||||
m_ManualToolChanger(Index).sTool = value
|
||||
WritePrivateProfileString(S_TOOLCHANGER, K_MANUALPOS & Index + 1, value, sMachIniFile)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Sub New()
|
||||
@@ -264,6 +338,64 @@ Public Class CurrentMachine
|
||||
' fresa
|
||||
GetPrivateProfileString(S_MACH, K_CURRMILLING, Nothing, m_sCurrMilling, m_MainWindow.GetIniFile())
|
||||
|
||||
' Leggo numero di portautensili
|
||||
m_ToolChangerNum = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||
|
||||
' Leggo da file ini nomi e utensili presenti in portautensili
|
||||
For Index = 1 To m_ToolChangerNum
|
||||
Dim sName As String = String.Empty
|
||||
Dim sTool As String = String.Empty
|
||||
GetPrivateProfileString(S_TOOLCHANGER, K_NAME & Index, Nothing, sName, sMachIniFile)
|
||||
GetPrivateProfileString(S_TOOLCHANGER, K_POS & Index, Nothing, sTool, sMachIniFile)
|
||||
m_ToolChanger.Add(New ToolChangerPos(Index, sName, sTool))
|
||||
Next
|
||||
' Leggo numero portautensili manuali
|
||||
m_ManualToolChangerNum = GetPrivateProfileInt(S_TOOLCHANGER, K_MANUALNUMBER, 0, sMachIniFile)
|
||||
|
||||
' Leggo da file ini nomi e utensili manuali presenti
|
||||
For Index = 1 To m_ManualToolChangerNum
|
||||
Dim sName As String = String.Empty
|
||||
Dim sTool As String = String.Empty
|
||||
GetPrivateProfileString(S_TOOLCHANGER, K_MANUALNAME & Index, Nothing, sName, sMachIniFile)
|
||||
GetPrivateProfileString(S_TOOLCHANGER, K_MANUALPOS & Index, Nothing, sTool, sMachIniFile)
|
||||
m_ManualToolChanger.Add(New ToolChangerPos(Index, sName, sTool))
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Class ToolChangerPos
|
||||
|
||||
Private m_sPosition As Integer
|
||||
Private m_sName As String = String.Empty
|
||||
Private m_sTool As String = String.Empty
|
||||
|
||||
Public ReadOnly Property sPosition As Integer
|
||||
Get
|
||||
Return m_sPosition
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property sTool As String
|
||||
Get
|
||||
Return m_sTool
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sTool = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sPosition As Integer, sName As String, sTool As String)
|
||||
m_sPosition = sPosition
|
||||
m_sName = sName
|
||||
m_sTool = sTool
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user