Compare commits

...

5 Commits

Author SHA1 Message Date
Nicola Pievani 52688ed0da Inizio gestione Vaccum due teste 2023-07-21 14:31:25 +02:00
Nicola Pievani 60eda04669 Correzione creazione file NewClick,txt 2023-07-17 09:51:25 +02:00
Nicola Pievani b95dd8f41d Gestione estensione file inviato al CN 2023-07-13 10:42:42 +02:00
Nicola Pievani 4b2351c20a Cambio versione 2.5g1 2023-07-11 16:02:51 +02:00
Nicola Pievani 988743187b Merge commit '2c0afccbe3b165a9d3c82b57d7328409ba334513' into develop 2023-07-10 14:59:29 +02:00
9 changed files with 109 additions and 48 deletions
+15 -1
View File
@@ -370,7 +370,19 @@ Public Class MoveRawPartPage
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger) VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0) 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) VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
If PutVacuumCupsOnRaw(nId, rmData) Then
Dim bTwoHeadVac As Boolean = False
Dim bPutVacuum As Boolean = False
If EgtGetAxisId("C1") And EgtGetAxisId("C2") Then
bTwoHeadVac = True
End If
bPutVacuum = PutVacuumCupsOnRaw(nId, rmData)
If Not bPutVacuum And bTwoHeadVac Then
bPutVacuum = PutVacuumCupsOnRaw(nId, rmData)
End If
If bPutVacuum Then
' Visualizzo le ventose ' Visualizzo le ventose
EgtSetStatus(GetVacuumId(), GDB_ST.ON_) EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
' Aggiorno i dati ' Aggiorno i dati
@@ -392,6 +404,8 @@ Public Class MoveRawPartPage
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
End If End If
End If End If
End If End If
End If End If
EgtDraw() EgtDraw()
+5 -2
View File
@@ -2482,8 +2482,11 @@ Public Class NestPageUC
Const STORE_LARGH As Double = 6000 Const STORE_LARGH As Double = 6000
Const STORE_DIST As Double = 200 Const STORE_DIST As Double = 200
Const STORE_OFFS As Double = 20 + 40 + 20 Const STORE_OFFS As Double = 20 + 40 + 20
Dim dStXmin As Double = b3Tab.Min().x - 0.5 * (STORE_LARGH - b3Tab.DimX()) Dim dStoreLarg As Double = GetPrivateProfileDouble("Store", "StoreLargh", STORE_LARGH, m_MainWindow.GetMachIniFile())
Return EgtPackBox(nId, dStXmin, -INFINITO, dStXmin + STORE_LARGH, b3Tab.Min().y - STORE_DIST, STORE_OFFS, False) Dim dStoreDist As Double = GetPrivateProfileDouble("Store", "StoreDist", STORE_DIST, m_MainWindow.GetMachIniFile())
Dim dStoreOffs As Double = GetPrivateProfileDouble("Store", "StoreOffs", STORE_OFFS, m_MainWindow.GetMachIniFile())
Dim dStXmin As Double = b3Tab.Min().x - 0.5 * (dStoreLarg - b3Tab.DimX())
Return EgtPackBox(nId, dStXmin, -INFINITO, dStXmin + dStoreLarg, b3Tab.Min().y - dStoreDist, dStoreOffs, False)
End Function End Function
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
+68 -39
View File
@@ -31,6 +31,8 @@ Module VacuumCups
' Nome del gruppo temporaneo per le ventose ' Nome del gruppo temporaneo per le ventose
Private Const VACTMP_GRP As String = "VacTmp" Private Const VACTMP_GRP As String = "VacTmp"
Private sHeadName As String = VACUUM_HEAD
'----------------------------------------------------------------------------------------------- '-----------------------------------------------------------------------------------------------
Friend Class RawMoveData Friend Class RawMoveData
@@ -87,17 +89,17 @@ Module VacuumCups
Friend Function LoadVacuumCups() As Boolean Friend Function LoadVacuumCups() As Boolean
' Leggo tipo manipolatore con ventosa ' Leggo tipo manipolatore con ventosa
m_nVacType = 0 m_nVacType = 0
EgtGetInfo(EgtGetHeadId(VACUUM_HEAD), KEY_VAC_TYPE, m_nVacType) EgtGetInfo(EgtGetHeadId(sHeadName), KEY_VAC_TYPE, m_nVacType)
' Cancello eventuali vecchie ventose ' Cancello eventuali vecchie ventose
RemoveVacuumCups() RemoveVacuumCups()
' Identificativo ventose nella macchina ' Identificativo ventose nella macchina
Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), VACUUM_HEAD_LAYOUT) Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(sHeadName), VACUUM_HEAD_LAYOUT)
If nLayId = GDB_ID.NULL Then Return False If nLayId = GDB_ID.NULL Then Return False
' Identificativo riferimento della testa nella macchina ' Identificativo riferimento della testa nella macchina
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT) Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(sHeadName), HEAD_FIRST_EXIT)
If nT1Id = GDB_ID.NULL Then Return False If nT1Id = GDB_ID.NULL Then Return False
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile ' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
EgtSetCalcTool("", "H4", 1) EgtSetCalcTool("", sHeadName, 1)
' Creo gruppo temporaneo in cui copiarli ' Creo gruppo temporaneo in cui copiarli
m_nTempId = EgtCreateGroup(GDB_ID.ROOT) m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
If m_nTempId = GDB_ID.NULL Then Return False If m_nTempId = GDB_ID.NULL Then Return False
@@ -107,23 +109,23 @@ Module VacuumCups
m_nVacId = EgtCopyGlob(nLayId, m_nTempId) m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
If m_nVacId = GDB_ID.NULL Then Return False If m_nVacId = GDB_ID.NULL Then Return False
' Angolo di rotazione preferito ' Angolo di rotazione preferito
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot) EgtGetInfo(m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola ' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus) EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus) EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus) EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus) EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
' Direzione di riferimento per tagli Drip ' Direzione di riferimento per tagli Drip
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng) EgtGetInfo(m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose ' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
EgtSetStatus(m_nVacId, GDB_ST.OFF) EgtSetStatus(m_nVacId, GDB_ST.OFF)
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId) Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
While nId <> GDB_ID.NULL While nId <> GDB_ID.NULL
Select Case EgtGetType(nId) Select Case EgtGetType(nId)
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
EgtSetStatus(nId, GDB_ST.ON_) EgtSetStatus(nId, GDB_ST.ON_)
Case Else Case Else
EgtSetStatus(nId, GDB_ST.OFF) EgtSetStatus(nId, GDB_ST.OFF)
End Select End Select
nId = EgtGetNext(nId) nId = EgtGetNext(nId)
End While End While
@@ -152,7 +154,7 @@ Module VacuumCups
Friend Function ResetVacuumCups() As Boolean Friend Function ResetVacuumCups() As Boolean
' Ripristino posizione e rotazione originali ' Ripristino posizione e rotazione originali
Dim frOriRef As New Frame3d Dim frOriRef As New Frame3d
EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef) EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(sHeadName), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef)
Dim frCurrRef As New Frame3d Dim frCurrRef As New Frame3d
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef) EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
EgtMove(m_nVacId, frOriRef.Orig() - frCurrRef.Orig(), GDB_RT.GLOB) EgtMove(m_nVacId, frOriRef.Orig() - frCurrRef.Orig(), GDB_RT.GLOB)
@@ -164,10 +166,10 @@ Module VacuumCups
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId) Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
While nId <> GDB_ID.NULL While nId <> GDB_ID.NULL
Select Case EgtGetType(nId) Select Case EgtGetType(nId)
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
EgtSetStatus(nId, GDB_ST.ON_) EgtSetStatus(nId, GDB_ST.ON_)
Case Else Case Else
EgtSetStatus(nId, GDB_ST.OFF) EgtSetStatus(nId, GDB_ST.OFF)
End Select End Select
nId = EgtGetNext(nId) nId = EgtGetNext(nId)
End While End While
@@ -214,7 +216,16 @@ Module VacuumCups
' Eseguo ricerca ' Eseguo ricerca
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
Return True Return True
Else
If sHeadName = VACUUM_HEAD_2 Then
sHeadName = VACUUM_HEAD
Else
sHeadName = VACUUM_HEAD_2
End If
LoadVacuumCups()
Return False
End If End If
' In caso di fallimento, provo riducendo con offset la regione di kerf ' In caso di fallimento, provo riducendo con offset la regione di kerf
' (così si simula la proiezione del centro sul MAT - medial axis transform) ' (così si simula la proiezione del centro sul MAT - medial axis transform)
Dim bOkFind As Boolean = False Dim bOkFind As Boolean = False
@@ -241,20 +252,20 @@ Module VacuumCups
' Verifico sia veramente un pezzo ' Verifico sia veramente un pezzo
If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False
' Cerco la direzione del primo taglio attivo da sotto ' Cerco la direzione del primo taglio attivo da sotto
Dim nDripLayId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_DRIPCUT) Dim nDripLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_DRIPCUT)
Dim nDripLineId As Integer = EgtGetFirstInGroup( nDripLayId) Dim nDripLineId As Integer = EgtGetFirstInGroup(nDripLayId)
While nDripLineId <> GDB_ID.NULL While nDripLineId <> GDB_ID.NULL
Dim nMchId As Integer = EgtGetOperationId( "DripSaw" & nDripLineId.ToString()) Dim nMchId As Integer = EgtGetOperationId("DripSaw" & nDripLineId.ToString())
Dim nMode As Integer Dim nMode As Integer
If EgtGetMode( nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While If EgtGetMode(nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While
nDripLineId = EgtGetNext( nDripLineId) nDripLineId = EgtGetNext(nDripLineId)
End While End While
Dim vtDir As New Vector3d Dim vtDir As New Vector3d
if EgtStartVector( nDripLineId, GDB_ID.ROOT, vtDir) Then If EgtStartVector(nDripLineId, GDB_ID.ROOT, vtDir) Then
Dim dLen, dAngV, dAngH As Double Dim dLen, dAngV, dAngH As Double
vtDir.ToSpherical( dLen, dAngV, dAngH) vtDir.ToSpherical(dLen, dAngV, dAngH)
Dim dOffsAng = dAngH - m_dDripRefAng Dim dOffsAng = dAngH - m_dDripRefAng
While dOffsAng - m_dPreferredRot >= 90 While dOffsAng - m_dPreferredRot >= 90
dOffsAng -= 180 dOffsAng -= 180
End While End While
While dOffsAng - m_dPreferredRot <= -90 While dOffsAng - m_dPreferredRot <= -90
@@ -388,7 +399,7 @@ Module VacuumCups
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
' Recupero l'asse rotante della testa ventosa ' Recupero l'asse rotante della testa ventosa
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(VACUUM_HEAD)) Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(sHeadName))
' Verifico se contiene info con STEPS ' Verifico se contiene info con STEPS
Dim sSteps As String = "" Dim sSteps As String = ""
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
@@ -493,15 +504,15 @@ Module VacuumCups
' Ordino secondo distanza angolare crescente da direzione di allineamento (modulo 180 deg) ' Ordino secondo distanza angolare crescente da direzione di allineamento (modulo 180 deg)
Dim dRotRefDeg As Double = dRotAngDeg Dim dRotRefDeg As Double = dRotAngDeg
vAngRot.Sort(Function(P, Q) vAngRot.Sort(Function(P, Q)
Dim dDiffP = Math.Abs( P - dRotRefDeg) Dim dDiffP = Math.Abs(P - dRotRefDeg)
If Math.Abs( dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1 If Math.Abs(dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1
Dim dDiffQ = Math.Abs( Q - dRotRefDeg) Dim dDiffQ = Math.Abs(Q - dRotRefDeg)
If Math.Abs( dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1 If Math.Abs(dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1
Return ( dDiffP - dDiffQ) Return (dDiffP - dDiffQ)
End Function) End Function)
' Annullo la rotazione di allineamento ' Annullo la rotazione di allineamento
dRotAngDeg = 0 dRotAngDeg = 0
' altrimenti in continuo ' altrimenti in continuo
Else Else
' Assegno più valori di ricerca e conservo angolo di allineamento ' Assegno più valori di ricerca e conservo angolo di allineamento
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45}) vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
@@ -548,25 +559,43 @@ Module VacuumCups
' assegnate 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 Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
Dim sAxisName As String = "C"
' verifico che il nome dell'asse impostato sia corretto
If Not EgtGetAxisId(sAxisName) Then
If sHeadName = VACUUM_HEAD Then
sAxisName = "C1"
Else
sAxisName = "C2"
End If
End If
' Posizione Home dell'asse rotante ' Posizione Home dell'asse rotante
Dim dCHome As Double Dim dCHome As Double
EgtGetAxisHomePos("C", dCHome) EgtGetAxisHomePos(sAxisName, dCHome)
' Corse dell'asse ' Corse dell'asse
Dim dCMin As Double Dim dCMin As Double
EgtGetAxisMin("C", dCMin) EgtGetAxisMin(sAxisName, dCMin)
Dim dCMax As Double Dim dCMax As Double
EgtGetAxisMax("C", dCMax) EgtGetAxisMax(sAxisName, dCMax)
' Porto l'angolo nel range ' Porto l'angolo nel range
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax) AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
' Imposto la ventosa come fosse un utensile ' Imposto la ventosa come fosse un utensile
EgtSetCalcTool("", "H4", 1) EgtSetCalcTool("", sHeadName, 1)
' Calcolo gli assi macchina ' Calcolo gli assi macchina
Dim dX, dY, dZ As Double Dim dX, dY, dZ As Double
Dim nStat As Integer Dim nStat As Integer
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ) If EgtGetAxisId("A") Then
' Verifico le corse ' Asse tavola rotante (movimenti solo con A0)
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat) EgtGetCalcPositions(ptRef, 0, dRotAngMachDeg, nStat, dX, dY, dZ)
' Verifico le corse
EgtVerifyOutstroke(dX, dY, dZ, 0, dRotAngMachDeg, nStat)
Else
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
' Verifico le corse
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
End If
Return nStat Return nStat
End Function End Function
@@ -732,7 +761,7 @@ Module VacuumCups
rmList.RemoveAt(nInd) rmList.RemoveAt(nInd)
nInd = rmList.Count() - 1 nInd = rmList.Count() - 1
End If End If
' Se non trovato, lo accodo ' Se non trovato, lo accodo
Else Else
rmList.Add(New RawMoveData(nRawId)) rmList.Add(New RawMoveData(nRawId))
nInd = rmList.Count() - 1 nInd = rmList.Count() - 1
+1
View File
@@ -84,6 +84,7 @@ Module ConstGen
' Nome testa con ventose per spostamento pezzi ' Nome testa con ventose per spostamento pezzi
Public Const VACUUM_HEAD As String = "H4" Public Const VACUUM_HEAD As String = "H4"
Public Const VACUUM_HEAD_2 As String = "H104"
' Info tipo ventosa ' Info tipo ventosa
Public Const KEY_VAC_TYPE As String = "VacType" Public Const KEY_VAC_TYPE As String = "VacType"
' Nome gruppo layout in testa con ventose ' Nome gruppo layout in testa con ventose
+1
View File
@@ -5,6 +5,7 @@
Public Const S_PARTPROGRAM As String = "PartProgram" Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const K_EXTENSION As String = "Extension" Public Const K_EXTENSION As String = "Extension"
Public Const K_EXTFILECN As String = "ExtFileCN"
Public Const S_AXES As String = "Axes" Public Const S_AXES As String = "Axes"
Public Const K_AXESNUM As String = "AxesNum" Public Const K_AXESNUM As String = "AxesNum"
+10
View File
@@ -54,6 +54,8 @@ Public Class CurrentMachine
Private m_sProdLiSawDiameter2Var As String = "" Private m_sProdLiSawDiameter2Var As String = ""
Private m_sClickState As String = "E80028" Private m_sClickState As String = "E80028"
Private m_sClickDir As String = "" Private m_sClickDir As String = ""
' Gestione speciale per canali CN
Private m_sExtFileCN As String = ".0"
' Numero e tipo di utensili correntemente disponibili sulla macchina ' Numero e tipo di utensili correntemente disponibili sulla macchina
Private m_MountedToolConfig As MountedToolConfigs = MountedToolConfigs.SAW Private m_MountedToolConfig As MountedToolConfigs = MountedToolConfigs.SAW
@@ -339,6 +341,12 @@ Public Class CurrentMachine
End Get End Get
End Property End Property
Friend ReadOnly Property sExtFileCN As String
Get
Return m_sExtFileCN
End Get
End Property
Friend Function sProdLiProbingStateVar(nI As Integer) As String Friend Function sProdLiProbingStateVar(nI As Integer) As String
If nI = 1 Then Return m_sProdLiProbingStateVar If nI = 1 Then Return m_sProdLiProbingStateVar
If nI = 2 Then Return m_sProdLiProbingState2Var If nI = 2 Then Return m_sProdLiProbingState2Var
@@ -1135,6 +1143,8 @@ Public Class CurrentMachine
m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini" m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
' Leggo estensione del file programma pezzo ' Leggo estensione del file programma pezzo
GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile) GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile)
' per gestione canali separati (macchina NUM con più di 5 Assi) ver. 2.5g1
GetPrivateProfileString(S_PARTPROGRAM, K_EXTFILECN, ".0", m_sExtFileCN, sMachIniFile)
If m_sIsoFileExt(0) <> "." Then m_sIsoFileExt = "." & m_sIsoFileExt If m_sIsoFileExt(0) <> "." Then m_sIsoFileExt = "." & m_sIsoFileExt
' Leggo flag incremento asse C ' Leggo flag incremento asse C
m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile) m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile)
+2 -2
View File
@@ -329,8 +329,8 @@ Class MainWindow
' Verifico abilitazione nesting automatico ' Verifico abilitazione nesting automatico
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey) m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
' Recupero opzioni della chiave ' Recupero opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2506, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(9423, 2507, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2506, 1, m_nKeyOptions) EgtGetKeyOptions(9423, 2507, 1, m_nKeyOptions)
' Verifico abilitazione prodotto ' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE) Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.6.2")> <Assembly: AssemblyVersion("2.5.7.1")>
<Assembly: AssemblyFileVersion("2.5.6.2")> <Assembly: AssemblyFileVersion("2.5.7.1")>
+5 -2
View File
@@ -515,7 +515,9 @@ Public Class CNCommunication
If nClickState = 1 Then If nClickState = 1 Then
' procedo a costruire un nuovo file nella cartella indicata in configurazione ' procedo a costruire un nuovo file nella cartella indicata in configurazione
Try Try
File.Create(m_MainWindow.m_CurrentMachine.sClickDir & "\NewClick.txt") Dim fs As FileStream = File.Create(m_MainWindow.m_CurrentMachine.sClickDir & "\NewClick.txt")
' chiudo il file creato
fs.Close()
' Dichiaro di aver provveduto a comunicare di scattare la foto ' Dichiaro di aver provveduto a comunicare di scattare la foto
m_CN.DVariables_WriteVariables2(m_MainWindow.m_CurrentMachine.sClickState, "0") m_CN.DVariables_WriteVariables2(m_MainWindow.m_CurrentMachine.sClickState, "0")
Catch ex As Exception Catch ex As Exception
@@ -1165,7 +1167,8 @@ Public Class CNCommunication
bOk = (m_nNCType > 0) bOk = (m_nNCType > 0)
Dim sNumProg As String = String.Empty Dim sNumProg As String = String.Empty
If m_nNCType = 1 Or m_nNCType = 2 Then If m_nNCType = 1 Or m_nNCType = 2 Then
sNumProg = "%" & nNumProg.ToString() & ".0" Dim sExtFileCN As String = m_MainWindow.m_CurrentMachine.sExtFileCN
sNumProg = "%" & nNumProg.ToString() & sExtFileCN
Else Else
sNumProg = nNumProg.ToString() sNumProg = nNumProg.ToString()
End If End If