Compare commits

...

24 Commits

Author SHA1 Message Date
Nicola Pievani d6a9cac6b4 Gestione modo Auto in caso per DripFeed 2023-03-13 10:34:23 +01:00
Nicola Pievani 4ce898c25c Attivazione modalità auto prima di DripFeed 2023-03-10 16:27:48 +01:00
Nicola Pievani 6f59cddd80 Migliorata gestione messaggi durante DripFeed 2023-03-10 14:56:24 +01:00
Nicola Pievani c8b018f6df Comunicazione DripFeed funzionante 2023-03-10 12:13:22 +01:00
Nicola Pievani e287e827c4 Aggiunti messaggi (MsgBox per Debug) e corretti valori di controllo 2023-03-09 12:50:42 +01:00
Nicola Pievani 68e9a9201d Comunicazione con PPFile2 2 modifica delle costanti 2023-03-08 13:08:53 +01:00
Nicola Pievani 8946bf3a00 Sostituita funzione HSL con funzione Asyn 2023-03-01 14:40:39 +01:00
Nicola Pievani a15acb6528 Inizio scrittura funzione per DripFeed 2023-02-28 17:26:37 +01:00
Nicola Pievani e7e9d26b75 Aggiunte funzioni per gestione CN Axium DripFeed 2023-02-27 19:28:46 +01:00
NicolaP d9de23daca Correzione gestione pezzi in parcheggio 2023-02-10 13:19:42 +01:00
NicolaP ad5c9331ba Merge branch 'master' into develop 2023-02-10 11:54:26 +01:00
DarioS b67330b509 OmagCUT :
- in VerifyOutOfStrokes prima di controllare il valore dell'asse C si cerca di riportarlo nel range ammesso (modulo 360 gradi).
2023-02-10 11:30:20 +01:00
DarioS ca66108145 Merge branch 'master' of https://gitlab.steamware.net/egaltech/OmagCUT 2023-02-09 19:04:42 +01:00
NicolaP 379ccc7519 Merge branch 'develop' 2023-02-08 19:03:19 +01:00
NicolaP b751c27773 Merge branch 'Features/Manage_Offset_Saw_On_SingleCut' into develop 2023-02-08 19:03:04 +01:00
NicolaP 14e1c254f0 Nuova gestione OffsetLama per tagli diretti 2023-02-08 19:02:46 +01:00
NicolaP 6f08e5f520 Merge branch 'master' into develop 2023-02-08 18:18:35 +01:00
NicolaP 7d8933cc39 Merge remote-tracking branch 'origin/HEAD' 2023-02-08 12:16:42 +01:00
NicolaP 2179996bff Merge branch 'develop' 2023-02-08 12:16:09 +01:00
NicolaP 316bcc89ea Merge branch 'Features/Fix_Front_Unloading' into develop 2023-02-08 12:15:53 +01:00
DarioS ce151e5db7 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/OmagCUT 2023-02-06 18:36:57 +01:00
DarioS b303fe2615 OmagCUT :
- aggiornamento logo a 2.5.
2023-02-06 18:32:32 +01:00
NicolaP 3e0d43c1d8 Aggiornamento versione 2.5b1 2023-02-03 16:24:09 +01:00
NicolaP 70b1822446 Merge branch 'develop' 2023-02-03 16:04:31 +01:00
11 changed files with 1048 additions and 812 deletions
-2
View File
@@ -329,8 +329,6 @@ Public Class MoveRawPartPage
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
' se su scarico frontale allora devo modificare la scelta delle ventose
VacuumCups.bUnloadingOnAuxTab = m_SplitPage.m_bOnAuxTab
If PutVacuumCupsOnRaw(nId, rmData) Then
' Visualizzo le ventose
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
+1 -1
View File
@@ -1353,8 +1353,8 @@ Public Class NestPageUC
VeinMatching.OnDeselectPart(m_nIdToDesel)
End If
' Reset
GetFamilyGroupInPark()
m_bDrag = False
m_nIdToSel = GDB_ID.NULL
m_nIdToDesel = GDB_ID.NULL
+17 -6
View File
@@ -546,16 +546,27 @@ Module VacuumCups
Return True
End Function
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
Dim dX, dY, dZ As Double
Dim nStat As Integer
' Posizione Home dell'asse rotante
Dim dCHome As Double
EgtGetAxisHomePos("C", dCHome)
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
' Corse dell'asse
Dim dCMin As Double
EgtGetAxisMin("C", dCMin)
Dim dCMax As Double
EgtGetAxisMax("C", dCMax)
' Porto l'angolo nel range
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
' Imposto la ventosa come fosse un utensile
EgtSetCalcTool("", "H4", 1)
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
' Calcolo gli assi macchina
Dim dX, dY, dZ As Double
Dim nStat As Integer
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
' Verifico le corse
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
Return nStat
End Function
+7 -4
View File
@@ -583,7 +583,7 @@ Public Class SingleCutUC
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
EgtTdbSetCurrTool(sSaw)
Dim dThick As Double = 0
' se è impostata una lavorazione di lama
' Se è impostata una lavorazione di lama
If Not String.IsNullOrEmpty(sSawing) Then
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
End If
@@ -599,9 +599,12 @@ Public Class SingleCutUC
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
If Math.Abs(m_dOffset) > 10 * EPS_SMALL Then
Dim dTotOffset = m_dOffset
If m_bSawTh Then dTotOffset += If( m_dOffset > 0, dThick, -dThick)
' Applico la correzione di spessore lama -> anche se Offset=0! ver_2.5b1
Dim dTotOffset = m_dOffset
If m_bSawTh Then
dTotOffset += If(m_dOffset > 0, dThick, -dThick)
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
Else
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
End If
' Imposto affondamento e angolo di fianco sul taglio
+17 -2
View File
@@ -38,6 +38,8 @@ Class MainWindow
Friend m_MachinePageUC As MachinePageUC
Friend m_OptionsPageUC As OptionsPageUC
Friend m_IsClosingApplication As Integer = 0
' Dichiarazione variabili direttori
Private m_sExeRoot As String = String.Empty
Private m_sDataRoot As String = String.Empty
@@ -326,8 +328,8 @@ Class MainWindow
' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2501, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2501, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2502, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2502, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Inizializzazione generale di EgtInterface
@@ -1085,6 +1087,19 @@ Class MainWindow
m_CurrentProjectPageUC.SaveNamedProject()
m_CurrentProjectPageUC.SaveProject()
End If
' Inizio la chiusura del programma (verifico di aver terminato il processo DripFeed)
EgtOutLog("Iniziato processo di chiusura programma")
m_IsClosingApplication = 1
Dim nCount As Integer = 0
While m_IsClosingApplication <> 2
If nCount > 5 Then
Exit While
End If
' verifico che il processo DripFeed sia terminato
EgtOutLog("Stato chiusura programma: " & m_IsClosingApplication.ToString)
Thread.Sleep(100)
nCount += 1
End While
' Uscita
MainWindowExit()
End Sub
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.1.2")>
<Assembly: AssemblyFileVersion("2.5.1.2")>
<Assembly: AssemblyVersion("2.5.3.2")>
<Assembly: AssemblyFileVersion("2.5.3.2")>
+35 -5
View File
@@ -2,6 +2,7 @@
Imports System.Globalization
Imports System.Collections.ObjectModel
Imports EgtUILib
Imports OmagCUT.Num
Public Class CNCommunication
@@ -354,8 +355,8 @@ Public Class CNCommunication
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
End If
' Inizializzo la comunicazione
m_CN.Init()
' Inizializzo la comunicazione
m_CN.Init()
Catch ex As Exception
' set status to statusbar
@@ -496,6 +497,7 @@ Public Class CNCommunication
If m_CN.read_active_mode() <> m_nCurrMode Then
m_nCurrMode = m_CN.read_active_mode()
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
m_CN.nMachineMode = m_nCurrMode
End If
Case 2
If m_CN.nMachineMode <> m_nCurrMode Then
@@ -619,12 +621,17 @@ Public Class CNCommunication
End If
' Nuove bottoni (Power Macchina)
If m_IsNewConsole AndAlso m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
If m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
If m_IsNewConsole Then
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
End If
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
End If
If m_MainWindow.m_ActivePage = MainWindow.Pages.WorkInProgress Then
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState OrElse m_CN.bInternalCoolantState OrElse m_CN.bExternCoolantState)
@@ -907,28 +914,51 @@ Public Class CNCommunication
End If
' Se richiesta successiva attivazione, faccio reset
If bActivate Then
EgtOutLog("Call function: DGeneralFunctions_Reset")
TimeSpanInit()
m_CN.DGeneralFunctions_Reset()
EgtOutLog(TimeSpanEnd())
End If
' Attesa opportuna
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nResetSendDelay)
If m_nNCType = 1 Then
' Cancellazione eventuale file già presente con lo stesso nome (ignoro eventuale errore)
EgtOutLog("Delete_NC_prog(sNumProg)")
TimeSpanInit()
m_CN.Delete_NC_prog(sNumProg)
EgtOutLog(TimeSpanEnd())
' Attesa opportuna
System.Threading.Thread.Sleep(100)
End If
EgtOutLog("Download_NC_prog(sCncPath, sNumProg)")
TimeSpanInit()
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
EgtOutLog("Nc Type : " & m_nNCType.ToString)
EgtOutLog("IsDripFeed : " & DirectCast(m_CN, NumNCOld).bIsDripFeed)
If m_nNCType = 1 AndAlso TypeOf m_CN Is NumNCOld AndAlso DirectCast(m_CN, NumNCOld).bIsDripFeed Then
' eventauli cambi di stato sono trattati all'interno della funzione
Return True
End If
EgtOutLog(TimeSpanEnd())
' Attesa opportuna
System.Threading.Thread.Sleep(100)
' Se richiesta attivazione
If bActivate Then
' Attivazione programma
EgtOutLog("ActivateProgram(nNumProg)")
TimeSpanInit()
bOk = bOk AndAlso (m_CN.ActivateProgram(nNumProg) = 0)
EgtOutLog(TimeSpanEnd())
' Attesa opportuna
System.Threading.Thread.Sleep(100)
' Modalità automatica
EgtOutLog("DGeneralFunctions_WriteCncMode(0)")
TimeSpanInit()
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
EgtOutLog(TimeSpanEnd())
End If
' Messaggio con risultato
If bOk Then
m_CurrProjPage.SetInfoMessage(EgtMsg(90317)) 'Programma CN trasmesso con successo
+946 -786
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -1,4 +1,6 @@
Imports System.IO
Imports System.ComponentModel
Imports System.Drawing
Imports System.IO
Imports EgtUILib
Imports EgtWPFLib
@@ -478,7 +480,6 @@ Public Class ProjectMgrUC
If Not (m_CurrMachine.bProdLine Or m_CurrMachine.bDemo) Then
' Download programma (eventuali errori sono segnalati dalla funzione)
If m_CurrNcComm.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)
' se abilitato e non è restart, lancio eventuale lua post-trasmissione
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

+20 -2
View File
@@ -1,4 +1,5 @@
Imports System.Globalization
Imports System.Diagnostics
Imports System.Collections.ObjectModel
Imports System.Text.RegularExpressions
Imports EgtWPFLib
@@ -17,8 +18,25 @@ Module Utility
End Function
'--------------------------------------------------------------------------------------------------
Friend Sub UpdateUI()
Friend StopWatch As Stopwatch
Friend Sub TimeSpanInit()
StopWatch = New Stopwatch
StopWatch.Start()
End Sub
Friend Function TimeSpanEnd()
Dim sTime As String = ""
If Not IsNothing(StopWatch) Then
StopWatch.Stop()
Dim ts As TimeSpan = StopWatch.Elapsed
sTime = String.Format("{0:00}:{1:00}:{2:00}.{3:000}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds)
End If
Return sTime
End Function
'--------------------------------------------------------------------------------------------------
Friend Sub UpdateUI()
' Costringo ad aggiornare UI
Dim nDummy As Integer
Application.Current.Dispatcher.Invoke(Windows.Threading.DispatcherPriority.Background, _