OmagCUT 1.6r10 :
- modifiche varie per linea.
This commit is contained in:
+2
-2
@@ -33,8 +33,8 @@
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Name="LogoBrd" Grid.Column="1" Style="{StaticResource OmagCut_IconBorder}">
|
||||
<Image Source="Resources/LogoOmag.jpg" Stretch="Fill"/>
|
||||
<Border Name="LogoBrd" Grid.Column="1" Background="White">
|
||||
<Image Source="Resources/LogoOmag.jpg" Stretch="Uniform"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ Public Class AboutBoxWD
|
||||
VersionLbl.Text = "Version : " & My.Application.Info.Version.ToString()
|
||||
Dim sKey As String = String.Empty
|
||||
EgtGetKeyInfo(sKey)
|
||||
Dim sOpts As String = m_MainWindow.GetKeyOptions()
|
||||
Dim sOpts As String = m_MainWindow.GetKeyOptions().ToString()
|
||||
KeyLbl.Text = sKey & " - " & sOpts
|
||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
|
||||
|
||||
+14
-9
@@ -171,13 +171,13 @@ Public Class CNCommunication
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.SpeedOvr, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_POWER, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.Power, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, "Spindle", "", sVal, m_MainWindow.GetMachIniFile())
|
||||
GetPrivateProfileString(S_NCDATA, K_SPINDLE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.Spindle, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, "Coolant", "", sVal, m_MainWindow.GetMachIniFile())
|
||||
GetPrivateProfileString(S_NCDATA, K_COOLANT, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.Coolant, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, "Laser", "", sVal, m_MainWindow.GetMachIniFile())
|
||||
GetPrivateProfileString(S_NCDATA, K_LASER, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.Laser, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, "PowerOvr", "", sVal, m_MainWindow.GetMachIniFile())
|
||||
GetPrivateProfileString(S_NCDATA, K_POWEROVR, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.PowerOvr, sVal)
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
@@ -229,6 +229,7 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.m_CN = Me.m_CN
|
||||
m_MainWindow.m_DirectCutPageUC.m_ManualAxesMove.m_CN = Me.m_CN
|
||||
m_MainWindow.m_DirectCutPageUC.m_CN = Me.m_CN
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.m_CN = Me.m_CN
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -416,7 +417,8 @@ Public Class CNCommunication
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer) As Boolean
|
||||
Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer,
|
||||
Optional bActivate As Boolean = True) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' Download programma
|
||||
If m_MainWindow.m_bNCLink Then
|
||||
@@ -435,10 +437,13 @@ Public Class CNCommunication
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' Attivazione programma
|
||||
bOk = bOk AndAlso (m_CN.ActivateProgram(nNumProg) = 0)
|
||||
' Modalità automatica
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
||||
' Se richiesta attivazione
|
||||
If bActivate Then
|
||||
' Attivazione programma
|
||||
bOk = bOk AndAlso (m_CN.ActivateProgram(nNumProg) = 0)
|
||||
' Modalità automatica
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
||||
End If
|
||||
' Messaggio con risultato
|
||||
If bOk Then
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90317)) 'Programma CN trasmesso con successo
|
||||
|
||||
@@ -94,6 +94,8 @@ Module ConstGen
|
||||
Public Const INFO_REDUCEDCUT = "ReducedCut"
|
||||
' Info per lavorazioni già ordinate
|
||||
Public Const INFO_MACHORDER As String = "MachOrder"
|
||||
' Info per indice progetto
|
||||
Public Const INFO_PROJINDEX As String = "ProjIndex"
|
||||
|
||||
' Nome layer delle regioni
|
||||
Public Const NAME_REGION As String = "Region"
|
||||
|
||||
@@ -29,6 +29,17 @@
|
||||
Public Const K_SPEED As String = "Speed"
|
||||
Public Const K_SPEEDOVR As String = "SpeedOvr"
|
||||
Public Const K_POWER As String = "Power"
|
||||
Public Const K_SPINDLE As String = "Spindle"
|
||||
Public Const K_COOLANT As String = "Coolant"
|
||||
Public Const K_LASER As String = "Laser"
|
||||
Public Const K_POWEROVR As String = "PowerOvr"
|
||||
|
||||
Public Const S_PRODUCTIONLINE As String = "ProductionLine"
|
||||
Public Const K_ACTIVE As String = "Active"
|
||||
Public Const K_NAMEPROG1 As String = "NameProg1"
|
||||
Public Const K_VARPROG1 As String = "VarProg1"
|
||||
Public Const K_NAMEPROG2 As String = "NameProg2"
|
||||
Public Const K_VARPROG2 As String = "VarProg2"
|
||||
|
||||
Public Const S_TABLE As String = "Table"
|
||||
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
|
||||
|
||||
@@ -483,17 +483,17 @@ Public Class CurrentProjectPageUC
|
||||
End Function
|
||||
|
||||
Friend Function SetOrderMachiningFlag() As Boolean
|
||||
Dim nMarkId As Integer = m_MainWindow.m_CurrentProjectPageUC.AddProjectMark()
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_MACHORDER, 1)
|
||||
End Function
|
||||
|
||||
Friend Function ResetOrderMachiningFlag() As Boolean
|
||||
Dim nMarkId As Integer = m_MainWindow.m_CurrentProjectPageUC.AddProjectMark()
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtRemoveInfo(nMarkId, INFO_MACHORDER)
|
||||
End Function
|
||||
|
||||
Friend Function GetOrderMachiningFlag() As Boolean
|
||||
Dim nMarkId As Integer = m_MainWindow.m_CurrentProjectPageUC.AddProjectMark()
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim nFlag As Integer
|
||||
If EgtGetInfo(nMarkId, INFO_MACHORDER, nFlag) Then
|
||||
Return (nFlag <> 0)
|
||||
@@ -502,6 +502,11 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
End Function
|
||||
|
||||
Friend Function SetProjectIndexFlag() As Boolean
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_PROJINDEX, Math.Abs(m_nCurrProj))
|
||||
End Function
|
||||
|
||||
Friend Sub UpdateHeightTxBx()
|
||||
HeightTxBx.Text = LenToString(m_dRawHeight, 2)
|
||||
End Sub
|
||||
|
||||
+2
-2
@@ -27,8 +27,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Name="LogoBrd" Style="{StaticResource OmagCut_IconBorder}">
|
||||
<Image Source="Resources/LogoOmag.jpg" Stretch="Fill"/>
|
||||
<Border Name="LogoBrd" Background="Transparent">
|
||||
<Image Source="Resources/LogoOmag.jpg" Stretch="Uniform" Margin="1"/>
|
||||
</Border>
|
||||
|
||||
<!-- ** Definizione della Grid delle tab ** -->
|
||||
|
||||
+2
-1
@@ -66,7 +66,8 @@ Class MainWindow
|
||||
MAN_PHOTO = 8
|
||||
AUTO_PHOTO = 16
|
||||
AUTO_NESTING = 32
|
||||
ACTIVE_MILL = 64
|
||||
ENABLE_MILL = 64
|
||||
PROCUCTION_LINE = 128
|
||||
End Enum
|
||||
|
||||
' Dichiarazione lista per ListBox della ImportPage
|
||||
|
||||
@@ -60,5 +60,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.18.9")>
|
||||
<Assembly: AssemblyFileVersion("1.6.18.9")>
|
||||
<Assembly: AssemblyVersion("1.6.18.10")>
|
||||
<Assembly: AssemblyFileVersion("1.6.18.10")>
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="LanguageCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox Name="LanguageCmBx" Grid.Column="1" Grid.Row="1" MinWidth="49" Height="40">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label Content="{Binding LanguageName}" FontSize="20" />
|
||||
@@ -59,7 +59,7 @@
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1" Height="40">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label Content="{Binding}" FontSize="20" />
|
||||
|
||||
+82
-5
@@ -208,6 +208,8 @@ Public Class ProjectMgrUC
|
||||
bOk = UpdateAllMachiningsToolpaths() And bOk
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Inserisco indice di progetto
|
||||
m_CurrProjPage.SetProjectIndexFlag()
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\MachProj.nge"
|
||||
m_CurrProjPage.SaveFile(sMchPath)
|
||||
@@ -235,11 +237,86 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' Recupero flag per linea di produzione e verifico abilitazione da chiave
|
||||
Dim bProdLine As Boolean = (GetPrivateProfileInt(S_PRODUCTIONLINE, K_ACTIVE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
If bProdLine And Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.PROCUCTION_LINE) Then
|
||||
bProdLine = False
|
||||
' Errore - Linea di produzione non abilitata
|
||||
Dim InfoBox As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_EGTMSGBOX + 15), EgtMsg(MSG_EGTMSGBOX + 16), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
End If
|
||||
' Se macchina normale
|
||||
If Not bProdLine Then
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
End If
|
||||
' Altrimenti linea
|
||||
Else
|
||||
' Se non collegato alla macchina
|
||||
If Not m_MainWindow.m_bNCLink Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
|
||||
Return
|
||||
End If
|
||||
' Verifico se posso scrivere il programma 1
|
||||
Dim sVarProg1 As String = String.Empty
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", sVarProg1, m_MainWindow.GetMachIniFile())
|
||||
' Leggo variabile relativa (standard E80021)
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sVarProg1, 1)
|
||||
Dim nVarProg1 As Integer = 99
|
||||
For I = 0 To 20
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarProg1 = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' Se area di memoria libera, invio programma
|
||||
If nVarProg1 = 0 Then
|
||||
Dim nProg1 As Integer = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile())
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, nProg1, False) Then
|
||||
' Copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj1.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' Salvo il progetto
|
||||
m_CurrProjPage.SaveProject()
|
||||
' Dichiaro programma inviato
|
||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(sVarProg1, "1")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Verifico se posso scrivere il programma 2
|
||||
Dim sVarProg2 As String = String.Empty
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", sVarProg2, m_MainWindow.GetMachIniFile())
|
||||
' Leggo variabile relativa (standard E80022)
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sVarProg2, 1)
|
||||
Dim nVarProg2 As Integer = 99
|
||||
For I = 0 To 20
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarProg2 = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' Se area di memoria libera, invio programma
|
||||
If nVarProg2 = 0 Then
|
||||
Dim nProg2 As Integer = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG2, 0, m_MainWindow.GetMachIniFile())
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, nProg2, False) Then
|
||||
' Copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj2.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' Salvo il progetto
|
||||
m_CurrProjPage.SaveProject()
|
||||
' Dichiaro programma inviato
|
||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(sVarProg2, "1")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Aree di memoria occupate
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user