Merge branch 'Nuovi_pulsanti_Macchina'
This commit is contained in:
@@ -168,6 +168,7 @@ Public Class NestPageUC
|
||||
m_CurrSelectedCurv = nIdMy
|
||||
EgtSelectObj(nIdSaw)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
End If
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
|
||||
Public Const S_NCDATA As String = "NcData"
|
||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||
Public Const K_NEWCONSOLE As String = "NewConsole"
|
||||
Public Const K_COMM As String = "Comm"
|
||||
Public Const K_REFRESH As String = "Refresh"
|
||||
Public Const K_MODE As String = "Mode"
|
||||
@@ -98,7 +99,12 @@
|
||||
Public Const K_VACUUMOFF As String = "VacuumOff"
|
||||
Public Const K_BYPASSTATE As String = "BypassState"
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYAXES As String = "XYAxes"
|
||||
Public Const K_ZAXES As String = "ZAxes"
|
||||
Public Const K_BCAXES As String = "BCAxes"
|
||||
Public Const K_POWERON As String = "PowerON"
|
||||
|
||||
Public Const S_PRODUCTIONLINE As String = "ProductionLine"
|
||||
Public Const K_ACTIVE As String = "Active"
|
||||
|
||||
@@ -94,7 +94,10 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -108,8 +111,26 @@
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button Name="ManualModeBtn" Grid.Column="4"
|
||||
|
||||
<!--Comando asse X-Y-->
|
||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-->
|
||||
<ToggleButton Name="ZBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse B-C-->
|
||||
<ToggleButton Name="BCBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<Button Name="ManualModeBtn" Grid.Column="7"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
@@ -36,6 +36,9 @@ Public Class DirectCutPageUC
|
||||
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||
Friend m_bManulaCut As Boolean = False
|
||||
|
||||
' elenco dei nuovi bottoni
|
||||
Private m_ButtonAxesList As New List(Of MachineButton)
|
||||
|
||||
Enum DirectCutPages
|
||||
DirectCut
|
||||
ManualAxesMove
|
||||
@@ -70,7 +73,7 @@ Public Class DirectCutPageUC
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 3)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 6)
|
||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||
If m_bManulaCut Then
|
||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||
@@ -86,12 +89,15 @@ Public Class DirectCutPageUC
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
Dim bCollpsedNewBottonsConsole As Boolean = False
|
||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
If Not m_NewMachineButtonsType Then
|
||||
'Assegno MachineButtons alla pagina
|
||||
LowerButtonGrid.Children.Add(m_MachineButtons)
|
||||
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' per le configurazioni diverse dalla Digitale5
|
||||
bCollpsedNewBottonsConsole = True
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
@@ -106,11 +112,60 @@ Public Class DirectCutPageUC
|
||||
FlatteningCutBtn.Content = EgtMsg( 90206)
|
||||
PolishingBtn.Content = EgtMsg( 90231)
|
||||
CopyTemplateBtn.Content = EgtMsg( 90209)
|
||||
SawTestBtn.Content = EgtMsg( 90207)
|
||||
SawTestBtn.Content = EgtMsg(90207)
|
||||
|
||||
' nuovi bottoni 20/05/2021
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollpsedNewBottonsConsole Then
|
||||
XYBtn.Content = "X - Y"
|
||||
ZBtn.Content = "Z"
|
||||
BCBtn.Content = "B - C"
|
||||
Else
|
||||
XYBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ZBtn.Visibility = Windows.Visibility.Collapsed
|
||||
BCBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DirectCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
'------ NUOVI BOTTONI ----------
|
||||
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
||||
m_ButtonAxesList.Clear()
|
||||
Dim m_nCount As Integer = 1
|
||||
Dim bFoundBtn As Boolean = True
|
||||
While bFoundBtn
|
||||
Dim sNameBtn As String = K_BUTTON & (m_nCount).ToString()
|
||||
Dim sMachineButtonType As String = String.Empty
|
||||
Dim sTImageName As String = String.Empty
|
||||
Dim sTLuaScriptName As String = String.Empty
|
||||
Dim sFImageName As String = String.Empty
|
||||
Dim sFLuaScriptName As String = String.Empty
|
||||
Dim sStateFlag As String = String.Empty
|
||||
bFoundBtn = m_ControlsMachineButton.GetPrivateProfileMachineButtons("AxesButtons", sNameBtn, sMachineButtonType, sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag, m_MainWindow.GetMachIniFile())
|
||||
If bFoundBtn Then
|
||||
m_nCount += 1
|
||||
Dim ButtonToAdd As MachineButton = Nothing
|
||||
' la selezione dei comandi si trova nella pagina m_ControlsMachineButton.MachineButtonType (tipo Enum)
|
||||
Select Case sMachineButtonType
|
||||
Case 1
|
||||
ButtonToAdd = New NoStateButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 2
|
||||
ButtonToAdd = New TwoStateButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 3
|
||||
ButtonToAdd = New ThreeStateButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 4
|
||||
ButtonToAdd = New DoubleCommandButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 5
|
||||
ButtonToAdd = New PressedCommandButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
End Select
|
||||
If Not IsNothing(ButtonToAdd) Then
|
||||
m_ButtonAxesList.Add(ButtonToAdd)
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||
|
||||
'-----------NUOVI BOTTONI------------
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
@@ -152,7 +207,7 @@ Public Class DirectCutPageUC
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
FlatteningCutBtn.IsEnabled = bRawOk
|
||||
PolishingBtn.IsEnabled = ( bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = bRawOk
|
||||
|
||||
' Nascondo i pezzi in parcheggio
|
||||
@@ -258,6 +313,68 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
|
||||
Dim XYAxesButton As MachineButton = m_ButtonAxesList(0)
|
||||
' eseguo lo script lua associato
|
||||
XYAxesButton.ExecuteMDICommand(XYAxesButton.TLuaScriptName)
|
||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||
End Sub
|
||||
|
||||
Friend Sub XYAxesChanged(bXYAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim XYAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton In m_ButtonAxesList
|
||||
If MachineButton.StateFlag = "XYAxes" Then
|
||||
XYAxesButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(XYAxesButton) Then
|
||||
XYAxesButton.SetIsChecked(bXYAxes)
|
||||
XYBtn.IsChecked = bXYAxes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ZBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBtn.Click
|
||||
Dim ZAxesButton As MachineButton = m_ButtonAxesList(1)
|
||||
' eseguo lo script lua associato
|
||||
ZAxesButton.ExecuteMDICommand(ZAxesButton.TLuaScriptName)
|
||||
End Sub
|
||||
|
||||
Friend Sub ZAxesChanged(bZAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim ZAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton In m_ButtonAxesList
|
||||
If MachineButton.StateFlag = "ZAxes" Then
|
||||
ZAxesButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(ZAxesButton) Then
|
||||
ZAxesButton.SetIsChecked(bZAxes)
|
||||
ZBtn.IsChecked = bZAxes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BCBtn_Click(sender As Object, e As RoutedEventArgs) Handles BCBtn.Click
|
||||
Dim BCAxesButton As MachineButton = m_ButtonAxesList(2)
|
||||
' eseguo lo script lua associato
|
||||
BCAxesButton.ExecuteMDICommand(BCAxesButton.TLuaScriptName)
|
||||
End Sub
|
||||
|
||||
Friend Sub BCAxesChanged(bBCAxes As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim BCAxesButton As TwoStateButton = Nothing
|
||||
For Each MachineButton In m_ButtonAxesList
|
||||
If MachineButton.StateFlag = "BCAxes" Then
|
||||
BCAxesButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(BCAxesButton) Then
|
||||
BCAxesButton.SetIsChecked(bBCAxes)
|
||||
BCBtn.IsChecked = bBCAxes
|
||||
End If
|
||||
End Sub
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||
If m_bShowMachine Then
|
||||
' aggiorno lo stato
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class MachineButtonsUC
|
||||
GetToggleButton(nIndex + 1).Visibility = Windows.Visibility.Hidden
|
||||
Next
|
||||
|
||||
' Se variabile di stato "Nothing" imposto immagine fissa
|
||||
' Se variabile di stato "Nothing"/"DoorOpened"/"DoorClosed" imposto immagine fissa
|
||||
For nIndex As Integer = 0 To m_nCount - 1
|
||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_OPENED OrElse
|
||||
@@ -97,19 +97,21 @@ Public Class MachineButtonsUC
|
||||
If Not m_MainWindow.m_bNCLink Then
|
||||
For nIndex As Integer = 0 To m_nCount - 1
|
||||
Dim sImage As String = If(String.IsNullOrEmpty(ImageArrayN(nIndex)), ImageArrayY(nIndex), ImageArrayN(nIndex))
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & sImage
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & sImage
|
||||
End If
|
||||
'Dim s As String = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & sImage
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & sImage)
|
||||
End Try
|
||||
If Not String.IsNullOrEmpty(sImage) Then
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & sImage
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & sImage
|
||||
End If
|
||||
'Dim s As String = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & sImage
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & sImage)
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -562,6 +564,32 @@ Public Class MachineButtonsUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'----------------- Queste funzioni determina lo stato del bottone direttamente dalla lettura delle variabili CN
|
||||
Friend Sub XYAxesChanged(ByVal bXYAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, "XYAxes")
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bXYAxes
|
||||
End Sub
|
||||
|
||||
Friend Sub ZAxesChanged(ByVal bZAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, "ZAxes")
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bZAxes
|
||||
End Sub
|
||||
|
||||
Friend Sub BCAxesChanged(ByVal bBCAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, "BCAxes")
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bBCAxes
|
||||
End Sub
|
||||
'-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Private Function GetToggleButton(ByVal nIndex As Integer) As Primitives.ToggleButton
|
||||
Select Case nIndex
|
||||
Case 1
|
||||
|
||||
@@ -76,7 +76,7 @@ Public Class CompoDimensionUC
|
||||
AddBtn.Visibility = Windows.Visibility.Visible
|
||||
CancelBtn.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
m_DrawPage.SideAngleBtn.IsEnabled = True
|
||||
m_DrawPage.SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
m_DrawPage.FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
m_DrawPage.EngraveBtn.IsEnabled = True
|
||||
m_DrawPage.DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
|
||||
@@ -55,6 +55,16 @@ Public Class DrawPageUC
|
||||
Private m_sCsvList As String = ""
|
||||
Private m_sCsvName As String = ""
|
||||
|
||||
' Abilito i tagli inclinati solo per macchina a 5 assi
|
||||
Private m_bEnableSideAngle As Boolean = True
|
||||
|
||||
Friend ReadOnly Property bEnableSideAngle As Boolean
|
||||
Get
|
||||
Return m_bEnableSideAngle
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Friend ReadOnly Property sCompoName As String
|
||||
Get
|
||||
Return m_sCompoName
|
||||
@@ -143,7 +153,13 @@ Public Class DrawPageUC
|
||||
m_bTrfData = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT) And
|
||||
(GetPrivateProfileInt(S_COMPO, K_TRFDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Abilitazione CsvData
|
||||
m_bCsvData = ( Not m_bTrfData And GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_bCsvData = (Not m_bTrfData And GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
|
||||
' Abilitazione tagli inclinati (solo per macchine a 5 assi)
|
||||
m_bEnableSideAngle = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile()) > 4
|
||||
If Not m_bEnableSideAngle Then
|
||||
SideAngleBtn.IsEnabled = False
|
||||
End If
|
||||
|
||||
If m_bTrfData Then
|
||||
PartNameTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -997,7 +1013,7 @@ Public Class DrawPageUC
|
||||
ElseIf m_PrevSideAnglePage = Pages.InternalComponent Then
|
||||
LeftButtonGrd.Children.Add(m_CompoDimension.m_InternalCompoPage)
|
||||
End If
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_bEnableSideAngle
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
@@ -1055,7 +1071,7 @@ Public Class DrawPageUC
|
||||
ElseIf m_PrevSideAnglePage = Pages.InternalComponent Then
|
||||
LeftButtonGrd.Children.Add(m_CompoDimension.m_InternalCompoPage)
|
||||
End If
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
EngraveBtn.IsEnabled = True
|
||||
MessageGrid.Visibility = Windows.Visibility.Visible
|
||||
@@ -1107,7 +1123,7 @@ Public Class DrawPageUC
|
||||
ElseIf m_PrevSideAnglePage = Pages.InternalComponent Then
|
||||
LeftButtonGrd.Children.Add( m_CompoDimension.m_InternalCompoPage)
|
||||
End If
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_bEnableSideAngle
|
||||
EngraveBtn.IsEnabled = True
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
|
||||
@@ -598,7 +598,7 @@ Public Class ImportPageUC
|
||||
ResetBtn.IsEnabled = True
|
||||
OkBtn.IsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
@@ -628,7 +628,7 @@ Public Class ImportPageUC
|
||||
ResetBtn.IsEnabled = True
|
||||
OkBtn.IsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
@@ -658,7 +658,7 @@ Public Class ImportPageUC
|
||||
ResetBtn.IsEnabled = True
|
||||
OkBtn.IsEnabled = True
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
@@ -1021,7 +1021,7 @@ Public Class ImportPageUC
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
EgtDeselectAll()
|
||||
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
@@ -1071,7 +1071,7 @@ Public Class ImportPageUC
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
EgtDeselectAll()
|
||||
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
@@ -1119,7 +1119,7 @@ Public Class ImportPageUC
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
EgtDeselectAll()
|
||||
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
|
||||
@@ -31,7 +31,7 @@ Public Class InternalComponentPageUC
|
||||
End If
|
||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.InternalComponent
|
||||
' Abilito bottoni angoli di fianco e lavorazioni da sotto
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
@@ -181,7 +181,7 @@ Public Class InternalComponentPageUC
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
|
||||
@@ -190,7 +190,7 @@ Public Class MainComponentPageUC
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
|
||||
@@ -226,7 +226,7 @@ Public Class SecondaryComponentPageUC
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsChecked = False
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = True
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="CommandsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.ColumnSpan="2">
|
||||
<GroupBox Name="CommandsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="PartProgTransferGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
<GroupBox Name="PartProgTransferGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.ColumnSpan="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -107,6 +107,22 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.Column="3" Grid.ColumnSpan="3" Margin="5,0,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--PowerON-->
|
||||
<Button Name="PowerONBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<!--PowerOFF-->
|
||||
<Button Name="PowerOFFBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="ErrorLstGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="3" Grid.ColumnSpan="4">
|
||||
<ListBox Name="ErrorLstBx">
|
||||
<ListBox.ItemTemplate>
|
||||
|
||||
@@ -6,6 +6,7 @@ Public Class MachineCNPageUC
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
Private m_ButtonPower As New List(Of MachineButton)
|
||||
|
||||
Private Sub TestingPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
StartBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 1)
|
||||
@@ -32,6 +33,15 @@ Public Class MachineCNPageUC
|
||||
Else
|
||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' nuovi pulsanti
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
PowerONBtn.Content = "ON"
|
||||
PowerOFFBtn.Content = "OFF"
|
||||
PowerGpBx.Header = "Power"
|
||||
Else
|
||||
PowerGpBx.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TestingPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -40,6 +50,46 @@ Public Class MachineCNPageUC
|
||||
SingleBtn.Visibility = Visibility.Collapsed
|
||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
'------ NUOVI BOTTONI ----------
|
||||
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
||||
m_ButtonPower.Clear()
|
||||
Dim m_nCount As Integer = 1
|
||||
Dim bFoundBtn As Boolean = True
|
||||
While bFoundBtn
|
||||
Dim sNameBtn As String = K_BUTTON & (m_nCount).ToString()
|
||||
Dim sMachineButtonType As String = String.Empty
|
||||
Dim sTImageName As String = String.Empty
|
||||
Dim sTLuaScriptName As String = String.Empty
|
||||
Dim sFImageName As String = String.Empty
|
||||
Dim sFLuaScriptName As String = String.Empty
|
||||
Dim sStateFlag As String = String.Empty
|
||||
bFoundBtn = m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.GetPrivateProfileMachineButtons("MachineButtons", sNameBtn, sMachineButtonType, sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag, m_MainWindow.GetMachIniFile())
|
||||
If bFoundBtn Then
|
||||
m_nCount += 1
|
||||
Dim ButtonToAdd As MachineButton = Nothing
|
||||
' la selezione dei comandi si trova nella pagina m_ControlsMachineButton.MachineButtonType (tipo Enum)
|
||||
Select Case sMachineButtonType
|
||||
Case 1
|
||||
ButtonToAdd = New NoStateButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 2
|
||||
ButtonToAdd = New TwoStateButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 3
|
||||
ButtonToAdd = New ThreeStateButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 4
|
||||
ButtonToAdd = New DoubleCommandButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
Case 5
|
||||
ButtonToAdd = New PressedCommandButton(sTImageName, sTLuaScriptName, sFImageName, sFLuaScriptName, sStateFlag)
|
||||
End Select
|
||||
If Not IsNothing(ButtonToAdd) Then
|
||||
m_ButtonPower.Add(ButtonToAdd)
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||
|
||||
'-----------NUOVI BOTTONI------------
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub StartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartBtn.Click
|
||||
@@ -178,4 +228,32 @@ Public Class MachineCNPageUC
|
||||
MDITxBx.Background = Brushes.LightGray
|
||||
End Sub
|
||||
|
||||
Private Sub PowerON_Click(sender As Object, e As RoutedEventArgs) Handles PowerONBtn.Click
|
||||
Dim PowerOnButton As MachineButton = m_ButtonPower(0)
|
||||
' eseguo lo script lua associato
|
||||
PowerOnButton.ExecuteMDICommand(PowerOnButton.TLuaScriptName)
|
||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||
End Sub
|
||||
|
||||
Private Sub PowerOFF_Click(sender As Object, e As RoutedEventArgs) Handles PowerOFFBtn.Click
|
||||
Dim PowerOffButton As MachineButton = m_ButtonPower(1)
|
||||
' eseguo lo script lua associato
|
||||
PowerOffButton.ExecuteMDICommand(PowerOffButton.TLuaScriptName)
|
||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||
End Sub
|
||||
|
||||
Friend Sub PowerONChanged(bPowerON As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim PowerONButton As TwoStateButton = Nothing
|
||||
For Each MachineButton In m_ButtonPower
|
||||
If MachineButton.StateFlag = "ZAxes" Then
|
||||
PowerONButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
'If Not IsNothing(PowerONButton) Then
|
||||
' PowerONButton.SetIsChecked(bZAxes)
|
||||
' PowerONBtn.IsChecked = bZAxes
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+3
-3
@@ -323,8 +323,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2304, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2304, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2305, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2305, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -1096,7 +1096,7 @@ Class MainWindow
|
||||
End If
|
||||
|
||||
' seleziono il tipo di avvio
|
||||
m_CurrentProjectPageUC.StartProgram()
|
||||
'm_CurrentProjectPageUC.StartProgram()
|
||||
' aggiorno la grafica
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.4.3")>
|
||||
<Assembly: AssemblyFileVersion("2.3.4.3")>
|
||||
<Assembly: AssemblyVersion("2.3.5.1")>
|
||||
<Assembly: AssemblyFileVersion("2.3.5.1")>
|
||||
|
||||
@@ -30,6 +30,8 @@ Public Class CNCommunication
|
||||
Private m_bNewVarData As Boolean = False
|
||||
Private m_bTimerBusy As Boolean = False
|
||||
|
||||
Private m_IsNewConsole As Boolean = False
|
||||
|
||||
' Lista errori
|
||||
Friend ErrorList As New ObservableCollection(Of String)
|
||||
|
||||
@@ -323,6 +325,19 @@ Public Class CNCommunication
|
||||
GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
||||
|
||||
' nuove variabili
|
||||
m_IsNewConsole = GetPrivateProfileString(S_NCDATA, K_NEWCONSOLE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If m_IsNewConsole Then
|
||||
GetPrivateProfileString(S_NCDATA, K_XYAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.XYAxes, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ZAxes, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_BCAxes, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.BCAxes, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_POWERON, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal)
|
||||
End If
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
|
||||
@@ -537,6 +552,13 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumOnChanged(m_CN.bVacuumOn)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumOffChanged(m_CN.bVacuumOff)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.BypassChanged(m_CN.bBypassState)
|
||||
|
||||
' Nuovi bottoni (uso joystick)
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.XYAxesChanged(m_CN.bXYAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.ZAxesChanged(m_CN.bZAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.BCAxesChanged(m_CN.bBCAxes)
|
||||
End If
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState OrElse m_CN.bInternalCoolantState OrElse m_CN.bExternCoolantState)
|
||||
@@ -550,6 +572,14 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.FiveAxisStateChanged(False)
|
||||
End If
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
|
||||
' Nuovi bottoni (uso joystick) per Area4
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.XYAxesChanged(m_CN.bXYAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZAxesChanged(m_CN.bZAxes)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCAxesChanged(m_CN.bBCAxes)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -557,6 +587,11 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_RawPartPage.m_MachineButtons.LaserStateChanged(m_CN.bLaserState)
|
||||
End If
|
||||
|
||||
' Nuove bottoni (Power Macchina)
|
||||
If m_IsNewConsole AndAlso m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||
End If
|
||||
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.WorkInProgress Then
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState OrElse m_CN.bInternalCoolantState OrElse m_CN.bExternCoolantState)
|
||||
|
||||
+14
-1
@@ -8,7 +8,7 @@ Public MustInherit Class CN_generico
|
||||
Public Const MAX_VAR As Short = 100
|
||||
Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
||||
Public Const MAX_TOOLS As Short = 100
|
||||
Public Const NUM_DATA = 47 ' Numero di dati del CN (Speed,Feed,...)
|
||||
Public Const NUM_DATA = 50 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -60,6 +60,11 @@ Public MustInherit Class CN_generico
|
||||
Vacuum90 = 44
|
||||
VacuumOff = 45
|
||||
LaserTrac = 46
|
||||
|
||||
XYAxes = 47
|
||||
ZAxes = 48
|
||||
BCAxes = 49
|
||||
PowerON = 50
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
@@ -194,6 +199,14 @@ Public MustInherit Class CN_generico
|
||||
Public bFeedHold As Boolean
|
||||
Public bSpeedHold As Boolean
|
||||
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
Public bXYAxes As Boolean
|
||||
Public bZAxes As Boolean
|
||||
Public bBCAxes As Boolean
|
||||
|
||||
Public bPowerON As Boolean
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
|
||||
Public nMachineMode As Integer
|
||||
|
||||
Public m_szCnDataVar(NUM_DATA - 1) As String
|
||||
|
||||
@@ -1076,6 +1076,16 @@ Namespace Num
|
||||
bVacuum90 = CBool(values(n))
|
||||
Case CnData.VacuumOff ' (45) Stato aspirazione ventose spento
|
||||
bVacuumOff = CBool(values(n))
|
||||
|
||||
Case CnData.XYAxes ' (46)
|
||||
bXYAxes = CBool(values(n))
|
||||
Case CnData.ZAxes ' (47)
|
||||
bZAxes = CBool(values(n))
|
||||
Case CnData.BCAxes ' (48)
|
||||
bBCAxes = CBool(values(n))
|
||||
Case CnData.PowerON ' (49)
|
||||
bPowerON = CBool(values(n))
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
|
||||
@@ -180,21 +180,21 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
' Se richiesto, carico ultimo progetto
|
||||
Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
'If bAutoLoadLast Then
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
' If Not LoadProject(sPath, False) Then
|
||||
' NewProject()
|
||||
' End If
|
||||
' EgtResetModified()
|
||||
' Altrimenti ne imposto uno nuovo
|
||||
'Else
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' NewProject()
|
||||
'End If
|
||||
If bAutoLoadLast Then
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
If Not LoadProject(sPath, False) Then
|
||||
NewProject()
|
||||
End If
|
||||
EgtResetModified()
|
||||
'Altrimenti ne imposto uno nuovo
|
||||
Else
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
NewProject()
|
||||
End If
|
||||
|
||||
' creo nuovo progetto
|
||||
NewProject()
|
||||
'' creo nuovo progetto
|
||||
'NewProject()
|
||||
|
||||
' Nascondo progress per fotografia
|
||||
PhotoProgress.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
@@ -314,9 +314,18 @@ Public Class ProjectMgrUC
|
||||
Dim dX, dY, dZ As Double
|
||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||
|
||||
' verifica assi lineari
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||
If nStat <> 0 Then
|
||||
vtDirT.Rotate(Vector3d.Z_AX, 180)
|
||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||
End If
|
||||
|
||||
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
||||
|
||||
ExecuteComandCNC(ptMid, dC1, dB1)
|
||||
ExecuteCommandCNC(ptMid, dC1, dB1)
|
||||
Return
|
||||
End If
|
||||
' ---------------------------- Fine modalità test --------------------------------------------
|
||||
@@ -606,7 +615,7 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||
Private Sub ExecuteComandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
||||
Private Sub ExecuteCommandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
||||
|
||||
'If m_CurrNcComm.m_nNCType = 3 AndAlso m_CurrNcComm.m_CN.m_IsSiemensOne Then
|
||||
' SiemensMoveAxis(ptMid, dAngC, dAngB)
|
||||
@@ -616,7 +625,9 @@ Public Class ProjectMgrUC
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
Dim CmdString As String = String.Empty
|
||||
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua")
|
||||
If Not EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||
Return
|
||||
End If
|
||||
|
||||
'----------- DATI MOVIMENTO -----------
|
||||
' imposto avanzamneto in rapido (non deve essere impostata feed e speed)
|
||||
@@ -692,7 +703,7 @@ Public Class ProjectMgrUC
|
||||
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Modifico stringa per inserire i newline
|
||||
' Modifico stringa per inserire i newline ( in questo caso non c'è bisogno perchè tutto sulla stessa linea)
|
||||
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
|
||||
' Creo file...
|
||||
Dim FilePath As String = m_MainWindow.GetCncDir() & "\TestWork" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
@@ -811,13 +822,15 @@ Public Class ProjectMgrUC
|
||||
Private Sub TestBtn_Click(sender As Object, e As RoutedEventArgs) Handles TestBtn.Click
|
||||
If TestBtn.IsChecked Then
|
||||
m_CurrProjPage.m_bSelectCurv = True
|
||||
' deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
Else
|
||||
m_CurrProjPage.m_bSelectCurv = False
|
||||
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||
' aggiorno il disegno
|
||||
EgtDraw()
|
||||
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
End If
|
||||
|
||||
' aggiorno il disegno
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub VeinMatchingBtn_Click(sender As Object, e As RoutedEventArgs) Handles VeinMatchingBtn.Click
|
||||
|
||||
Reference in New Issue
Block a user