OmagCUT 2.2g1 :

- aggiunti check spessore lama a movimenti manuali
- in simulazione aggiunta gestione ripartenza
- in spezza con comando modifica si conserva l'ordine dei tagli.
This commit is contained in:
Dario Sassi
2020-07-14 09:20:13 +00:00
parent 46f76fab25
commit 9ec18d2ffa
5 changed files with 96 additions and 9 deletions
+4 -2
View File
@@ -979,13 +979,15 @@ Public Class SplitPageUC
Private Sub ModifyBtn_Click(sender As Object, e As RoutedEventArgs) Handles ModifyBtn.Click
' Dichiaro non più solo visualizzazione
m_bShow = False
' Rimuovo eventuale restart
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
' Elimino le fasi successive alla corrente
While EgtGetPhaseCount() > m_nCurrPhase
RemoveLastPhase()
End While
' Aggiorno le lavorazioni
' Aggiorno le lavorazioni (eliminato sort per lasciare ordine immutato)
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
If SortAllMachinings() Then m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
Dim bModif As Boolean = TestAllMachiningsForStrict()
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
+10 -2
View File
@@ -52,11 +52,19 @@
</Grid>
<Button x:Name="L1Btn" Grid.Row="1" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<EgtWPFLib:EgtTextBox Name="L1TxBx" Grid.Column="1" Grid.Row="1" Margin="0,0,6,0"
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="1">
<EgtWPFLib:EgtTextBox Name="L1TxBx" Margin="0,4,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<CheckBox Name="L1SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
</UniformGrid>
<Button x:Name="L2Btn" Grid.Row="2" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="L2TxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="2">
<EgtWPFLib:EgtTextBox x:Name="L2TxBx" Margin="0,4,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
<CheckBox Name="L2SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
HorizontalAlignment="Right" Margin="0,0,6,0"/>
</UniformGrid>
<Button x:Name="L3Btn" Grid.Row="3" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
+42 -4
View File
@@ -14,13 +14,16 @@ Public Class ManualAxesMoveUC
Private m_Timer As New DispatcherTimer
Private Sub ManualAxesMove_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
' Nomi feed e speed
FeedTxBl.Text = "F"
SpeedTxBl.Text = "S"
' Messaggi
L1SawThChBx.Content = EgtMsg( 90232) ' Spessore lama
L2SawThChBx.Content = EgtMsg( 90232) ' Spessore lama
AddHandler m_Timer.Tick, AddressOf Timer_tick
End Sub
Private Sub ManualAxesMove_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
' Nomi feed e speed
FeedTxBl.Text = "F"
SpeedTxBl.Text = "S"
' Valori feed e speed da lama corrente
Dim dTemp As Double = 0
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
@@ -44,10 +47,15 @@ Public Class ManualAxesMoveUC
m_Timer.Start()
' Imposto movimenti in rapido
G0Btn.IsChecked = True
' Imposto check per considerare spessore lama
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
End Sub
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
m_Timer.Stop()
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = ( L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
( L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
End Sub
Private Sub UpdateAxesNames()
@@ -70,8 +78,37 @@ Public Class ManualAxesMoveUC
R2Btn.Content = sR2 ' B
End Sub
Private Sub UpdateUseSawThickness()
If Not m_CN.Is_G24_active() Then
' Recupero la posizione macchina
Dim dL1, dL2, dL3, dR1, dR2 As Double
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
L1SawThChBx.IsEnabled = False
L2SawThChBx.IsEnabled = False
Return
End If
' Abilito flag X se lama diretta lungo Y
If Math.Abs( dR1) < 10 * EPS_ANG_SMALL Or
Math.Abs( dR1 - 180) < 10 * EPS_ANG_SMALL Or
Math.Abs( dR1 + 180) < 10 * EPS_ANG_SMALL Then
L1SawThChBx.IsEnabled = True
L2SawThChBx.IsEnabled = False
ElseIf Math.Abs( dR1 - 90) < 10 * EPS_ANG_SMALL Or
Math.Abs( dR1 + 90) < 10 * EPS_ANG_SMALL Then
L1SawThChBx.IsEnabled = False
L2SawThChBx.IsEnabled = True
Else
L1SawThChBx.IsEnabled = False
L2SawThChBx.IsEnabled = False
End If
Else
L2SawThChBx.IsEnabled = False
End If
End Sub
Private Sub Timer_tick()
UpdateAxesNames()
UpdateUseSawThickness()
End Sub
Private Sub XXBtn_Click(sender As Object, e As RoutedEventArgs) Handles L1Btn.Click, L2Btn.Click, L3Btn.Click, R1Btn.Click, R2Btn.Click
@@ -120,7 +157,8 @@ Public Class ManualAxesMoveUC
' Assegno nome e valore asse da muovere
Dim sAxName As String = GetAxisName(CurrentBtn)
Dim dAxVal As Double = GetAxisMove(CurrentBtn)
If m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove And bG24On And sAxName = "X" Then
If ( L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked And sAxName = "X") Or
( L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked And sAxName = "Y") Then
If dAxVal > 0 Then
dAxVal += dThick
ElseIf dAxVal < 0 Then
+6 -1
View File
@@ -770,10 +770,15 @@ Public Class CurrentMachine
End Set
End Property
Friend ReadOnly Property bAddSawThTo5AxMove As Boolean
Friend Property bAddSawThTo5AxMove As Boolean
Get
Return m_bAddSawThTo5AxMove
End Get
Set(value As Boolean)
If WritePrivateProfileString(S_MACH_DIRECTCUTS, K_ADDSAWTHTO5AXMOVE, If(value, "1", "0"), sMachIniFile) Then
m_bDirectCutsFinalHome = value
End If
End Set
End Property
Friend ReadOnly Property bFsevEnable As Boolean
+34
View File
@@ -12,6 +12,8 @@ Public Class SimulationPageUC
' Stato di visualizzazione della macchina
Private m_nMachLook As Integer = MCH_LOOK.ALL
' Stato ripartenza
Private m_nRestart As Integer = 0
' Utensile corrente
Private m_sCurrTool As String = String.Empty
' Stato di comando corrente
@@ -162,6 +164,8 @@ Public Class SimulationPageUC
m_CurrProjPage.ShowContour(False)
' Nascondo eventuali testi con dati su aree
m_CurrProjPage.SetAreasStatus( false)
' Recupero eventuale fase di ripartenza
m_nRestart = m_MainWindow.m_CurrentProjectPageUC.GetProjectNcRestart()
' Imposto prima fase
EgtSetCurrPhase(1)
ShowAllCurrPhaseMachinings()
@@ -286,14 +290,44 @@ Public Class SimulationPageUC
End If
End Sub
Private Sub SkipForRestart()
' Se non c'è restart esco
If m_nRestart = 0 Then Return
' Info
m_CurrProjPage.SetInfoMessage( EgtMsg(90359) & " (" & m_nRestart.ToString() & ")") 'Restart (n)
' Salto
While m_nStatus <> MCH_SIM_ST.UI_STOP
' Eseguo movimento
Dim nMove As Integer
Dim bMove As Boolean = EgtSimMove(nMove)
If Not bMove Then Exit While
' Aggiorno visualizzazione e dati CNC (saltando le parti già fatte se in restart)
Dim nPhase As Integer = EgtGetCurrPhase()
Dim sOpeName As String = ""
Dim nOpeType As Integer = 0
EgtSimGetOperationInfo( sOpeName, nOpeType)
If ( nPhase = m_nRestart And nOpeType <> MCH_OY.DISP) Or nPhase > m_nRestart Then
Exit While
End If
End While
' Aggiorno visualizzazione
EgtDraw()
ShowCncData()
' Aspetto nuova partenza
m_nStatus = MCH_SIM_ST.UI_PAUSE
SetPlayPauseBtnToPlay()
End Sub
Private Sub ExecSim()
m_bSimExecuting = True
EgtSimStart()
LoadCurrTools()
SkipForRestart()
EgtSimSetStep(SpeedSlider.Value * m_SliderX)
While m_nStatus <> MCH_SIM_ST.UI_STOP
' Se simulazione in svolgimento
If m_nStatus = MCH_SIM_ST.UI_PLAY Or m_nStatus = MCH_SIM_ST.UI_STEP Then
m_CurrProjPage.ClearMessage()
' Eseguo movimento
Dim nMove As Integer
Dim bMove As Boolean = EgtSimMove(nMove)