Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c267aacf7 | |||
| 87037b6c6a | |||
| 74c479d17d | |||
| ead6bcec6d | |||
| a1ad658f27 | |||
| 3f769c49da | |||
| da4ddb2a7f | |||
| 3667ecb3b7 | |||
| 206af48539 | |||
| 253e92b111 | |||
| 123d6118e9 | |||
| a2104eaa03 | |||
| 65b9bfdcdb | |||
| 004591896c | |||
| 02af01052b | |||
| 2bc386807f | |||
| 82af1baae3 | |||
| 68b4dfed80 | |||
| ffc7536177 | |||
| 70368b73be | |||
| 05b4e2e95a | |||
| 1d7cdf8fa0 | |||
| c546df45ca | |||
| ef621a340a | |||
| e7e1946230 | |||
| 8dc6b63801 | |||
| 7f548e5ba6 | |||
| 2cf1be7348 | |||
| bb932788f9 | |||
| 4c0da9af53 |
+18
-8
@@ -27,7 +27,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<Label Name="CsvPathTxBl" Grid.Row="1" Background="White" FontSize="16" VerticalAlignment="Center" Padding="2,5,0,5"/>
|
<Label Name="CsvPathTxBl" Grid.Row="1" Background="White" FontSize="16" VerticalAlignment="Center" Padding="2,5,0,5"/>
|
||||||
|
|
||||||
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{StaticResource OmagCut_TreeViewGradientGray}">
|
||||||
<TreeView.Resources>
|
<TreeView.Resources>
|
||||||
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
||||||
<!--renderlo apribile con un solo click -->
|
<!--renderlo apribile con un solo click -->
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
|
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" Foreground="Black" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -123,7 +123,10 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_LightGray}"/>
|
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||||
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -131,18 +134,25 @@
|
|||||||
</HierarchicalDataTemplate>
|
</HierarchicalDataTemplate>
|
||||||
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
|
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
|
||||||
<DataTemplate DataType="{x:Type self:PartCustomItem}">
|
<DataTemplate DataType="{x:Type self:PartCustomItem}">
|
||||||
<Grid Width="246" Margin="0,5,0,5" HorizontalAlignment="Right">
|
<Grid Width="234.8" Margin="0,5,0,5" HorizontalAlignment="Right">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="60"/>
|
<ColumnDefinition Width="60"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
<TextBlock x:Name="TbName" Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
<TextBlock x:Name="TbText1" Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
||||||
<TextBlock Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
<TextBlock x:Name="TbText2" Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<DataTemplate.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||||
|
<Setter TargetName="TbName" Property="TextDecorations" Value="Strikethrough" />
|
||||||
|
<Setter TargetName="TbText1" Property="TextDecorations" Value="Strikethrough" />
|
||||||
|
<Setter TargetName="TbText2" Property="TextDecorations" Value="Strikethrough" />
|
||||||
|
</DataTrigger>
|
||||||
|
</DataTemplate.Triggers>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
|
|
||||||
|
|||||||
@@ -127,11 +127,10 @@ Public Class MoveRawPartPage
|
|||||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||||
' altrimenti, aggiorno visualizzazione
|
' altrimenti, aggiorno visualizzazione
|
||||||
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||||
EgtDraw()
|
|
||||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||||
End If
|
End If
|
||||||
'---------------------------- AUX TABLE ----------------------------
|
'---------------------------- AUX TABLE ----------------------------
|
||||||
|
EgtDraw()
|
||||||
' Carico i parametri di movimento
|
' Carico i parametri di movimento
|
||||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
||||||
' Ricavo la lunghezza del baffo di taglio
|
' Ricavo la lunghezza del baffo di taglio
|
||||||
@@ -860,6 +859,12 @@ Public Class MoveRawPartPage
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub RemovePart_KeyCancel(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles m_CurrProjPage.OnKeyCancelDownScene
|
||||||
|
If e.KeyCode = System.Windows.Forms.Keys.Delete Then
|
||||||
|
RemovePartBtn_Click(Nothing, Nothing)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
||||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nRawId <> GDB_ID.NULL
|
While nRawId <> GDB_ID.NULL
|
||||||
@@ -927,6 +932,7 @@ Public Class MoveRawPartPage
|
|||||||
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
||||||
RefreshVisibility()
|
RefreshVisibility()
|
||||||
EgtZoom(ZM.ALL, True)
|
EgtZoom(ZM.ALL, True)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||||
@@ -1362,7 +1368,7 @@ Public Class MoveRawPartPage
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' ------- VISUALIZZAZIONE -------
|
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||||
If m_SplitPage.m_bShow Then
|
If m_SplitPage.m_bShow Then
|
||||||
' verifico se la fase successiva è uno scarico frontale
|
' verifico se la fase successiva è uno scarico frontale
|
||||||
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||||
|
|||||||
+51
-37
@@ -457,21 +457,7 @@ Public Class SplitPageUC
|
|||||||
#End Region ' Bridge
|
#End Region ' Bridge
|
||||||
|
|
||||||
Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene_DoubleClick
|
Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene_DoubleClick
|
||||||
If MachiningLsBx.SelectedItems.Count = 1 Then
|
OnOffCut()
|
||||||
OnMyMouseDownScene(sender, e)
|
|
||||||
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
|
|
||||||
Dim nI As Integer = x.Ind
|
|
||||||
If m_MachiningList(nI).m_bEnabled Then
|
|
||||||
m_MachiningList(nI).m_bEnabled = False
|
|
||||||
x.bIsActive = False
|
|
||||||
Else
|
|
||||||
m_MachiningList(nI).m_bEnabled = True
|
|
||||||
x.bIsActive = True
|
|
||||||
End If
|
|
||||||
ColorMachining(m_MachiningList(nI))
|
|
||||||
ColorNumberArrow(nI)
|
|
||||||
EgtDraw()
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||||
@@ -585,6 +571,11 @@ Public Class SplitPageUC
|
|||||||
m_nDragInd = -1
|
m_nDragInd = -1
|
||||||
m_nDragType = 0
|
m_nDragType = 0
|
||||||
m_nSelected = GDB_ID.NULL
|
m_nSelected = GDB_ID.NULL
|
||||||
|
If Not IsNothing(MachiningLsBx.SelectedItem) Then
|
||||||
|
MarkMachining(MachiningLsBx.SelectedItem.Ind, False)
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
|
MachiningLsBx.SelectedIndex = -1
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -714,6 +705,11 @@ Public Class SplitPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
|
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
|
||||||
|
' se non attiva la modifica allora esco
|
||||||
|
If m_bShow Then
|
||||||
|
MachiningLsBx.SelectedIndex = -1
|
||||||
|
Return
|
||||||
|
End If
|
||||||
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
||||||
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
|
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
|
||||||
' creo lista ordinata dei selezionati
|
' creo lista ordinata dei selezionati
|
||||||
@@ -755,21 +751,10 @@ Public Class SplitPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick
|
Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick
|
||||||
|
' se disabilitata la modifica allora esco
|
||||||
|
If m_bShow Then Return
|
||||||
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
|
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
|
||||||
If MachiningLsBx.SelectedItems.Count = 1 Then
|
OnOffCut()
|
||||||
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
|
|
||||||
Dim nI As Integer = x.Ind
|
|
||||||
If m_MachiningList(nI).m_bEnabled Then
|
|
||||||
m_MachiningList(nI).m_bEnabled = False
|
|
||||||
x.bIsActive = False
|
|
||||||
Else
|
|
||||||
m_MachiningList(nI).m_bEnabled = True
|
|
||||||
x.bIsActive = True
|
|
||||||
End If
|
|
||||||
ColorMachining(m_MachiningList(nI))
|
|
||||||
ColorNumberArrow(nI)
|
|
||||||
EgtDraw()
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click
|
Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click
|
||||||
@@ -1890,7 +1875,7 @@ Public Class SplitPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
||||||
' ------- VISUALIZZAZIONE -------
|
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||||
If m_bShow Then
|
If m_bShow Then
|
||||||
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||||
' recupero l'operazione successiva
|
' recupero l'operazione successiva
|
||||||
@@ -1973,22 +1958,22 @@ Public Class SplitPageUC
|
|||||||
NumberDirectionMachining(nI)
|
NumberDirectionMachining(nI)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
' -------------------- Recupero le lavorazioni indicate come attive -- INIZIO --------------------
|
||||||
Dim ActiveMachLst As New List(Of Integer)
|
Dim ActiveMachLst As New List(Of Integer)
|
||||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||||
ActiveMachLst.Add(ItemSplitMach.Ind)
|
If ItemSplitMach.bIsActive Then ActiveMachLst.Add(ItemSplitMach.Ind)
|
||||||
Next
|
Next
|
||||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
' -------------------- Recupero le lavorazioni indicate come attive -- FINE --------------------
|
||||||
|
|
||||||
' Preparo la lista degli Item
|
' Preparo la lista degli Item
|
||||||
ShowMachiningList()
|
ShowMachiningList()
|
||||||
|
|
||||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
' -------------------- Riattivo le lavorazioni precedenti -- INIZIO --------------------
|
||||||
|
|
||||||
For Each Item As SplitMach In m_MachiningList
|
For Each Item As SplitMach In m_MachiningList
|
||||||
|
' spengo tutte le lavorazioni disponibili
|
||||||
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
|
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
|
||||||
Next
|
Next
|
||||||
|
' riattivo solo quelle indicate come attive
|
||||||
For nIndex As Integer = 0 To ActiveMachLst.Count - 1
|
For nIndex As Integer = 0 To ActiveMachLst.Count - 1
|
||||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||||
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
|
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
|
||||||
@@ -2001,7 +1986,7 @@ Public Class SplitPageUC
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
' -------------------- Riattivo le lavorazioni precedenti -- FINE --------------------
|
||||||
|
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -2199,6 +2184,35 @@ Public Class SplitPageUC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnOffCut()
|
||||||
|
If MachiningLsBx.SelectedItems.Count = 1 Then
|
||||||
|
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
|
||||||
|
Dim nI As Integer = x.Ind
|
||||||
|
If m_MachiningList(nI).m_bEnabled Then
|
||||||
|
m_MachiningList(nI).m_bEnabled = False
|
||||||
|
x.bIsActive = False
|
||||||
|
Else
|
||||||
|
m_MachiningList(nI).m_bEnabled = True
|
||||||
|
x.bIsActive = True
|
||||||
|
End If
|
||||||
|
ColorMachining(m_MachiningList(nI))
|
||||||
|
ColorNumberArrow(nI)
|
||||||
|
EgtDraw()
|
||||||
|
' Imposto flag di modifica
|
||||||
|
m_bModified = True
|
||||||
|
' recupero l'elenco degli elementi selezionati
|
||||||
|
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||||
|
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||||
|
ItemList.Add(Item)
|
||||||
|
Next
|
||||||
|
VerifyHomogenousMachining(ItemList)
|
||||||
|
' Abilitazione bottone Next
|
||||||
|
EnableButtons()
|
||||||
|
Else
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
||||||
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
|||||||
@@ -129,6 +129,7 @@
|
|||||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||||
Public Const K_NAXES As String = "nAxes"
|
Public Const K_NAXES As String = "nAxes"
|
||||||
|
Public Const K_RESETSTATUS As String = "ResetStatus"
|
||||||
' Nuove variabili
|
' Nuove variabili
|
||||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||||
Public Const K_XYJOG As String = "XYJog"
|
Public Const K_XYJOG As String = "XYJog"
|
||||||
|
|||||||
@@ -755,8 +755,17 @@ Public MustInherit Class MachineButton
|
|||||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
||||||
|
|
||||||
|
' versione 2.6h1
|
||||||
|
Dim sCurrTable As String = String.Empty
|
||||||
|
Dim nCuttTable As Integer = 1
|
||||||
|
EgtGetTableName(sCurrTable)
|
||||||
|
If sCurrTable <> "MainTab" Then nCuttTable = 2
|
||||||
|
EgtLuaSetGlobIntVar("CMD.TABLE", nCuttTable)
|
||||||
|
|
||||||
EgtLuaCallFunction("CmdString")
|
EgtLuaCallFunction("CmdString")
|
||||||
' Leggo variabili
|
|
||||||
|
' Leggo variabili da file Lua
|
||||||
CmdString = String.Empty
|
CmdString = String.Empty
|
||||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||||
b2Start = False
|
b2Start = False
|
||||||
|
|||||||
@@ -53,14 +53,43 @@ Public Class ManualAxesMoveUC
|
|||||||
' Imposto check per considerare spessore lama
|
' Imposto check per considerare spessore lama
|
||||||
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||||
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||||
|
|
||||||
|
' Aggiorno visualizzazione
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
EgtDraw()
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
m_Timer.Stop()
|
m_Timer.Stop()
|
||||||
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
||||||
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
||||||
|
' Nascondo la macchina
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function SetMachineInCurrPos() As Boolean
|
||||||
|
' 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 Return False
|
||||||
|
' Recupero il nome degli assi macchina
|
||||||
|
Dim sL1 As String = String.Empty
|
||||||
|
Dim sL2 As String = String.Empty
|
||||||
|
Dim sL3 As String = String.Empty
|
||||||
|
Dim sR1 As String = String.Empty
|
||||||
|
Dim sR2 As String = String.Empty
|
||||||
|
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||||
|
' Visualizzo macchina in posizione
|
||||||
|
EgtSetAxisPos(sL1, dL1)
|
||||||
|
EgtSetAxisPos(sL2, dL2)
|
||||||
|
EgtSetAxisPos(sL3, dL3)
|
||||||
|
EgtSetAxisPos(sR1, dR1)
|
||||||
|
EgtSetAxisPos(sR2, dR2)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub UpdateAxesNames()
|
Private Sub UpdateAxesNames()
|
||||||
Dim sL1 As String = String.Empty
|
Dim sL1 As String = String.Empty
|
||||||
Dim sL2 As String = String.Empty
|
Dim sL2 As String = String.Empty
|
||||||
@@ -125,11 +154,16 @@ Public Class ManualAxesMoveUC
|
|||||||
Private Sub Timer_tick()
|
Private Sub Timer_tick()
|
||||||
UpdateAxesNames()
|
UpdateAxesNames()
|
||||||
UpdateUseSawThickness()
|
UpdateUseSawThickness()
|
||||||
|
' Aggiorno posizione macchina in disegno
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
' Aggiorno il disegno
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private m_MoveClicked As Boolean = False
|
Private m_MoveClicked As Boolean = False
|
||||||
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
||||||
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
||||||
|
EgtOutLog(" → Hold on! Do not click compulsively.")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
m_MoveClicked = True
|
m_MoveClicked = True
|
||||||
@@ -216,6 +250,7 @@ Public Class ManualAxesMoveUC
|
|||||||
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
||||||
' leggo se stato reset
|
' leggo se stato reset
|
||||||
If Not m_CN.bResetState Then
|
If Not m_CN.bResetState Then
|
||||||
|
EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.")
|
||||||
m_MoveClicked = False
|
m_MoveClicked = False
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -530,6 +530,10 @@ Public Class SawTestUC
|
|||||||
ElseIf nWSide = MCH_SAW_WS.LEFT Then
|
ElseIf nWSide = MCH_SAW_WS.LEFT Then
|
||||||
vtPerp = vtDir
|
vtPerp = vtDir
|
||||||
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
||||||
|
Else
|
||||||
|
m_CurrProjPage.ClearMessage()
|
||||||
|
' 91144 = Set machining side: right or left.
|
||||||
|
m_CurrProjPage.SetInfoMessage(EgtMsg(91144))
|
||||||
End If
|
End If
|
||||||
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
||||||
Dim dLen2 As Double = m_dLen / 2
|
Dim dLen2 As Double = m_dLen / 2
|
||||||
|
|||||||
@@ -1265,7 +1265,7 @@ Public Class AlarmsPageUC
|
|||||||
System.Threading.Thread.Sleep(300)
|
System.Threading.Thread.Sleep(300)
|
||||||
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||||
' Creo MsgBox di attesa
|
' Creo MsgBox di attesa
|
||||||
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_DIRECTCUTPAGEUC + 41), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, String.Format(EgtMsg(MSG_DIRECTCUTPAGEUC + 41), ToolForProbing.m_ToolName), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
' Definisco flag tastatura
|
' Definisco flag tastatura
|
||||||
Dim bProbingOk As Boolean = False
|
Dim bProbingOk As Boolean = False
|
||||||
|
|||||||
@@ -1662,7 +1662,9 @@ Public Class CurrentMachine
|
|||||||
Dim dToolDiam As Double = 0
|
Dim dToolDiam As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
||||||
' Confronto con massimo ammesso
|
' Confronto con massimo ammesso
|
||||||
Return (dToolDiam <= dMaxSawDiamForProbe)
|
Dim bOk As Boolean = dToolDiam <= dMaxSawDiamForProbe
|
||||||
|
If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for probing")
|
||||||
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function GetPrivateProfileMaterial(
|
Friend Function GetPrivateProfileMaterial(
|
||||||
|
|||||||
+3
-2
@@ -343,8 +343,8 @@ Class MainWindow
|
|||||||
' Verifico abilitazione nesting automatico
|
' Verifico abilitazione nesting automatico
|
||||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||||
' Recupero opzioni della chiave
|
' Recupero opzioni della chiave
|
||||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2607, 1, m_nKeyLevel) And
|
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2610, 1, m_nKeyLevel) And
|
||||||
EgtGetKeyOptions(9423, 2607, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 2610, 1, m_nKeyOptions)
|
||||||
' Verifico abilitazione prodotto
|
' Verifico abilitazione prodotto
|
||||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||||
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
||||||
@@ -461,6 +461,7 @@ Class MainWindow
|
|||||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
||||||
Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
||||||
|
EgtOutLog("Warning: Missing file 'TestWork.lua' in folder 'DirectCmd', buttun 'TEST' collapsed!")
|
||||||
Else
|
Else
|
||||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Imports System.Windows
|
|||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("OmagCUT")>
|
<Assembly: AssemblyProduct("OmagCUT")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2015-2023 by Egalware s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2015-2024 by Egalware s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.6.7.6")>
|
<Assembly: AssemblyVersion("2.6.10.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.6.7.6")>
|
<Assembly: AssemblyFileVersion("2.6.10.1")>
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ Public Class CNCommunication
|
|||||||
For Each proc As System.Diagnostics.Process In pList
|
For Each proc As System.Diagnostics.Process In pList
|
||||||
If proc.ProcessName.ToString = sAppName Then
|
If proc.ProcessName.ToString = sAppName Then
|
||||||
proc.Kill()
|
proc.Kill()
|
||||||
|
EgtOutLog("ProcessKill : " & """" & sProcessName & """")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
@@ -388,6 +389,9 @@ Public Class CNCommunication
|
|||||||
m_CN.SetCnDataVar(CN_generico.CnData.VacuumOff, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.VacuumOff, sVal)
|
||||||
GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||||
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
||||||
|
' ver 2.6i1 : nuova gestione SiemensONE
|
||||||
|
GetPrivateProfileString(S_NCDATA, K_RESETSTATUS, "", sVal, m_MainWindow.GetMachIniFile())
|
||||||
|
m_CN.SetCnDataVar(CN_generico.CnData.ResetStatus, sVal)
|
||||||
|
|
||||||
' nuove variabili: stato dei nuovi pulsanti
|
' nuove variabili: stato dei nuovi pulsanti
|
||||||
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
||||||
@@ -484,7 +488,12 @@ Public Class CNCommunication
|
|||||||
End If
|
End If
|
||||||
nVarType = VarType.TBoolean
|
nVarType = VarType.TBoolean
|
||||||
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayBool)
|
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayBool)
|
||||||
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayBool, ItemIndex, nVarType))
|
Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayBool, ItemIndex, nVarType)
|
||||||
|
If sItem.Count = 3 Then
|
||||||
|
' forzo la lettura della variabile di default (ignoro lo stato letto da CN)
|
||||||
|
NewRefFlafSiemens.DefaultValue = sItem(2)
|
||||||
|
End If
|
||||||
|
ListReferenceIndex.Add(NewRefFlafSiemens)
|
||||||
nIndexArrayBool += 1
|
nIndexArrayBool += 1
|
||||||
Case 1
|
Case 1
|
||||||
If nIndexArrayInt > 14 Then
|
If nIndexArrayInt > 14 Then
|
||||||
@@ -539,7 +548,12 @@ Public Class CNCommunication
|
|||||||
Next
|
Next
|
||||||
nVarType = VarType.TInteger
|
nVarType = VarType.TInteger
|
||||||
m_CN.DVariables_Read_Subscription(sVarName, nVarType, nIndexArrayInt_1)
|
m_CN.DVariables_Read_Subscription(sVarName, nVarType, nIndexArrayInt_1)
|
||||||
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayInt_1, ItemIndex, nVarType, sIndexBit))
|
Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayInt_1, ItemIndex, nVarType, sIndexBit)
|
||||||
|
If sItem.Count = 3 Then
|
||||||
|
' forzo la lettura della variabile di default (ignoro lo stato letto da CN)
|
||||||
|
NewRefFlafSiemens.DefaultValue = sItem(2)
|
||||||
|
End If
|
||||||
|
ListReferenceIndex.Add(NewRefFlafSiemens)
|
||||||
If Not bFound Then
|
If Not bFound Then
|
||||||
nIndexArrayInt += 1
|
nIndexArrayInt += 1
|
||||||
ListIndexToVar.Add(New IndexArrayToBit(nIndexArrayInt_1, sVarName.Trim))
|
ListIndexToVar.Add(New IndexArrayToBit(nIndexArrayInt_1, sVarName.Trim))
|
||||||
@@ -1213,6 +1227,7 @@ Public Class CNCommunication
|
|||||||
Dim nFlag As Integer = ListReferenceIndex(IndxLst).FlagIndex
|
Dim nFlag As Integer = ListReferenceIndex(IndxLst).FlagIndex
|
||||||
Dim nIndex As Integer = ListReferenceIndex(IndxLst).SiemnesArrayIndex
|
Dim nIndex As Integer = ListReferenceIndex(IndxLst).SiemnesArrayIndex
|
||||||
Dim nIndexBit As Integer = ListReferenceIndex(IndxLst).IndexBit
|
Dim nIndexBit As Integer = ListReferenceIndex(IndxLst).IndexBit
|
||||||
|
Dim sDefaultValue As String = ListReferenceIndex(IndxLst).DefaultValue
|
||||||
Dim b_temp As Boolean = False
|
Dim b_temp As Boolean = False
|
||||||
Dim n_temp As Integer = 0
|
Dim n_temp As Integer = 0
|
||||||
Dim l_temp As Long = 0.0
|
Dim l_temp As Long = 0.0
|
||||||
@@ -1220,11 +1235,31 @@ Public Class CNCommunication
|
|||||||
' leggo il valore caricato
|
' leggo il valore caricato
|
||||||
Select Case nType
|
Select Case nType
|
||||||
Case VarType.TBoolean
|
Case VarType.TBoolean
|
||||||
b_temp = m_CN.b_data(nIndex)
|
If Not String.IsNullOrEmpty(sDefaultValue) Then
|
||||||
|
' ver 2.6i1
|
||||||
|
Try
|
||||||
|
b_temp = CBool(sDefaultValue)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Default boolean value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0")
|
||||||
|
b_temp = m_CN.b_data(nIndex)
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
b_temp = m_CN.b_data(nIndex)
|
||||||
|
End If
|
||||||
Case VarType.TInteger
|
Case VarType.TInteger
|
||||||
n_temp = m_CN.n_data(nIndex)
|
n_temp = m_CN.n_data(nIndex)
|
||||||
' VENTOSE: lettura dato da intero Bit a Bit (ver_2.6h1), ritorno un Boolean
|
' VENTOSE: lettura dato da intero Bit a Bit (ver_2.6h1), ritorno un Boolean
|
||||||
b_temp = ReadBit(nIndexBit, n_temp)
|
If Not String.IsNullOrEmpty(sDefaultValue) Then
|
||||||
|
' ver 2.6i1
|
||||||
|
Try
|
||||||
|
b_temp = CBool(sDefaultValue)
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Default bit value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0")
|
||||||
|
b_temp = ReadBit(nIndexBit, n_temp)
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
b_temp = ReadBit(nIndexBit, n_temp)
|
||||||
|
End If
|
||||||
Case VarType.TLong
|
Case VarType.TLong
|
||||||
l_temp = m_CN.l_data(nIndex)
|
l_temp = m_CN.l_data(nIndex)
|
||||||
Case VarType.TDouble
|
Case VarType.TDouble
|
||||||
@@ -1342,6 +1377,8 @@ Public Class CNCommunication
|
|||||||
Case CN_generico.CnData.nAxes ' (55)
|
Case CN_generico.CnData.nAxes ' (55)
|
||||||
m_CN.n_index_is_G24_active = nIndex
|
m_CN.n_index_is_G24_active = nIndex
|
||||||
m_CN.b5AxesState = b_temp
|
m_CN.b5AxesState = b_temp
|
||||||
|
Case CN_generico.CnData.ResetStatus ' (56)
|
||||||
|
m_CN.bResetState = b_temp
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
@@ -1455,6 +1492,11 @@ Public Class CNCommunication
|
|||||||
Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer,
|
Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer,
|
||||||
Optional bActivate As Boolean = True) As Boolean
|
Optional bActivate As Boolean = True) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
|
|
||||||
|
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
||||||
|
' m_nNCType = 2
|
||||||
|
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
' Download programma
|
' Download programma
|
||||||
If m_MainWindow.m_bNCLink Then
|
If m_MainWindow.m_bNCLink Then
|
||||||
bOk = (m_nNCType > 0)
|
bOk = (m_nNCType > 0)
|
||||||
@@ -1488,7 +1530,7 @@ Public Class CNCommunication
|
|||||||
' Attesa opportuna
|
' Attesa opportuna
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||||
End If
|
End If
|
||||||
EgtOutLog("Download_NC_prog(sCncPath, sNumProg)")
|
EgtOutLog("Download_NC_prog(" & sCncPath & ", " & sNumProg.ToString & ")")
|
||||||
' -------------- START DOWNLOAD --------------
|
' -------------- START DOWNLOAD --------------
|
||||||
TimeSpanInit()
|
TimeSpanInit()
|
||||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||||
@@ -1667,6 +1709,7 @@ Public Class RefereceFlagSimens
|
|||||||
Private m_TypeArray As Integer
|
Private m_TypeArray As Integer
|
||||||
' Opzionale
|
' Opzionale
|
||||||
Private m_IndexBit As Integer = -1
|
Private m_IndexBit As Integer = -1
|
||||||
|
Private m_DefaultValue As String = ""
|
||||||
|
|
||||||
Public Property SiemnesArrayIndex As Integer
|
Public Property SiemnesArrayIndex As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1704,6 +1747,15 @@ Public Class RefereceFlagSimens
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property DefaultValue As String
|
||||||
|
Get
|
||||||
|
Return m_DefaultValue
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_DefaultValue = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Sub New(IndArray As Integer, Flag As Integer, nType As Integer)
|
Sub New(IndArray As Integer, Flag As Integer, nType As Integer)
|
||||||
m_SiemnesArrayIndex = IndArray
|
m_SiemnesArrayIndex = IndArray
|
||||||
m_FlagIndex = Flag
|
m_FlagIndex = Flag
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Public MustInherit Class CN_generico
|
|||||||
Public Const MAX_VAR As Short = 100
|
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_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
||||||
Public Const MAX_TOOLS As Short = 100
|
Public Const MAX_TOOLS As Short = 100
|
||||||
Public Const NUM_DATA = 56 ' Numero di dati del CN (Speed,Feed,...)
|
Public Const NUM_DATA = 57 ' Numero di dati del CN (Speed,Feed,...)
|
||||||
|
|
||||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||||
|
|
||||||
@@ -72,6 +72,8 @@ Public MustInherit Class CN_generico
|
|||||||
EnablePC = 54
|
EnablePC = 54
|
||||||
|
|
||||||
nAxes = 55
|
nAxes = 55
|
||||||
|
|
||||||
|
ResetStatus = 56
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Public Enum Type As Short
|
Public Enum Type As Short
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Public Class CurrentProjectPageUC
|
|||||||
Friend Event OnMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Event OnMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||||
|
Friend Event OnKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs)
|
||||||
' Riferimento alla MainWindow
|
' Riferimento alla MainWindow
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
@@ -353,6 +354,10 @@ Public Class CurrentProjectPageUC
|
|||||||
SetInfoMessage(DistToString(vtDist))
|
SetInfoMessage(DistToString(vtDist))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMyKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles CurrentProjectScene.KeyDown
|
||||||
|
RaiseEvent OnKeyCancelDownScene(sender, e)
|
||||||
|
End Sub
|
||||||
|
|
||||||
' Gestione progetto
|
' Gestione progetto
|
||||||
|
|
||||||
Friend Sub SetNextProjectIndex()
|
Friend Sub SetNextProjectIndex()
|
||||||
@@ -518,7 +523,7 @@ Public Class CurrentProjectPageUC
|
|||||||
' Sistemazioni finali
|
' Sistemazioni finali
|
||||||
If nAddTabId = GDB_ID.NULL Then Return False
|
If nAddTabId = GDB_ID.NULL Then Return False
|
||||||
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
||||||
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
If nRefAddTabId = GDB_ID.NULL Then EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||||
EgtSetInfo(nAddTabId, KEY_ADD_TABLE, dAddTable)
|
EgtSetInfo(nAddTabId, KEY_ADD_TABLE, dAddTable)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -333,6 +333,10 @@ Public Class ProjectMgrUC
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dHeight)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dHeight)
|
||||||
' Raggio lama
|
' Raggio lama
|
||||||
dHeight = dHeight / 2
|
dHeight = dHeight / 2
|
||||||
|
ElseIf CurrTestTool.ToolIsLaser Then
|
||||||
|
' Raggio
|
||||||
|
dThick = 0
|
||||||
|
dHeight = 0
|
||||||
Else
|
Else
|
||||||
' Diametro FRESA/FORETTO (l'altezza non serve: posizione calcolata tiene conto del Tip Tool)
|
' Diametro FRESA/FORETTO (l'altezza non serve: posizione calcolata tiene conto del Tip Tool)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dThick)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dThick)
|
||||||
@@ -399,6 +403,10 @@ Public Class ProjectMgrUC
|
|||||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||||
' Forzo B90
|
' Forzo B90
|
||||||
dB1 = 90
|
dB1 = 90
|
||||||
|
' Forzo la pozione in Z alla quota di Home (per evitare l'errore di fine corsa asse Z)
|
||||||
|
Dim dHomeZ As Double = 0
|
||||||
|
EgtGetAxisHomePos("Z", dHomeZ)
|
||||||
|
ptMid.z = dHomeZ
|
||||||
Else
|
Else
|
||||||
' Se utensile speciale
|
' Se utensile speciale
|
||||||
If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
||||||
@@ -424,6 +432,7 @@ Public Class ProjectMgrUC
|
|||||||
' verifica assi lineari
|
' verifica assi lineari
|
||||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||||
If nStat <> 0 Then
|
If nStat <> 0 Then
|
||||||
|
EgtOutLog("Out of stroke: " & nStat)
|
||||||
vtDirT = -vtDirT
|
vtDirT = -vtDirT
|
||||||
ptMid -= vtDirT * dThick
|
ptMid -= vtDirT * dThick
|
||||||
If CurrTestTool.ToolIsSaw Then
|
If CurrTestTool.ToolIsSaw Then
|
||||||
@@ -455,6 +464,12 @@ Public Class ProjectMgrUC
|
|||||||
End If
|
End If
|
||||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
' 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)
|
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||||
|
|
||||||
|
' verifica assi lineari
|
||||||
|
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||||
|
If nStat <> 0 Then
|
||||||
|
EgtOutLog("2nd attemp out of stroke: " & nStat)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
||||||
@@ -744,6 +759,12 @@ Public Class ProjectMgrUC
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' leggo il nome della tavola da cui sto lanciando il progetto
|
||||||
|
Dim sTabeName As String = String.Empty
|
||||||
|
EgtGetTableName(sTabeName)
|
||||||
|
Dim bDoubleProg As Boolean = (GetPrivateProfileInt(S_PRODUCTIONLINE, "DoubleProg", 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
|
|
||||||
' Leggo eventuale variabile per lavorazione con 2 tavole in parallelo (standard E80027)
|
' Leggo eventuale variabile per lavorazione con 2 tavole in parallelo (standard E80027)
|
||||||
Dim nVarProgTwins As Integer = 1
|
Dim nVarProgTwins As Integer = 1
|
||||||
If Not String.IsNullOrWhiteSpace(m_CurrMachine.sVarProgTwins) Then
|
If Not String.IsNullOrWhiteSpace(m_CurrMachine.sVarProgTwins) Then
|
||||||
@@ -757,8 +778,26 @@ Public Class ProjectMgrUC
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Verifico se posso scrivere nell'area 1
|
' Verifico se posso scrivere nell'area 1
|
||||||
If nVarProg1 = 0 And (nVarProg2 <> 1 Or nVarProgTwins = 2) Then
|
Dim bSendToAre1 As Boolean = (nVarProg1 = 0 And (nVarProg2 <> 1 Or nVarProgTwins = 2))
|
||||||
|
Dim bSendToAre2 As Boolean = (nVarProg2 = 0 And (nVarProg1 <> 1 Or nVarProgTwins = 2))
|
||||||
|
|
||||||
|
If bDoubleProg Then
|
||||||
|
If sTabeName = MAIN_TAB Then
|
||||||
|
' spedisco il programma da tavola 1 solo se CN ha terminato programma 901
|
||||||
|
bSendToAre1 = (nVarProg1 = 0)
|
||||||
|
bSendToAre2 = False
|
||||||
|
EgtOutLog(" Invio programma da tavola 1")
|
||||||
|
Else
|
||||||
|
' spedisco il programma da tavola 2 solo se CN ha terminato programma 902
|
||||||
|
bSendToAre1 = False
|
||||||
|
bSendToAre2 = (nVarProg2 = 0)
|
||||||
|
EgtOutLog(" Invio programma da tavola 2")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If bSendToAre1 Then
|
||||||
m_CurrNcComm.SetProgramMainOrSub(False)
|
m_CurrNcComm.SetProgramMainOrSub(False)
|
||||||
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg1, False) Then
|
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg1, False) Then
|
||||||
' Dichiaro part program inviato
|
' Dichiaro part program inviato
|
||||||
@@ -775,7 +814,7 @@ Public Class ProjectMgrUC
|
|||||||
End If
|
End If
|
||||||
m_CurrNcComm.SetProgramMainOrSub(True)
|
m_CurrNcComm.SetProgramMainOrSub(True)
|
||||||
' Altrimenti verifico se posso scrivere nell'area 2
|
' Altrimenti verifico se posso scrivere nell'area 2
|
||||||
ElseIf nVarProg2 = 0 And (nVarProg1 <> 1 Or nVarProgTwins = 2) Then
|
ElseIf bSendToAre2 Then
|
||||||
m_CurrNcComm.SetProgramMainOrSub(False)
|
m_CurrNcComm.SetProgramMainOrSub(False)
|
||||||
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg2, False) Then
|
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg2, False) Then
|
||||||
' Dichiaro part program inviato
|
' Dichiaro part program inviato
|
||||||
@@ -795,6 +834,12 @@ Public Class ProjectMgrUC
|
|||||||
Else
|
Else
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
||||||
End If
|
End If
|
||||||
|
' avvio programma solo se DoubleProg
|
||||||
|
If (GetPrivateProfileInt(S_GENERAL, K_STARTPROGRAM, 0, m_MainWindow.GetIniFile()) <> 0 And bDoubleProg) And
|
||||||
|
(bSendToAre1 Or bSendToAre2) Then
|
||||||
|
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||||
|
MyCicloStartWD.ShowDialog()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
@@ -967,7 +1012,8 @@ Public Class ProjectMgrUC
|
|||||||
'EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
'EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||||
|
|
||||||
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
||||||
EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolAlias)
|
EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolName)
|
||||||
|
EgtLuaSetGlobStringVar("CMD.TLALIAS", SelTestTool.ToolAlias)
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||||
|
|||||||
Reference in New Issue
Block a user