DataBeam :
- aggiunto ricalcolo pezzi se cambiata configurazione macchina TS3 - nei tagli migliorato controllo direzione ingresso lama - nei tagli longitudinali singoli corretto controllo elevazione con massimo affondamento utensile.
This commit is contained in:
+11
-3
@@ -135,9 +135,6 @@ if BEAM.FLAG > 10 then
|
||||
return
|
||||
end
|
||||
|
||||
-- *** Segnalazione avvio ***
|
||||
EgtOutLog( '*** Beam BatchProcess Start ***', 1)
|
||||
|
||||
-- Carico le librerie
|
||||
_G.package.loaded.BeamExec = nil
|
||||
local BE = require( 'BeamExec')
|
||||
@@ -164,6 +161,10 @@ if bBtl and string.find( sTitle, 'Bar_', 1, true) and EgtExistsFile( sNgeFile) t
|
||||
if nDiff == 0 then
|
||||
bToProcess = false
|
||||
end
|
||||
-- se cambiata configurazione macchina da ultima elaborazione, devo riprocessare
|
||||
if EgtCompareFilesLastWriteTime( sOriFile, sMachDir .. '\\Beam\\TS3Data.lua') == -1 then
|
||||
bToProcess = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Inizializzo contatori errori e avvisi
|
||||
@@ -172,6 +173,7 @@ local nWarnCnt = 0
|
||||
|
||||
-- Se da elaborare
|
||||
if bToProcess then
|
||||
EgtOutLog( ' +++ Processing Parts >>>')
|
||||
-- Se Btl, lo importo
|
||||
if bBtl then
|
||||
-- cancello eventuale vecchio progetto omonimo
|
||||
@@ -383,6 +385,7 @@ if bToProcess then
|
||||
|
||||
-- Altrimenti carico il progetto salvato e dichiaro nessun errore
|
||||
else
|
||||
EgtOutLog( ' +++ Loading Project already processed >>>')
|
||||
-- Carico il progetto già fatto
|
||||
EgtOpenFile( sNgeFile)
|
||||
-- Dichiaro nessun errore
|
||||
@@ -417,6 +420,7 @@ end
|
||||
|
||||
-- *** Eseguo simulazione in cieco ***
|
||||
if ( BEAM.FLAG == 3 or BEAM.FLAG == 4) then
|
||||
EgtOutLog( ' +++ Simulating with collision check >>>')
|
||||
local bSimOk, nErr, sErr = EgtSimulate()
|
||||
if not bSimOk then
|
||||
if nErr == MCH_SHE.INIT then
|
||||
@@ -454,6 +458,7 @@ end
|
||||
|
||||
-- *** Genero programma CN *** ( se richiesto)
|
||||
if BEAM.FLAG == 0 or BEAM.FLAG == 4 then
|
||||
EgtOutLog( ' +++ Generating NC part program >>>')
|
||||
if not EgtGenerate( '', 'EgtCAM5 - ' .. sNgeFile) then
|
||||
BEAM.ERR = 20
|
||||
local _, sName, _ = EgtSplitPath( BEAM.FILE)
|
||||
@@ -466,6 +471,7 @@ end
|
||||
|
||||
-- *** Eseguo stima tempi ***
|
||||
if not EgtEstimate( '', 'EgtCAM5 - ' .. sNgeFile) then
|
||||
EgtOutLog( ' +++ Estimating T&L >>>')
|
||||
BEAM.ERR = 21
|
||||
local _, sName, _ = EgtSplitPath( BEAM.FILE)
|
||||
BEAM.MSG = 'Error estimating production time : ' .. sName
|
||||
@@ -491,3 +497,5 @@ end
|
||||
|
||||
-- Scrittura tempo totale stimato di lavorazione
|
||||
WriteTimeToLogFile( Ttot)
|
||||
|
||||
EgtOutLog( ' +++ BatchProcess completed')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2020/06/02
|
||||
-- ProcessCut.lua by Egaltech s.r.l. 2020/06/11
|
||||
-- Gestione calcolo singoli tagli di lama per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -282,9 +282,9 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
|
||||
vtOrthoO = -Z_AX()
|
||||
elseif bHorizCut then
|
||||
vtOrthoO = Z_AX()
|
||||
elseif Proc.Head and abs( vtN:getY()) > 0.02 and vtN:getZ() > -0.174 and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
elseif Proc.Head and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
vtOrthoO = X_AX()
|
||||
elseif Proc.Tail and abs( vtN:getY()) > 0.02 and vtN:getZ() > -0.174 and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
elseif Proc.Tail and abs( vtN:getY()) > 0.259 and vtN:getZ() > -0.174 and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
vtOrthoO = -X_AX()
|
||||
elseif vtN:getY() > -0.02 then
|
||||
vtOrthoO = Y_AX()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- ProcessLongCut.lua by Egaltech s.r.l. 2020/04/18
|
||||
-- ProcessLongCut.lua by Egaltech s.r.l. 2020/06/11
|
||||
-- Gestione calcolo taglio longitudinale per Travi
|
||||
|
||||
-- Tabella per definizione modulo
|
||||
@@ -391,10 +391,10 @@ function ProcessLongCut.Make( Proc, nPhase, nRawId, nPartId)
|
||||
-- imposto uso della faccia
|
||||
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
|
||||
-- verifico massimo affondamento rispetto ad elevazione
|
||||
if dElev > dMaxDepth - BD.COLL_SIC then
|
||||
sWarn = 'Warning in LongCut : depth (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth - BD.COLL_SIC, 1) .. ')'
|
||||
if dElev > dMaxDepth + 10 * GEO.EPS_SMALL then
|
||||
sWarn = 'Warning in LongCut : depth (' .. EgtNumToString( dElev, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
|
||||
end
|
||||
local dDepth = min( 0, dMaxDepth - BD.COLL_SIC - dElev )
|
||||
local dDepth = min( 0, dMaxDepth - dElev )
|
||||
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
|
||||
-- eseguo
|
||||
if not EgtApplyMachining( true, false) then
|
||||
|
||||
Reference in New Issue
Block a user