Compare commits

..

30 Commits

Author SHA1 Message Date
Nicola Pievani 7ecad4c218 Merge branch 'develop' 2023-03-13 10:45:46 +01:00
Nicola Pievani d49c231541 Cambio versione 2.5c1 2023-03-13 10:45:21 +01:00
Nicola Pievani 8d82058e49 Merge branch 'Features/Assistance_Axium_PLC' into develop 2023-03-13 10:40:05 +01:00
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 36a1ecb509 Merge branch 'develop' 2023-03-09 12:53:18 +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 aeb0be0590 Gestione sempre decimale poszione macchina 2023-02-28 18:00:33 +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 b48d4900ea Merge branch 'develop' 2023-02-10 13:20:23 +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
12 changed files with 1067 additions and 831 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
+15 -15
View File
@@ -248,16 +248,16 @@ Public Class MachineStatusUC
dL3 = ptTip.z
End If
' Visualizzazione
Axis1TxBx.Text = LenToString(dL1, -3)
Axis2TxBx.Text = LenToString(dL2, -3)
Axis3TxBx.Text = LenToString(dL3, -3)
Axis1TxBx.Text = LenToString(dL1, -3, True)
Axis2TxBx.Text = LenToString(dL2, -3, True)
Axis3TxBx.Text = LenToString(dL3, -3, True)
Axis4TxBx.Text = DoubleToString(dR1, -3)
Axis5TxBx.Text = DoubleToString(dR2, -3)
If m_AxesNumber >= 6 Then Axis6TxBx.Text = DoubleToString(dA6, -3)
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3)
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3)
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3)
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3)
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3, True)
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3, True)
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3, True)
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3, True)
End Sub
Sub DisplayPositionDelta()
@@ -265,22 +265,22 @@ Public Class MachineStatusUC
Dim dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10 As Double
m_MainWindow.m_CNCommunication.GetAxesDeltas(dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10)
' Visualizzazione
DeltaAxis1TxBx.Text = LenToString(dL1, -3)
DeltaAxis2TxBx.Text = LenToString(dL2, -3)
DeltaAxis3TxBx.Text = LenToString(dL3, -3)
DeltaAxis1TxBx.Text = LenToString(dL1, -3, True)
DeltaAxis2TxBx.Text = LenToString(dL2, -3, True)
DeltaAxis3TxBx.Text = LenToString(dL3, -3, True)
DeltaAxis4TxBx.Text = DoubleToString(dR1, -3)
DeltaAxis5TxBx.Text = DoubleToString(dR2, -3)
If m_AxesNumber >= 6 Then DeltaAxis6TxBx.Text = DoubleToString(dA6, -3)
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3)
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3)
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3)
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3)
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3, True)
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3, True)
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3, True)
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3, True)
End Sub
Sub DisplayFeed()
Dim dRealFeed As Double = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
'Feed = DoubleToString(dRealFeed, 0)
FeedTxBx.Text = LenToString(dRealFeed, 0)
FeedTxBx.Text = LenToString(dRealFeed, 0, True)
'FeedOverride = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
Dim dFeedOverride As Double = m_CN.d_DInterpo_Feed_override
FeedOverrideTxBx.Text = DoubleToString(dFeedOverride, 0) & "%"
+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, 2503, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2503, 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.1")>
<Assembly: AssemblyFileVersion("2.5.3.1")>
+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

+24 -6
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, _
@@ -187,10 +205,10 @@ Module Utility
End Function
' conerte il dato (in mm) in stringa nell'unità corrente
Friend Function LenToString(dVal As Double, nNumDec As Integer) As String
Friend Function LenToString(dVal As Double, nNumDec As Integer, Optional ByVal bForceToDecimal As Boolean = False) As String
Dim sVal As String = DoubleToString(EgtToUiUnits(dVal), nNumDec)
' se richiesta scrittura in frazione (solo se unità corrente INCHES)
If nCurrFractionPattern <> FractionPattern.None And Not EgtUiUnitsAreMM() Then
If (nCurrFractionPattern <> FractionPattern.None And Not EgtUiUnitsAreMM()) And Not bForceToDecimal Then
' conevrto il dato corrente in decimale
Dim dCurrVal As Double = dVal
StringToDouble(sVal, dCurrVal)
@@ -199,10 +217,10 @@ Module Utility
Return sVal
End Function
Friend Function StringToLen(sVal As String, ByRef dVal As Double) As Boolean
Friend Function StringToLen(sVal As String, ByRef dVal As Double, Optional ByVal bForceToDecimal As Boolean = False) As Boolean
If String.IsNullOrEmpty(sVal) Then Return False
If nCurrFractionPattern <> FractionPattern.None And Not EgtUiUnitsAreMM() Then
If (nCurrFractionPattern <> FractionPattern.None And Not EgtUiUnitsAreMM()) And Not bForceToDecimal Then
Dim sValSource As String = sVal
' conevrto la stringa in formato decimale (sempre in stringa)
StringFractionToStringDecimal(sValSource, sVal)