Gestione simulazione linea di produzione
This commit is contained in:
@@ -879,7 +879,7 @@ Public Class DrawPageUC
|
||||
|
||||
' permette di inserire più di un part
|
||||
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||
Dim InsertColor As Color3d = New Color3d(160, 160, 160)
|
||||
Dim InsertColor As Color3d = New Color3d(89, 210, 210)
|
||||
GetPrivateProfileColor(S_GENERAL, "LastColor", InsertColor, m_MainWindow.GetIniFile())
|
||||
Dim nDeltaR As Integer = GetPrivateProfileInt(S_GENERAL, "Delta_R", 25, m_MainWindow.GetIniFile())
|
||||
Dim nDeltaG As Integer = GetPrivateProfileInt(S_GENERAL, "Delta_G", 25, m_MainWindow.GetIniFile())
|
||||
@@ -887,15 +887,15 @@ Public Class DrawPageUC
|
||||
' incremento il valore del colore usato (su tutti i fronti)
|
||||
InsertColor.R += nDeltaR
|
||||
If InsertColor.R > 225 Then
|
||||
InsertColor.R = 50
|
||||
InsertColor.R = 85
|
||||
End If
|
||||
InsertColor.G += nDeltaG
|
||||
If InsertColor.G > 225 Then
|
||||
InsertColor.G = 50
|
||||
InsertColor.G = 85
|
||||
End If
|
||||
InsertColor.B += nDeltaB
|
||||
If InsertColor.B > 225 Then
|
||||
InsertColor.B = 50
|
||||
InsertColor.B = 85
|
||||
End If
|
||||
|
||||
' Imposto il contesto corrente
|
||||
|
||||
@@ -579,7 +579,7 @@ Public Class ImportPageUC
|
||||
' metodo utilizzato per definire il colore dei pezzi DXF importati
|
||||
Private Sub ColorRegion(nCtx As Integer)
|
||||
' Leggo dati corrispondenza colore
|
||||
Dim InsertColor As Color3d = New Color3d(160, 160, 160)
|
||||
Dim InsertColor As Color3d = New Color3d(89, 210, 210)
|
||||
GetPrivateProfileColor(S_GENERAL, "LastColor", InsertColor, m_MainWindow.GetIniFile())
|
||||
Dim nDeltaR As Integer = GetPrivateProfileInt(S_GENERAL, "Delta_R", 25, m_MainWindow.GetIniFile())
|
||||
Dim nDeltaG As Integer = GetPrivateProfileInt(S_GENERAL, "Delta_G", 25, m_MainWindow.GetIniFile())
|
||||
@@ -587,15 +587,15 @@ Public Class ImportPageUC
|
||||
' incremento il valore del colore usato (su tutti i fronti)
|
||||
InsertColor.R += nDeltaR
|
||||
If InsertColor.R > 225 Then
|
||||
InsertColor.R = 50
|
||||
InsertColor.R = 85
|
||||
End If
|
||||
InsertColor.G += nDeltaG
|
||||
If InsertColor.G > 225 Then
|
||||
InsertColor.G = 50
|
||||
InsertColor.G = 85
|
||||
End If
|
||||
InsertColor.B += nDeltaB
|
||||
If InsertColor.B > 225 Then
|
||||
InsertColor.B = 50
|
||||
InsertColor.B = 85
|
||||
End If
|
||||
|
||||
' Imposto contesto corrente
|
||||
|
||||
@@ -28,6 +28,9 @@ Public Class CurrentMachine
|
||||
Private m_nThreadSleep As Integer = 150
|
||||
|
||||
' Dati su linea di produzione
|
||||
Private m_bDemo As Boolean = False
|
||||
Public nLastProjSentToViewDEMO As Integer = 0
|
||||
|
||||
Private m_bProdLine As Boolean = False
|
||||
Private m_sVarProg1 As String = "E80021"
|
||||
Private m_nProg1 As Integer = 901
|
||||
@@ -225,6 +228,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bDemo As Boolean
|
||||
Get
|
||||
Return m_bDemo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bProdLine As Boolean
|
||||
Get
|
||||
Return m_bProdLine
|
||||
@@ -1034,6 +1043,7 @@ Public Class CurrentMachine
|
||||
m_bProdLine = False
|
||||
EgtOutLog("Error - Production line requested but not key enabled")
|
||||
End If
|
||||
m_bDemo = (GetPrivateProfileInt(S_PRODUCTIONLINE, "Demo", 0, sMachIniFile) <> 0)
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", m_sVarProg1, sMachIniFile)
|
||||
m_nProg1 = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile())
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", m_sVarProg2, sMachIniFile)
|
||||
|
||||
+8
-1
@@ -1094,6 +1094,9 @@ Class MainWindow
|
||||
If m_bNCLink And m_CurrentMachine.bProdLine Then
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
ElseIf m_CurrentMachine.bDemo Then
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
End If
|
||||
|
||||
' seleziono il tipo di avvio
|
||||
@@ -1194,7 +1197,7 @@ Class MainWindow
|
||||
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
|
||||
nMove = 1
|
||||
End If
|
||||
' altrimenti forzo trasmissione ultimo inviato
|
||||
' altrimenti forzo trasmissione ultimo inviato
|
||||
Else
|
||||
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
|
||||
nMove = 1
|
||||
@@ -1223,6 +1226,10 @@ Class MainWindow
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
' forzo la variabile CN - aggiornando il valore dell'indice del progetto in elaborazione
|
||||
If m_CurrentMachine.bDemo Then nVarCopy = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, GetIniFile())
|
||||
|
||||
' Leggo variabile con ultimo progetto mandato a OmagView
|
||||
Dim nLastCopy As Integer = GetPrivateProfileInt(S_GENERAL, K_LASTPROJTOVIEW, 0, GetIniFile())
|
||||
' Se non nulla e diversa da ultimo copiato, verifico se eseguire la copia
|
||||
|
||||
@@ -643,7 +643,7 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Notifico a foto il cambio di path
|
||||
EgtChangePhotoPath(nPhotoId, sNewPhoto)
|
||||
' Altrimenti cancello eventuali file di foto associabili al progetto
|
||||
' Altrimenti cancello eventuali file di foto associabili al progetto
|
||||
Else
|
||||
Dim sPhoto1 As String = Path.ChangeExtension(sPath, "jpg")
|
||||
Dim sPhoto2 As String = Path.ChangeExtension(sPath, "png")
|
||||
|
||||
@@ -462,7 +462,7 @@ Public Class ProjectMgrUC
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Se macchina normale
|
||||
If Not m_CurrMachine.bProdLine Then
|
||||
If Not m_CurrMachine.bProdLine Or Not 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
|
||||
@@ -564,6 +564,7 @@ Public Class ProjectMgrUC
|
||||
|
||||
' Se non collegato alla macchina
|
||||
If Not m_MainWindow.m_bNCLink Then
|
||||
' salvo il progetto corrente incrementando il valore del progetto
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
@@ -574,6 +575,7 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.SaveProject()
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript(False, bAlreadySent)
|
||||
' se in versione demo (per linea di produzione) salvo il file corrente incrementando la numerazione
|
||||
Return
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user