From 65b9bfdcdba80a5f00fe782fee41744e59e9eaf4 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Tue, 6 Aug 2024 15:48:49 +0200 Subject: [PATCH] Migliorati messaggi comunicazione CN --- MainWindow.xaml.vb | 1 + NcComm/CNCommunication.vb | 2 +- Project/ProjectMgrUC.xaml.vb | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/MainWindow.xaml.vb b/MainWindow.xaml.vb index 2071b07..2d7c3d7 100644 --- a/MainWindow.xaml.vb +++ b/MainWindow.xaml.vb @@ -461,6 +461,7 @@ Class MainWindow If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed + EgtOutLog("Warning: Missing file 'TestWork.lua' in folder 'DirectCmd', buttun 'TEST' collapsed!") Else m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible End If diff --git a/NcComm/CNCommunication.vb b/NcComm/CNCommunication.vb index 8ff047b..0fbaa32 100644 --- a/NcComm/CNCommunication.vb +++ b/NcComm/CNCommunication.vb @@ -1494,7 +1494,7 @@ Public Class CNCommunication ' Attesa opportuna System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep) End If - EgtOutLog("Download_NC_prog(sCncPath, sNumProg)") + EgtOutLog("Download_NC_prog(" & sCncPath & ", " & sNumProg.ToString & ")") ' -------------- START DOWNLOAD -------------- TimeSpanInit() bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0) diff --git a/Project/ProjectMgrUC.xaml.vb b/Project/ProjectMgrUC.xaml.vb index aec6d1b..2d794a1 100644 --- a/Project/ProjectMgrUC.xaml.vb +++ b/Project/ProjectMgrUC.xaml.vb @@ -770,11 +770,15 @@ Public Class ProjectMgrUC If bDoubleProg Then If sTabeName = MAIN_TAB Then - bSendToAre1 = True + ' 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 = True + bSendToAre2 = (nVarProg2 = 0) + EgtOutLog(" Invio programma da tavola 2") End If End If @@ -815,6 +819,12 @@ Public Class ProjectMgrUC Else m_CurrProjPage.SetErrorMessage(EgtMsg(90318)) 'La macchina non accetta il programma CN 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