Compare commits

..

21 Commits

Author SHA1 Message Date
Nicola Pievani 9b0e464e4b Ricavo contorno da codice python 2024-08-28 11:07:57 +02:00
Nicola Pievani 123d6118e9 Correzione gestion uscita in caso di errore 2024-08-21 16:11:33 +02:00
Nicola Pievani a2104eaa03 Nuovi messaggi e CMD.TABLE in lua script 2024-08-19 10:21:01 +02:00
Nicola Pievani 65b9bfdcdb Migliorati messaggi comunicazione CN 2024-08-06 15:48:49 +02:00
Nicola Pievani 004591896c Messaggio di Kill Process per SiemensComm 2024-08-01 10:57:59 +02:00
Nicola Pievani 02af01052b Gestione invio programmi doppia tavola 2024-07-31 18:31:32 +02:00
Nicola Pievani 2bc386807f Merge branch 'master' into develop 2024-07-31 10:25:02 +02:00
Nicola Pievani 82af1baae3 Merge branch 'develop' 2024-07-31 10:24:33 +02:00
Nicola Pievani 68b4dfed80 Correzzione numero di versione 2.6g7 2024-07-31 10:24:20 +02:00
Nicola Pievani ffc7536177 Merge branch 'master' into develop 2024-07-31 10:08:29 +02:00
Nicola Pievani 70368b73be Aggiornamento versione 2.6h1 2024-07-31 10:08:05 +02:00
Nicola Pievani 05b4e2e95a Merge branch 'develop' 2024-07-30 14:31:20 +02:00
Nicola Pievani 1d7cdf8fa0 Merge branch 'Features/Manage_SimensOne' into develop 2024-07-30 14:31:09 +02:00
Nicola Pievani c546df45ca Aggiornamento versione 2.6g6 (nuove DLL) 2024-07-29 11:11:42 +02:00
Nicola Pievani ef621a340a Merge branch 'develop' 2024-07-17 13:03:04 +02:00
Nicola Pievani e7e1946230 Cambio versione 2.6f3 2024-06-18 18:06:24 +02:00
Nicola Pievani 8dc6b63801 Merge branch 'develop' 2024-06-18 18:05:23 +02:00
Nicola Pievani 7f548e5ba6 Merge branch 'develop' 2024-06-11 17:35:07 +02:00
Nicola Pievani 2cf1be7348 Aggiornate info copyright 2024-06-03 18:08:15 +02:00
Nicola Pievani bb932788f9 Aggiornamento versione 2.6f1 2024-06-03 13:11:25 +02:00
Nicola Pievani 4c0da9af53 Merge branch 'develop' 2024-06-03 13:00:43 +02:00
9 changed files with 87 additions and 10 deletions
+10 -1
View File
@@ -755,8 +755,17 @@ Public MustInherit Class MachineButton
EgtLuaSetGlobNumVar("CMD.R1", dR1)
EgtLuaSetGlobNumVar("CMD.R2", dR2)
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")
' Leggo variabili
' Leggo variabili da file Lua
CmdString = String.Empty
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
b2Start = False
+4
View File
@@ -530,6 +530,10 @@ Public Class SawTestUC
ElseIf nWSide = MCH_SAW_WS.LEFT Then
vtPerp = vtDir
vtPerp.Rotate(Vector3d.Z_AX, +90)
Else
m_CurrProjPage.ClearMessage()
' 91144 = Set machining side: right or left.
m_CurrProjPage.SetInfoMessage(EgtMsg(91144))
End If
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
Dim dLen2 As Double = m_dLen / 2
+1 -1
View File
@@ -1265,7 +1265,7 @@ Public Class AlarmsPageUC
System.Threading.Thread.Sleep(300)
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
' 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
' Definisco flag tastatura
Dim bProbingOk As Boolean = False
+3 -1
View File
@@ -1662,7 +1662,9 @@ Public Class CurrentMachine
Dim dToolDiam As Double = 0
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
' Confronto con massimo ammesso
Return (dToolDiam <= dMaxSawDiamForProbe)
Dim bOk As Boolean = dToolDiam <= dMaxSawDiamForProbe
If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for porbing")
Return bOk
End Function
Friend Function GetPrivateProfileMaterial(
+1
View File
@@ -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
+3 -3
View File
@@ -22,7 +22,7 @@ Imports System.Windows
#End If
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<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: ComVisible(False)>
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.7.6")>
<Assembly: AssemblyFileVersion("2.6.7.6")>
<Assembly: AssemblyVersion("2.6.7.7")>
<Assembly: AssemblyFileVersion("2.6.7.7")>
+7 -1
View File
@@ -247,6 +247,7 @@ Public Class CNCommunication
For Each proc As System.Diagnostics.Process In pList
If proc.ProcessName.ToString = sAppName Then
proc.Kill()
EgtOutLog("ProcessKill : " & """" & sProcessName & """")
End If
Next
End Sub
@@ -1455,6 +1456,11 @@ Public Class CNCommunication
Friend Function SendProgram(ByVal sCncPath As String, ByVal nNumProg As Integer,
Optional bActivate As Boolean = True) As Boolean
Dim bOk As Boolean = True
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
' m_nNCType = 2
' !!!!!!!!!!!!!!!!!! FORZO IL PROGRAMMA !!!!!!!!!!!!!!!!!!
' Download programma
If m_MainWindow.m_bNCLink Then
bOk = (m_nNCType > 0)
@@ -1488,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)
+32 -2
View File
@@ -744,6 +744,12 @@ Public Class ProjectMgrUC
Exit For
End If
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)
Dim nVarProgTwins As Integer = 1
If Not String.IsNullOrWhiteSpace(m_CurrMachine.sVarProgTwins) Then
@@ -757,8 +763,26 @@ Public Class ProjectMgrUC
End If
Next
End If
' 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)
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg1, False) Then
' Dichiaro part program inviato
@@ -775,7 +799,7 @@ Public Class ProjectMgrUC
End If
m_CurrNcComm.SetProgramMainOrSub(True)
' 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)
If m_CurrNcComm.SendProgram(sCncPath, m_CurrMachine.nProg2, False) Then
' Dichiaro part program inviato
@@ -795,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
+26 -1
View File
@@ -142,8 +142,33 @@ Public Class PhotoPageUC
Dim sPhoto As String = m_sCurrDir & "\" & m_sCurrFile
Dim sContour As String = String.Empty
If m_MainWindow.m_Camera.GetCalcContour() Then
' ----------------------- LANCIO file Batch per eseguire codice Python -----------------------
Dim FileBatch As String = "C:\EgtData\OmagCUT\Temp\PostPhotoTemplate.bat"
If File.Exists(FileBatch) Then
Dim FileBatchCopy As String = "C:\EgtData\OmagCUT\Temp\PostPhoto.bat"
Try
IO.File.Delete(FileBatchCopy)
Catch ex As Exception
End Try
IO.File.Copy(FileBatch, FileBatchCopy)
Dim sFilePhoto As String = Path.GetDirectoryName(sPhoto) & "\" & Path.GetFileNameWithoutExtension(sPhoto)
IO.File.WriteAllText(FileBatchCopy, IO.File.ReadAllText(FileBatchCopy).Replace("£_FILE_IMAGE_£", sFilePhoto))
' Creo file Dxf del contorno
Dim RunPython As Process = Process.Start(FileBatchCopy)
While Not RunPython.HasExited
' Attendo che il processo sia terminato
System.Threading.Thread.Sleep(1000)
End While
Try
IO.File.Delete(FileBatchCopy)
Catch ex As Exception
End Try
End If
' ----------------------- LANCIO file Batch per eseguire codice Python -----------------------
sContour = Path.ChangeExtension(sPhoto, "dxf")
End If
End If
m_MainWindow.m_CadCutPageUC.PostPhoto(sPhoto, sContour)
End If
End Sub