Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fcca1ed72c | |||
| 36b667fcc5 |
@@ -600,13 +600,15 @@ Public Class FlatteningCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -535,13 +535,15 @@ Public Class GridCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -580,13 +580,15 @@ Public Class MultipleCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -180,13 +180,15 @@ Public Class Polishing
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -450,13 +450,15 @@ Public Class SawTestUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -584,13 +584,15 @@ Public Class SingleCutUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -371,8 +371,10 @@ Public Class SingleDrillUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
|
|||||||
@@ -287,8 +287,10 @@ Public Class SquaringUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||||
' copio il progetto corrente come progetto in lavorazione
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
|
|||||||
+14
-46
@@ -23,9 +23,6 @@ Class MainWindow
|
|||||||
' Coefficiente di scalatura della finestra rispetto a standard
|
' Coefficiente di scalatura della finestra rispetto a standard
|
||||||
Friend m_dMWinScale As Double = 1
|
Friend m_dMWinScale As Double = 1
|
||||||
|
|
||||||
' Variabile che definisce l'avvio forzato in modalità FRAME
|
|
||||||
Friend m_OnlyFrame As Boolean = False
|
|
||||||
|
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
|
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
|
||||||
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
|
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
|
||||||
@@ -104,7 +101,6 @@ Class MainWindow
|
|||||||
REGISTRATION = 2 ^ 20 ' 1048576
|
REGISTRATION = 2 ^ 20 ' 1048576
|
||||||
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
|
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
|
||||||
COMPOFRAME = 2 ^ 22 ' 4194304
|
COMPOFRAME = 2 ^ 22 ' 4194304
|
||||||
CUT_LIGHT = 2 ^ 23 ' 8388608
|
|
||||||
End Enum
|
End Enum
|
||||||
' Opzione nesting automatico
|
' Opzione nesting automatico
|
||||||
Private m_bAutoNest As Boolean = False
|
Private m_bAutoNest As Boolean = False
|
||||||
@@ -347,12 +343,6 @@ Class MainWindow
|
|||||||
EgtGetKeyOptions(9423, 2512, 1, m_nKeyOptions)
|
EgtGetKeyOptions(9423, 2512, 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
|
|
||||||
If Not bProd Then
|
|
||||||
m_OnlyFrame = GetKeyOption(KEY_OPT.CUT_LIGHT)
|
|
||||||
End If
|
|
||||||
|
|
||||||
' Inizializzazione generale di EgtInterface
|
' Inizializzazione generale di EgtInterface
|
||||||
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
||||||
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
||||||
@@ -666,13 +656,20 @@ Class MainWindow
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28 Or nAssLeftDays = 364 Then
|
' Or nAssLeftDays = 358
|
||||||
|
If (nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28 Then
|
||||||
'Dim sText As String = "Fai ammenda," & vbCrLf & "gli aggiornamenti sono in fase di scadenza!"
|
'Dim sText As String = "Fai ammenda," & vbCrLf & "gli aggiornamenti sono in fase di scadenza!"
|
||||||
'Dim sTitle As String = "⚠️ Warning!"
|
'Dim sTitle As String = "⚠️ Warning!"
|
||||||
'Dim MissingKeyWnd As New EgtMsgBox(Me, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
'Dim MissingKeyWnd As New EgtMsgBox(Me, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||||
' finestra Custom
|
' finestra Custom
|
||||||
Dim MyLicWn As New LicenseWindow(Me, "FAI AMMENDA /nSTAI ACCORTO /ncontatta chi potrebbe aiutari, du seguito gli indirizzi utili per risolvere" &
|
Dim sMsg As String = EgtMsg(91141)
|
||||||
" alcuni problemi, ricorda che NON FACCIAMO MIRACOLI : /n → Assorrata", "Assistance " & sAssStatus)
|
Dim sAssistance As String = String.Empty
|
||||||
|
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
|
||||||
|
Dim sItems As String() = sAssistance.Split(","c)
|
||||||
|
For Each Item As String In sItems
|
||||||
|
sMsg &= "→ " & Item.Trim & " /n"
|
||||||
|
Next
|
||||||
|
Dim MyLicWn As New LicenseWindow(Me, sMsg, "Assistance " & sAssStatus)
|
||||||
MyLicWn.Show()
|
MyLicWn.Show()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1142,7 +1139,7 @@ Class MainWindow
|
|||||||
End If
|
End If
|
||||||
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
|
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
|
||||||
EgtOutLog("Iniziato processo di chiusura programma")
|
EgtOutLog("Iniziato processo di chiusura programma")
|
||||||
m_IsClosingApplication = If(m_CNCommunication.m_nNCType = 1, 1, 2)
|
m_IsClosingApplication = If( m_CNCommunication.m_nNCType = 1, 1, 2)
|
||||||
Dim nCount As Integer = 0
|
Dim nCount As Integer = 0
|
||||||
While m_IsClosingApplication <> 2
|
While m_IsClosingApplication <> 2
|
||||||
If nCount > 5 Then
|
If nCount > 5 Then
|
||||||
@@ -1280,11 +1277,7 @@ Class MainWindow
|
|||||||
m_ProdLineTimer.Start()
|
m_ProdLineTimer.Start()
|
||||||
End If
|
End If
|
||||||
' di default attivo la pagina CadCut
|
' di default attivo la pagina CadCut
|
||||||
If m_OnlyFrame Then
|
m_ActivePage = MainWindow.Pages.CadCut
|
||||||
m_ActivePage = MainWindow.Pages.FrameCut
|
|
||||||
Else
|
|
||||||
m_ActivePage = MainWindow.Pages.CadCut
|
|
||||||
End If
|
|
||||||
' seleziono il tipo di avvio
|
' seleziono il tipo di avvio
|
||||||
m_CurrentProjectPageUC.StartProgram()
|
m_CurrentProjectPageUC.StartProgram()
|
||||||
' aggiorno la grafica
|
' aggiorno la grafica
|
||||||
@@ -1321,33 +1314,8 @@ Class MainWindow
|
|||||||
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
EgtSetCurrentContext(nCurrCtx)
|
EgtSetCurrentContext(nCurrCtx)
|
||||||
' Aggiorno interfaccia
|
' Aggiorno interfaccia
|
||||||
If m_OnlyFrame Then
|
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And m_ActivePage <> Pages.RawPart Then
|
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||||
Dim FrameWnd As New EgtMsgBox(Me, "NON PUOI", "La tua licenza non è abilitata CAD", EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
|
||||||
'' Gestione stato FastGrid
|
|
||||||
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
|
|
||||||
' Cancello progetto salvato con nome da file ini
|
|
||||||
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
|
|
||||||
' Scelta tavola della macchina
|
|
||||||
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
|
|
||||||
' Creo nuovo progetto
|
|
||||||
m_CurrentProjectPageUC.NewProject(nTabInd, False)
|
|
||||||
'' Gestione stato FastGrid
|
|
||||||
'm_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
|
||||||
FrameCutBtn_Click(Nothing, Nothing)
|
|
||||||
CadCutBtn.IsEnabled = False
|
|
||||||
Else
|
|
||||||
FrameCutBtn.IsEnabled = True
|
|
||||||
CadCutBtn.IsEnabled = False
|
|
||||||
' Attivo il pulsante FRAME
|
|
||||||
'FrameCutBtn.IsChecked = True
|
|
||||||
'CadCutBtn.IsChecked = False
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
|
||||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
|
||||||
End If
|
|
||||||
|
|
||||||
' DirectCutBtn.IsEnabled = bHeadH1
|
' DirectCutBtn.IsEnabled = bHeadH1
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -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.5.12.3")>
|
<Assembly: AssemblyVersion("2.5.12.4")>
|
||||||
<Assembly: AssemblyFileVersion("2.5.12.3")>
|
<Assembly: AssemblyFileVersion("2.5.12.4")>
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ Public Class CurrentProjectPageUC
|
|||||||
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
|
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
|
||||||
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
|
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
|
||||||
' Carico sottopagina opportuna
|
' Carico sottopagina opportuna
|
||||||
If GetProjectType() <> PRJ_TYPE.FRAMES And Not m_MainWindow.m_OnlyFrame Then
|
If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
||||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||||
m_MainWindow.CadCutBtn.IsChecked = True
|
m_MainWindow.CadCutBtn.IsChecked = True
|
||||||
|
|||||||
@@ -189,25 +189,33 @@ Public Class WorkInProgressPageUC
|
|||||||
' Valori precedenti degli assi macchina
|
' Valori precedenti degli assi macchina
|
||||||
Dim dL1p, dL2p, dL3p, dR1p, dR2p As Double
|
Dim dL1p, dL2p, dL3p, dR1p, dR2p As Double
|
||||||
Dim bFirst As Boolean = True
|
Dim bFirst As Boolean = True
|
||||||
|
|
||||||
' Gestione fase di lavoro
|
' Gestione fase di lavoro
|
||||||
Dim sPhaseVar As String = String.Empty
|
Dim sPhaseVar As String = String.Empty
|
||||||
GetPrivateProfileString(S_MACH_INPROGRESS, K_PHASEVAR, "E80020", sPhaseVar, m_MainWindow.GetMachIniFile())
|
|
||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
|
||||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
|
|
||||||
System.Threading.Thread.Sleep(100)
|
|
||||||
Dim nCurrPhase = 1
|
Dim nCurrPhase = 1
|
||||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
Dim bCurrPhaseExists As Boolean = False
|
||||||
nCurrPhase = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
|
If GetPrivateProfileString(S_MACH_INPROGRESS, K_PHASEVAR, "E80020", sPhaseVar, m_MainWindow.GetMachIniFile()) <> 0 Then
|
||||||
|
bCurrPhaseExists = True
|
||||||
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
|
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||||
|
nCurrPhase = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
|
||||||
|
End If
|
||||||
|
EgtSetCurrPhase(nCurrPhase, True)
|
||||||
|
EgtDraw()
|
||||||
|
Else
|
||||||
|
EgtOutLog("Variabile 'PhaseVar' mancante! In CurrentMachine non sarà aggiornata la fase del grezzo")
|
||||||
End If
|
End If
|
||||||
EgtSetCurrPhase(nCurrPhase, True)
|
|
||||||
EgtDraw()
|
|
||||||
' Tempo di ritardo nel ciclo
|
' Tempo di ritardo nel ciclo
|
||||||
Dim nTimeStep As Integer = 50
|
Dim nTimeStep As Integer = 50
|
||||||
nTimeStep = GetPrivateProfileInt(S_MACH_INPROGRESS, K_WP_STEPTIME, nTimeStep, m_MainWindow.GetMachIniFile())
|
nTimeStep = GetPrivateProfileInt(S_MACH_INPROGRESS, K_WP_STEPTIME, nTimeStep, m_MainWindow.GetMachIniFile())
|
||||||
|
EgtOutLog("Tempo di attesa tra una lettura degli assi e la successiva: " & nTimeStep.ToString & " (ms)")
|
||||||
' Ciclo
|
' Ciclo
|
||||||
While m_bContinue
|
While m_bContinue
|
||||||
' Rileggo la variabile di fase
|
' Rileggo la variabile di fase
|
||||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
|
If bCurrPhaseExists Then m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(sPhaseVar, 3)
|
||||||
' Recupero la posizione degli assi macchina
|
' Recupero la posizione degli assi macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||||
@@ -238,7 +246,7 @@ Public Class WorkInProgressPageUC
|
|||||||
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
|
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
|
||||||
System.Threading.Thread.Sleep(nTimeStep)
|
System.Threading.Thread.Sleep(nTimeStep)
|
||||||
' Leggo la fase
|
' Leggo la fase
|
||||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
If bCurrPhaseExists AndAlso m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
Dim nNextPhase As Integer = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
|
Dim nNextPhase As Integer = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
|
||||||
If nNextPhase > nCurrPhase Then
|
If nNextPhase > nCurrPhase Then
|
||||||
|
|||||||
Reference in New Issue
Block a user