From f922bb6410782caf4e28f460109d4a68aa4d1475 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 17 May 2016 07:05:35 +0000 Subject: [PATCH] OmagCUT 1.6r2 : - modifiche a comunicazione con Siemens - modifiche per impostare forzatamente fase di lavorazione iniziale ( 1). --- CNCommunication.vb | 4 +--- MainWindow.xaml.vb | 2 -- My Project/AssemblyInfo.vb | 4 ++-- SimulationPageUC.xaml.vb | 4 ++-- WorkInProgressPageUC.xaml.vb | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CNCommunication.vb b/CNCommunication.vb index 1e06c9e..ed09aa1 100644 --- a/CNCommunication.vb +++ b/CNCommunication.vb @@ -58,7 +58,7 @@ Public Class CNCommunication Else m_nNCType = GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) End If - EgtOutLog(m_MainWindow.m_bNCLink.ToString & m_nNCType) + EgtOutLog("NcLink=" & m_MainWindow.m_bNCLink.ToString & " type=" & m_nNCType) ' Se CNSiemens leggo path programmino di comunicazione If m_nNCType = 3 Then @@ -154,7 +154,6 @@ Public Class CNCommunication m_CN = New Num.NumNC Case 3 m_CN = New CN_Siemens - EgtOutLog("Classe siemens creata") End Select ' Recupero e imposto le variabili per i dati del CN (feed, speed,...) Dim sVal As String = String.Empty @@ -212,7 +211,6 @@ Public Class CNCommunication m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_DarkGray") 'Avvio programmino di comunicazione Process.Start(m_sCNSiemensHMIPath, "-start """ & m_sCNSiemensPath & """") - EgtOutLog("programmino avviato") End If End Select diff --git a/MainWindow.xaml.vb b/MainWindow.xaml.vb index 7fd0184..ba4d72e 100644 --- a/MainWindow.xaml.vb +++ b/MainWindow.xaml.vb @@ -815,10 +815,8 @@ Class MainWindow Private Sub MainWindow_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered ' Verifico presenza del collegamento al CN - EgtOutLog("mainwindow") m_bNCLink = (GetPrivateProfileInt(S_GENERAL, K_CNLINK, 0, m_sIniFile) <> 0) m_CNCommunication.CNCommunication_Initialization() - EgtOutLog("CnPartito") End Sub Private Sub EgtWPFInit() diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 8af4cd3..b4f2639 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -60,5 +60,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/SimulationPageUC.xaml.vb b/SimulationPageUC.xaml.vb index 921d9d9..5ddf4cd 100644 --- a/SimulationPageUC.xaml.vb +++ b/SimulationPageUC.xaml.vb @@ -30,7 +30,7 @@ Public Class SimulationPageUC Dim sVal As String = DoubleToString(SpeedSlider.Value, 1) WritePrivateProfileString(S_SIMUL, K_SLIDERVAL, sVal, m_MainWindow.GetIniFile()) ' Torno alla prima fase - EgtSetCurrPhase(1) + EgtSetCurrPhase(1, True) ' Ripristino visibilità standard EgtSetMachineLook(MCH_LOOK.TAB) End Sub @@ -165,7 +165,7 @@ Public Class SimulationPageUC ' Vado in home EgtSimHome() ' Imposto prima fase - EgtSetCurrPhase(1) + EgtSetCurrPhase(1, True) ' Aggiorno visualizzazione EgtDraw() ' Aggiorno dati CNC diff --git a/WorkInProgressPageUC.xaml.vb b/WorkInProgressPageUC.xaml.vb index dc1983d..36b352b 100644 --- a/WorkInProgressPageUC.xaml.vb +++ b/WorkInProgressPageUC.xaml.vb @@ -162,7 +162,7 @@ Public Class WorkInProgressPageUC If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then nCurrPhase = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value End If - EgtSetCurrPhase(nCurrPhase) + EgtSetCurrPhase(nCurrPhase, True) EgtDraw() ' Ciclo While m_bContinue