Compare commits
90 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2577240699 | |||
| 590f332cea | |||
| 49316c92fc | |||
| a479cfac69 | |||
| 692601f07e | |||
| 487bbf1ce6 | |||
| c7ebf339ec | |||
| 685e63dd83 | |||
| a19947f6c2 | |||
| 07770ea12e | |||
| ce1ae72beb | |||
| 341e049753 | |||
| e8be6e9ca8 | |||
| e4659394a5 | |||
| 1e8dfdd2f0 | |||
| 1ff99e2f0f | |||
| e8958065ef | |||
| eff8fc90c6 | |||
| 4448156fec | |||
| f346df9d27 | |||
| 810f85c62a | |||
| 6ec26b5ad1 | |||
| 304701cb77 | |||
| 306945f09b | |||
| 09eb355037 | |||
| 30ed6aa984 | |||
| ff7338e2f4 | |||
| 4903a6065e | |||
| 36df78ed67 | |||
| 3132d213c1 | |||
| cbf5df9895 | |||
| ec8fa72ca2 | |||
| 8c5e759bec | |||
| 6ace9c266d | |||
| 2a7b732444 | |||
| 6206ba44db | |||
| ad882352d0 | |||
| 8ef399a55c | |||
| e397ac2627 | |||
| cfc1fbc6b6 | |||
| 3b91c0c603 | |||
| a2d0ff4d77 | |||
| 977f006bdc | |||
| aad0a2dee1 | |||
| 5589385f4d | |||
| 5fa764cb96 | |||
| f78a042dbe | |||
| 1c80767eee | |||
| 369d1a7456 | |||
| d23a9c6fa9 | |||
| fbfe8187b9 | |||
| 3ef4c18fe6 | |||
| b50c4ef806 | |||
| 7a7981fddb | |||
| 74a0bc4a43 | |||
| 4cc2e5a2d7 | |||
| 24857bc252 | |||
| 5e90232086 | |||
| 6e1faf69bc | |||
| 8fdda065d4 | |||
| 5ae185cd0e | |||
| 446b56d975 | |||
| 48626b7f90 | |||
| 21104984ad | |||
| c33c3196f2 | |||
| 9b6c24017d | |||
| 5b7bab2873 | |||
| 1886d6620e | |||
| 235a8dacb7 | |||
| aad2a95dff | |||
| 26126ac892 | |||
| 5491e5cd81 | |||
| 16e04c8502 | |||
| 3b1133f88c | |||
| 5d72e04f7e | |||
| 72d61b4561 | |||
| 7a16f26a63 | |||
| c425cf1be3 | |||
| 79ecca7e02 | |||
| b9cc8a3aa9 | |||
| 0c8769dd81 | |||
| 7c9ec51f55 | |||
| d0817659e5 | |||
| f283fe8fa9 | |||
| 87a7a89dbd | |||
| 1a1f775c88 | |||
| fd7cc25a4f | |||
| bdbec7cf37 | |||
| 8e6daeeac7 | |||
| 01e5018c3d |
@@ -3,6 +3,7 @@
|
||||
|
||||
-- carico librerie
|
||||
local INFO_STD_PP = require( 'Version')
|
||||
local BD = require( 'BeamData')
|
||||
|
||||
-- Variabili di modulo
|
||||
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
@@ -602,6 +603,8 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnRapid()
|
||||
-- recupero prossimo utensile
|
||||
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
|
||||
MyBackupAxes()
|
||||
-- se primo movimento della lavorazione, gestione speciale
|
||||
if EMT.MCHFIRST and not EMT.OPEISDISP then
|
||||
@@ -649,7 +652,7 @@ function OnRapid()
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
|
||||
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
|
||||
@@ -833,12 +836,47 @@ function OnRapid()
|
||||
EmtAdjustRotaryAxes()
|
||||
EmitZmax()
|
||||
EMT.ZMAX = true
|
||||
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
|
||||
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
|
||||
local dBAxis = 90
|
||||
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
|
||||
local sEE = ' EE3'
|
||||
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
|
||||
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
|
||||
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
end
|
||||
-- se altrimenti movimento in Home
|
||||
elseif EMT.FLAG == 4 then
|
||||
-- non previsto
|
||||
-- se altrimenti rotazione a Z max
|
||||
-- se altrimenti rotazione a Z max per lavorazione successiva
|
||||
elseif EMT.FLAG == 5 then
|
||||
-- viene gestito all'inizio della lavorazione successiva
|
||||
EMT.REFLOC = nil
|
||||
EMT.IPLGL = false
|
||||
MyAdjustLinearAxes()
|
||||
EmtAdjustRotaryAxes()
|
||||
EmtResetPrev()
|
||||
-- ricavo i dati per la lavorazione
|
||||
local sEE = ' EE3'
|
||||
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
|
||||
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
|
||||
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
|
||||
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
-- altrimenti errore
|
||||
else
|
||||
EmtSetLastError( 1212, "Unknown Rapid flag")
|
||||
@@ -930,13 +968,46 @@ function OnArc()
|
||||
local sFeed = EmtGetFeed()
|
||||
-- tipo arco
|
||||
local sArc = 'G' .. EgtNumToString(EMT.MOVE,0)
|
||||
-- emetto arco
|
||||
EmtOutput( sArc..sAxes..sRad..sFeed)
|
||||
-- se arco molto grande, approssimo con una retta
|
||||
if EMT.RR > 99999 then
|
||||
EmtOutput( "G1"..sAxes..sFeed)
|
||||
else
|
||||
EmtOutput( sArc..sAxes..sRad..sFeed)
|
||||
end
|
||||
|
||||
-- aggiorno valori come precedenti
|
||||
EmtUpdatePrev()
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function FindNextTool()
|
||||
-- salvo stato iniziale
|
||||
local CurrMachId = EgtGetCurrMachining()
|
||||
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||
-- cerco lavorazione con utensile su gruppo testa indicato
|
||||
local sTool, sHead, sTcPos
|
||||
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
|
||||
while OpId do
|
||||
local nType = EgtGetOperationType( OpId)
|
||||
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
|
||||
if EgtSetCurrMachining( OpId) then
|
||||
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
|
||||
if EgtTdbSetCurrTool( sTool) then
|
||||
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
OpId = EgtGetNextActiveOperation( OpId)
|
||||
end
|
||||
-- ripristino stato iniziale
|
||||
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
|
||||
EgtTdbSetCurrTool( CurrTool or '')
|
||||
-- restituisco risultato
|
||||
return sTool, sHead, sTcPos
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function CalcCharStatus( sCmd, bSkipPress)
|
||||
-- aperto
|
||||
@@ -1461,7 +1532,10 @@ function MyAdjustLinearAxes()
|
||||
|
||||
if EMT.REFLOC then
|
||||
local vtE
|
||||
if EMT.HEAD ~= 'H3' then
|
||||
-- su NUM aggregati non gestiti
|
||||
if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
|
||||
EmtSetLastError( 1211, "Aggregates not managed")
|
||||
elseif EMT.HEAD ~= 'H3' then
|
||||
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
|
||||
local LenRef = MillOffs
|
||||
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
|
||||
@@ -1576,7 +1650,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function GetET( sHead, sTcPos, dAxR3)
|
||||
if sHead == 'H1' then
|
||||
if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then
|
||||
return ' E'..sTcPos
|
||||
elseif sHead == 'H2' then
|
||||
return ' ET42'
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
-- carico librerie
|
||||
local INFO_STD_PP = require( 'Version')
|
||||
local BD = require( 'BeamData')
|
||||
|
||||
-- Variabili di modulo
|
||||
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
@@ -144,7 +145,11 @@ function OnToolData()
|
||||
local sPos = 'N2' .. tostring(nPos)
|
||||
local sOut = 'L11=' .. EmtLenToString( EMT.SMAX, 3) .. ' L12=' .. EmtLenToString( AngTr1Offs, 1)..' G76H9998.1'..sPos..sPos
|
||||
EmtOutput( sOut)
|
||||
-- altro non previsto
|
||||
-- emissione dati sega a catena
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
local sOut = 'L11='..EgtNumToString( EMT.SMAX, 0)..' L12='..EmtLenToString( ( 154.5), 1)..' G76H9998.1N121N121'
|
||||
EmtOutput( sOut)
|
||||
-- altro non previsto
|
||||
end
|
||||
end
|
||||
|
||||
@@ -642,6 +647,8 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnRapid()
|
||||
-- recupero prossimo utensile
|
||||
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
|
||||
MyBackupAxes()
|
||||
-- se primo movimento della lavorazione, gestione speciale
|
||||
if EMT.MCHFIRST and not EMT.OPEISDISP then
|
||||
@@ -690,7 +697,7 @@ function OnRapid()
|
||||
if EMT.HEAD == 'H3' then
|
||||
sEL = sEL..EmtLenToString( ( EMT.TDIST or ChSawLen), 3)
|
||||
-- se aggregato
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
|
||||
sEL = sEL..EmtLenToString( AngTr1Offs, 3)
|
||||
-- se testa normale ( H1 or H2)
|
||||
else
|
||||
@@ -702,7 +709,7 @@ function OnRapid()
|
||||
if EMT.HEAD == 'H3' then
|
||||
sER = sER..EmtLenToString( EMT.TLEN, 3)
|
||||
-- se aggregato
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
|
||||
sER = sER..EmtLenToString( EMT.TLEN + AngTr1Len, 3)
|
||||
-- se testa normale ( H1 or H2)
|
||||
else
|
||||
@@ -713,7 +720,7 @@ function OnRapid()
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
|
||||
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
|
||||
@@ -843,7 +850,7 @@ function OnRapid()
|
||||
sOut = 'G112 EA'..sA..' EB'..sB..EmtGetAxis('L1')..' EY'..sY..' EV'..sV..' EF'..GetFmaxClamp()
|
||||
EmtOutput( sOut)
|
||||
-- se taglio di coda senza residuo da scaricare, emetto M175 per accelerare il carico della barra successiva
|
||||
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') then
|
||||
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') and ( IsEndPhase( EMT.PHASE+1) or IsEnd2Phase( EMT.PHASE+1)) then
|
||||
EmtOutput( '(M175)')
|
||||
end
|
||||
if not bHeadFirst then
|
||||
@@ -907,12 +914,47 @@ function OnRapid()
|
||||
EmtAdjustRotaryAxes()
|
||||
EmitZmax( false)
|
||||
EMT.ZMAX = true
|
||||
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
|
||||
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
|
||||
local dBAxis = 90
|
||||
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
|
||||
local sEE = ' EE3'
|
||||
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
|
||||
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
|
||||
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
end
|
||||
-- se altrimenti movimento in Home
|
||||
elseif EMT.FLAG == 4 then
|
||||
-- non previsto
|
||||
-- se altrimenti rotazione a Z max
|
||||
-- se altrimenti rotazione a Z max per lavorazione successiva
|
||||
elseif EMT.FLAG == 5 then
|
||||
-- viene gestito all'inizio della lavorazione successiva
|
||||
EMT.REFLOC = nil
|
||||
EMT.IPLGL = false
|
||||
MyAdjustLinearAxes()
|
||||
EmtAdjustRotaryAxes()
|
||||
EmtResetPrev()
|
||||
-- ricavo i dati per la lavorazione
|
||||
local sEE = ' EE3'
|
||||
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
|
||||
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
|
||||
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
|
||||
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
-- altrimenti errore
|
||||
else
|
||||
EmtSetLastError( 1212, "Unknown Rapid flag")
|
||||
@@ -979,7 +1021,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
function OnArc()
|
||||
-- con aggregato non si possono fare archi. Deve essere tutto spezzato
|
||||
if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
|
||||
if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
|
||||
EmtSetLastError( 1211, "With aggregate, the arcs must be splitted")
|
||||
end
|
||||
|
||||
@@ -1009,13 +1051,46 @@ function OnArc()
|
||||
local sFeed = EmtGetFeed()
|
||||
-- tipo arco
|
||||
local sArc = 'G' .. EgtNumToString(EMT.MOVE,0)
|
||||
-- emetto arco
|
||||
EmtOutput( sArc..sAxes..sRad..sFeed)
|
||||
-- se arco molto grande, approssimo con una retta
|
||||
if EMT.RR > 99999 then
|
||||
EmtOutput( "G1"..sAxes..sFeed)
|
||||
else
|
||||
EmtOutput( sArc..sAxes..sRad..sFeed)
|
||||
end
|
||||
|
||||
-- aggiorno valori come precedenti
|
||||
EmtUpdatePrev()
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function FindNextTool()
|
||||
-- salvo stato iniziale
|
||||
local CurrMachId = EgtGetCurrMachining()
|
||||
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||
-- cerco lavorazione con utensile su gruppo testa indicato
|
||||
local sTool, sHead, sTcPos
|
||||
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
|
||||
while OpId do
|
||||
local nType = EgtGetOperationType( OpId)
|
||||
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
|
||||
if EgtSetCurrMachining( OpId) then
|
||||
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
|
||||
if EgtTdbSetCurrTool( sTool) then
|
||||
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
OpId = EgtGetNextActiveOperation( OpId)
|
||||
end
|
||||
-- ripristino stato iniziale
|
||||
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
|
||||
EgtTdbSetCurrTool( CurrTool or '')
|
||||
-- restituisco risultato
|
||||
return sTool, sHead, sTcPos
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function CalcDinamicaPinze( dH, dS, dL)
|
||||
local MinTempoAcc = 0.3 -- [s]
|
||||
@@ -1571,11 +1646,16 @@ function MyAdjustLinearAxes()
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
|
||||
vtE = vtAux * LenAux - Z_AX() * LenRef
|
||||
elseif EMT.HEAD == 'H5' then
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
|
||||
local LenAux = AngTr1Offs + MillOffs
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
|
||||
vtE = vtAux * LenAux - Z_AX() * LenRef
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
local LenAux = AngTrBHOffs + MillOffs
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
|
||||
vtE = vtAux * LenAux - Z_AX() * LenRef
|
||||
else
|
||||
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
|
||||
end
|
||||
@@ -1670,7 +1750,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function GetET( sHead, sTcPos, dAxR3)
|
||||
if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' then
|
||||
if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then
|
||||
return ' E'..sTcPos
|
||||
elseif sHead == 'H2' then
|
||||
return ' ET42'
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
-- carico librerie
|
||||
local INFO_STD_PP = require( 'Version')
|
||||
local BD = require( 'BeamData')
|
||||
|
||||
-- Variabili di modulo
|
||||
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
@@ -150,7 +151,12 @@ function OnToolData()
|
||||
local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
|
||||
ParkLine( sOut)
|
||||
-- altro non previsto
|
||||
-- emissione dati sega a catena
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
|
||||
ParkLine( sOut)
|
||||
-- altro non previsto
|
||||
else
|
||||
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
|
||||
end
|
||||
@@ -625,6 +631,8 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnRapid()
|
||||
-- recupero prossimo utensile
|
||||
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
|
||||
MyBackupAxes()
|
||||
-- se primo movimento della lavorazione, gestione speciale
|
||||
if EMT.MCHFIRST and not EMT.OPEISDISP then
|
||||
@@ -663,7 +671,7 @@ function OnRapid()
|
||||
end
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) ..
|
||||
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
@@ -774,7 +782,7 @@ function OnRapid()
|
||||
sB = '2'
|
||||
end
|
||||
-- se taglio di coda senza residuo da scaricare, emetto M175 per accelerare il carico della barra successiva
|
||||
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') then
|
||||
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') and ( IsEndPhase( EMT.PHASE+1) or IsEnd2Phase( EMT.PHASE+1)) then
|
||||
EmtOutput( 'M175')
|
||||
end
|
||||
if bHeadFirst then
|
||||
@@ -849,12 +857,42 @@ function OnRapid()
|
||||
EmtAdjustRotaryAxes()
|
||||
EmitZmax( true)
|
||||
EMT.ZMAX = true
|
||||
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
|
||||
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
|
||||
local dBAxis = 90
|
||||
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
|
||||
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
' P8=0' .. ' P9=0' .. ' P10=3'
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
|
||||
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
' P8=0' .. ' P9=0' .. ' P10=3'
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
end
|
||||
-- se altrimenti movimento in Home
|
||||
elseif EMT.FLAG == 4 then
|
||||
-- non previsto
|
||||
-- se altrimenti rotazione a Z max
|
||||
-- se altrimenti rotazione a Z max per lavorazione successiva
|
||||
elseif EMT.FLAG == 5 then
|
||||
-- viene gestito all'inizio della lavorazione successiva
|
||||
EMT.REFLOC = nil
|
||||
EMT.IPLGL = false
|
||||
MyAdjustLinearAxes()
|
||||
EmtAdjustRotaryAxes()
|
||||
EmtResetPrev()
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
|
||||
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
' P8=0' .. ' P9=0' .. ' P10=3'
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
-- altrimenti errore
|
||||
else
|
||||
error( "Unknown Rapid flag")
|
||||
@@ -981,6 +1019,35 @@ function OnArc()
|
||||
EmtUpdatePrev()
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function FindNextTool()
|
||||
-- salvo stato iniziale
|
||||
local CurrMachId = EgtGetCurrMachining()
|
||||
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||
-- cerco lavorazione con utensile su gruppo testa indicato
|
||||
local sTool, sHead, sTcPos
|
||||
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
|
||||
while OpId do
|
||||
local nType = EgtGetOperationType( OpId)
|
||||
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
|
||||
if EgtSetCurrMachining( OpId) then
|
||||
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
|
||||
if EgtTdbSetCurrTool( sTool) then
|
||||
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
OpId = EgtGetNextActiveOperation( OpId)
|
||||
end
|
||||
-- ripristino stato iniziale
|
||||
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
|
||||
EgtTdbSetCurrTool( CurrTool or '')
|
||||
-- restituisco risultato
|
||||
return sTool, sHead, sTcPos
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function CalcDinamicaPinze( dH, dS, dL)
|
||||
local MinTempoAcc = 0.3 -- [s]
|
||||
@@ -1578,12 +1645,18 @@ function MyAdjustLinearAxes()
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
|
||||
vtE = vtAux * LenAux - Z_AX() * LenRef
|
||||
elseif EMT.HEAD == 'H5' then
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
|
||||
local Len = EMT.TLEN + AngTr1Len
|
||||
local LenAux = MillOffs + AngTr1Offs
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
|
||||
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
local Len = EMT.TLEN + AngTrBHLen
|
||||
local LenAux = MillOffs + AngTrBHOffs
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
|
||||
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
|
||||
else
|
||||
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
|
||||
end
|
||||
@@ -1620,6 +1693,8 @@ function AdjustToolKinematic()
|
||||
return EgtIf( EMT.EXIT == 1, '11', '12')
|
||||
elseif EMT.HEAD == 'H6' then
|
||||
return EgtIf( EMT.EXIT == 1, '21', '22')
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
return '31'
|
||||
else
|
||||
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
|
||||
end
|
||||
@@ -15,11 +15,11 @@ BIG_TOOL_DIAM = 300
|
||||
---------------------------------------------------------------------
|
||||
local sBaseDir = EgtGetCurrMachineDir()
|
||||
if NumericalControl == 'NUM' then
|
||||
dofile( sBaseDir .. '\\Common-FAST.NUM.mlpe')
|
||||
dofile( sBaseDir .. '\\Common_FAST.NUM.mlpe')
|
||||
elseif NumericalControl == 'TPA' then
|
||||
dofile( sBaseDir .. '\\Common-FAST.TPA.mlpe')
|
||||
dofile( sBaseDir .. '\\Common_FAST.TPA.mlpe')
|
||||
elseif NumericalControl == 'NUM_PLUS' then
|
||||
dofile( sBaseDir .. '\\Common-FAST.NUM_PLUS.mlpe')
|
||||
dofile( sBaseDir .. '\\Common_FAST.NUM_PLUS.mlpe')
|
||||
else
|
||||
EmtSetLastError( 1201, 'Numerical Control error : unkwnown type')
|
||||
end
|
||||
@@ -105,6 +105,7 @@ function OnSimulStart()
|
||||
AddToCollisionCheck( 'B', 'COLLISION', EMT.COLLOBJ)
|
||||
AddToCollisionCheck( 'C', 'COLLISION', EMT.COLLOBJ)
|
||||
AddToCollisionCheck( 'H5', 'COLLISION', EMT.COLLOBJ)
|
||||
AddToCollisionCheck( 'H6', 'COLLISION', EMT.COLLOBJ)
|
||||
AddToolToCollisionCheck( 'H2', 1, EMT.COLLOBJ)
|
||||
AddToolHolderToCollisionCheck( 'H2', 1, EMT.COLLOBJ)
|
||||
DumpCollisionCheck( EMT.COLLOBJ, 'Collision Objects :', 4)
|
||||
@@ -152,7 +153,8 @@ function OnSimulDispositionStarting()
|
||||
EmtUnlinkAllRawPartsFromGroups()
|
||||
if EMT.PHASE > 1 then
|
||||
if IsStartOrRestPhase( EMT.PHASE) then
|
||||
EgtSetAxisPos( 'T', LoadT)
|
||||
local ParkT = GetParkT()
|
||||
EgtSetAxisPos( 'T', ParkT)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -179,7 +181,7 @@ function OnSimulDispositionStart()
|
||||
if sTool and nTlen < LONG_TOOL_MINLEN then
|
||||
EMT.TOOL_1 = sTool
|
||||
else
|
||||
EMT.TOOL_1 = GetDefaultToolName()
|
||||
EMT.TOOL_1 = GetDefaultToolName()
|
||||
end
|
||||
EgtLoadTool( 'H1', 1, EMT.TOOL_1)
|
||||
EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1)
|
||||
@@ -189,7 +191,7 @@ function OnSimulDispositionStart()
|
||||
EMT.VMILL = {}
|
||||
if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
|
||||
local nLastOrd = GetPhaseOrd( EgtGetPhaseCount())
|
||||
local nPartRawId = EgtGetFirstRawPart()
|
||||
local nPartRawId = EgtGetFirstRawPart()
|
||||
while nPartRawId do
|
||||
-- se è lo scarto finale tagliato a pezzi, esco
|
||||
local nRawOrd = EgtGetInfo( nPartRawId, 'ORD', 'i')
|
||||
@@ -211,20 +213,24 @@ function OnSimulDispositionStart()
|
||||
end
|
||||
end
|
||||
-- determino la risoluzione dello Zmap
|
||||
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
|
||||
local dTol = 4.71
|
||||
if dArea < CoeffVM * 0.15e6 then
|
||||
dTol = 0.71
|
||||
elseif dArea < CoeffVM * 0.3e6 then
|
||||
dTol = 1.01
|
||||
elseif dArea < CoeffVM * 0.6e6 then
|
||||
dTol = 1.51
|
||||
elseif dArea < CoeffVM * 1.2e6 then
|
||||
dTol = 1.97
|
||||
elseif dArea < CoeffVM * 2.4e6 then
|
||||
dTol = 2.81
|
||||
elseif dArea < CoeffVM * 4.8e6 then
|
||||
dTol = 3.77
|
||||
if EmtGetVMillStep then
|
||||
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71)
|
||||
else
|
||||
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
|
||||
if dArea < 0.075e6 then
|
||||
dTol = 0.71
|
||||
elseif dArea < 0.15e6 then
|
||||
dTol = 1.01
|
||||
elseif dArea < 0.3e6 then
|
||||
dTol = 1.51
|
||||
elseif dArea < 0.6e6 then
|
||||
dTol = 1.97
|
||||
elseif dArea < 1.2e6 then
|
||||
dTol = 2.81
|
||||
elseif dArea < 2.4e6 then
|
||||
dTol = 3.77
|
||||
end
|
||||
end
|
||||
-- creo lo Zmap
|
||||
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
|
||||
@@ -358,6 +364,8 @@ function OnSimulDispositionStart()
|
||||
EgtOutText( 'Barra non ruotata')
|
||||
end
|
||||
end
|
||||
-- verifico posizione di carico
|
||||
local ParkT = GetParkT()
|
||||
-- indice primo grezzo della fase
|
||||
local nOrd = GetPhaseOrd( EMT.PHASE)
|
||||
-- ricerco vettore movimento per i successivi
|
||||
@@ -365,7 +373,7 @@ function OnSimulDispositionStart()
|
||||
local nRawId = EgtGetFirstRawPart()
|
||||
while nRawId do
|
||||
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd + 1 then
|
||||
vtMove = Vector3d( - LoadT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0)
|
||||
vtMove = Vector3d( - ParkT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0)
|
||||
break
|
||||
end
|
||||
nRawId = EgtGetNextRawPart( nRawId)
|
||||
@@ -386,6 +394,8 @@ function OnSimulDispositionStart()
|
||||
end
|
||||
-- altrimenti fase finale, aggancio primo grezzo alla tavola e gli altri in posizione carico al carro Y
|
||||
else
|
||||
-- verifico posizione di carico
|
||||
local ParkT = GetParkT()
|
||||
-- indice primo grezzo della fase
|
||||
local nOrd = GetPhaseOrd( EMT.PHASE)
|
||||
-- ricerco vettore movimento per i successivi
|
||||
@@ -393,7 +403,7 @@ function OnSimulDispositionStart()
|
||||
local nRawId = EgtGetFirstRawPart()
|
||||
while nRawId do
|
||||
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd + 1 then
|
||||
vtMove = Vector3d( - LoadT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0)
|
||||
vtMove = Vector3d( - ParkT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0)
|
||||
break
|
||||
end
|
||||
nRawId = EgtGetNextRawPart( nRawId)
|
||||
@@ -477,8 +487,8 @@ function OnSimulToolSelect( dPosA)
|
||||
EMT.A1n = 'Y'
|
||||
EMT.A2n = 'V'
|
||||
end
|
||||
-- carico utensile se non lama su sua testa o dummy
|
||||
if EMT.HEAD ~= 'H2' and EMT.HEAD ~= 'H4' then
|
||||
-- carico utensile se non lama
|
||||
if EMT.HEAD ~= 'H2' then
|
||||
-- se sega a catena, imposto subito angolo scelto per asse virtuale A
|
||||
if EMT.HEAD == 'H3' then
|
||||
if not dPosA then
|
||||
@@ -506,6 +516,9 @@ function OnSimulToolSelect( dPosA)
|
||||
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
|
||||
end
|
||||
EgtSetAxisPos( 'B', 0)
|
||||
-- se aggregato per fresa tipo blockhaus
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
|
||||
end
|
||||
-- se punta lunga
|
||||
if EMT.TOTLEN > LONG_TOOL_MINLEN then
|
||||
@@ -529,9 +542,9 @@ function OnSimulToolDeselect()
|
||||
-- se prossimo utensile non definito, è disposizione ed esco
|
||||
if EMT.NEXTTOOL == '' then return end
|
||||
-- se cambia uscita su rinvio non devo fare alcunché
|
||||
if EMT.HEAD == 'H5' and EMT.NEXTHEAD == 'H5' then return end
|
||||
if ( EMT.HEAD == 'H5' and EMT.NEXTHEAD == 'H5') or ( EMT.HEAD == 'H6' and EMT.NEXTHEAD == 'H6') then return end
|
||||
-- se sega a catena o rinvio o punta lunga o utensile di grosso diametro, devo cambiare
|
||||
if EMT.HEAD == 'H3' or EMT.HEAD == 'H5' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then
|
||||
if EMT.HEAD == 'H3' or EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then
|
||||
EgtOutText( 'Tool change in progress...')
|
||||
-- movimento scarico sega a catena
|
||||
if EMT.HEAD == 'H3' then
|
||||
@@ -547,9 +560,13 @@ function OnSimulToolDeselect()
|
||||
end
|
||||
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
|
||||
-- movimento scarico rinvio
|
||||
elseif EMT.HEAD == 'H5' then
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
|
||||
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
|
||||
-- movimento scarico aggregato BlockHaus
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
|
||||
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
|
||||
-- movimento scarico punta lunga su T111
|
||||
elseif EMT.TOTLEN > LONG_TOOL_MINLEN then
|
||||
-- se su cambio utensile T111
|
||||
@@ -574,7 +591,7 @@ function OnSimulToolDeselect()
|
||||
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
|
||||
ShowToolInTcPos( EMT.TCPOS_1, true)
|
||||
-- movimento per carico utensile
|
||||
if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' then
|
||||
if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' and EMT.NEXTHEAD ~= 'H6' then
|
||||
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
|
||||
else
|
||||
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
|
||||
@@ -589,8 +606,8 @@ function OnSimulToolDeselect()
|
||||
ShowToolInTcPos( EMT.TCPOS_1, false)
|
||||
end
|
||||
EgtOutText( '')
|
||||
-- deposito utensile se prossimo non lama su sua testa o dummy
|
||||
elseif EMT.NEXTHEAD ~= 'H2' and EMT.NEXTHEAD ~= 'H4' then
|
||||
-- deposito utensile se prossimo non lama su sua testa
|
||||
elseif EMT.NEXTHEAD ~= 'H2' then
|
||||
if EMT.NEXTTOOL ~= EMT.TOOL_1 then
|
||||
EgtOutText( 'Tool change in progress...')
|
||||
-- simulo movimento
|
||||
@@ -600,7 +617,7 @@ function OnSimulToolDeselect()
|
||||
EgtPause( 100)
|
||||
ShowToolInTcPos( EMT.TCPOS_1, true)
|
||||
-- se segue sega a catena
|
||||
if EMT.NEXTHEAD == 'H3' or EMT.NEXTHEAD == 'H5' then
|
||||
if EMT.NEXTHEAD == 'H3' or EMT.NEXTHEAD == 'H5' or EMT.NEXTHEAD == 'H6' then
|
||||
-- se non lama, nascondo l'utensile corrente
|
||||
if EMT.HEAD ~= 'H2' then
|
||||
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.OFF)
|
||||
@@ -662,6 +679,7 @@ function OnSimulMachiningEnd()
|
||||
EMT.FALL = false
|
||||
end
|
||||
EMT.PREVHEAD = EMT.HEAD
|
||||
EMT.PREVTOOL = EMT.TOOL
|
||||
EMT.PREVEXIT = EMT.EXIT
|
||||
end
|
||||
|
||||
@@ -749,10 +767,12 @@ function OnSimulMoveStart()
|
||||
if EMT.MCHFIRST then
|
||||
EgtOutText( '')
|
||||
EMT.MCHFIRST = false
|
||||
local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
|
||||
|
||||
-- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo
|
||||
if not EMT.LOAD and EMT.MOVE == 0 and EMT.HB > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
-- se motosega mi muovo a X di sicurezza per ruotare
|
||||
if EMT.HEAD == 'H3'then
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) then
|
||||
SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
end
|
||||
end
|
||||
@@ -919,7 +939,7 @@ function ExecUnloading()
|
||||
local nLayId = EgtGroup( nVmGrpId, EgtGetGlobFrame( vMillId))
|
||||
EgtRelocate( vMillId, nLayId)
|
||||
local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 450, -450), 0)
|
||||
if EMT.FALL then vtMove = Vector3d( -500, 0, EgtIf( BD.RIGHT_LOAD, 750, -750)) end
|
||||
if EMT.FALL then vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 500, -500), -750) end
|
||||
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
|
||||
EgtSetLevel( vMillId, GDB_LV.USER)
|
||||
-- aggiungo gli spigoli
|
||||
@@ -1113,18 +1133,19 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- *** ESTIMATION T&L ***
|
||||
---------------------------------------------------------------------
|
||||
local RAPID_X_FEED = 75000 -- mm/min
|
||||
local RAPID_Y_FEED = 100000 -- mm/min
|
||||
local RAPID_Z_FEED = 50000 -- mm/min
|
||||
local RAPID_C_FEED = 15000 -- deg/min
|
||||
local RAPID_B_FEED = 15000 -- deg/min
|
||||
local RAPID_MIN_T = 0.1 -- s
|
||||
local LOAD_T = 2 -- s
|
||||
local CHAR_ONE_MOVE_T = 1 -- s
|
||||
local ROTATION_T = 40 -- s
|
||||
local SPLIT_T = 6 -- s
|
||||
local UNLOAD_T = 4 -- s
|
||||
local FALL_T = 2 -- s
|
||||
local ESTIMATION_RAPID_COEFF = EstimationRapidMultiplier or 1
|
||||
local RAPID_X_FEED = 75000 / ESTIMATION_RAPID_COEFF -- mm/min
|
||||
local RAPID_Y_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
|
||||
local RAPID_Z_FEED = 50000 / ESTIMATION_RAPID_COEFF -- mm/min
|
||||
local RAPID_C_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min
|
||||
local RAPID_B_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min
|
||||
local RAPID_MIN_T = 0.1 * ESTIMATION_RAPID_COEFF -- s
|
||||
local LOAD_T = 2 * ESTIMATION_RAPID_COEFF -- s
|
||||
local CHAR_ONE_MOVE_T = 1 * ESTIMATION_RAPID_COEFF -- s
|
||||
local ROTATION_T = 40 * ESTIMATION_RAPID_COEFF -- s
|
||||
local SPLIT_T = 6 * ESTIMATION_RAPID_COEFF -- s
|
||||
local UNLOAD_T = 4 * ESTIMATION_RAPID_COEFF -- s
|
||||
local FALL_T = 2 * ESTIMATION_RAPID_COEFF -- s
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnEstimStart()
|
||||
@@ -1524,6 +1545,12 @@ function IsStartOrRestPhase( nPhase)
|
||||
return ( sVal == 'START' or sVal == 'REST')
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function IsEndPhase( nPhase)
|
||||
local sVal = GetPhaseType( nPhase)
|
||||
return ( sVal == 'END')
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function IsMidPhase( nPhase)
|
||||
local sVal = GetPhaseType( nPhase)
|
||||
@@ -1557,6 +1584,16 @@ function GetPhaseRot( nPhase)
|
||||
return ( EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'ROT', 'i') or 0)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function GetParkT()
|
||||
local dTmp = EgtGetInfo( EMT.DISPID, 'TPOS', 'd') or EgtGetInfo( EMT.DISPID, 'TPARK', 'd')
|
||||
if dTmp then
|
||||
return dTmp
|
||||
else
|
||||
return LoadT
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- *** END GENERAL ***
|
||||
---------------------------------------------------------------------
|
||||
+952
-222
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,80 @@
|
||||
==== Common_FAST Update Log ====
|
||||
|
||||
Versione 2.7a2 (08/01/2024)
|
||||
- (MLDE-SIM) Aggiunta gestione FACOLTATIVA 'EstimationRapidMultiplier' in MLDE per regolare il tempo stimato. Se non presente in MLDE, default 1.
|
||||
- (SIM) Aggiunta gestione qualità VMILL da impostazioni macchina
|
||||
|
||||
Versione 2.7a1 (07/01/2024)
|
||||
- (MLDE-SIM-GEN) Nuovo aggregato 90° (H7) per fresa tipo BlockHaus. Ticket#2142
|
||||
- (SIM-GEN) Aumentati limiti massimi di pinzaggio minimo
|
||||
|
||||
Versione 2.6l1 (02/12/2024)
|
||||
- (SIM) Corretto movimento VMILL durante scarico pezzo piccolo a caduta
|
||||
- (SIM-GEN) Per decidere posizione parcheggio barra dopo separazione, si considera lunghezza coda del pezzo in lavoro per evitare collisioni. Ticket#2168
|
||||
|
||||
Versione 2.6k1 (11/11/2024)
|
||||
- (GEN) Aggiunta gestione aggregato a T per NUM
|
||||
- (SIM) Tolta gestione testa dummy H4
|
||||
- (SIM-GEN) Aggiustato parametro in calcolo ingombro lavorazione. Ticket#2163
|
||||
|
||||
Versione 2.6j10 (25/10/2024)
|
||||
- (SIM-GEN) Miglioria 2.6j9. Si ribadisce pinza in presa sempre, all'inizio, in base a quella attiva
|
||||
|
||||
Versione 2.6j9 (22/10/2024)
|
||||
- (SIM-GEN) Miglioria 2.6j6. Oltre al passo pellegrino si ribadisce anche quando è scambio diretto
|
||||
|
||||
Versione 2.6j8 (21/10/2024)
|
||||
- (SIM-GEN) Corretto problema tolleranza aggiunto con versione 2.6j7
|
||||
|
||||
Versione 2.6j7 (18/10/2024)
|
||||
- (SIM-GEN) In nuova disposizione carrelli, aggiunta tolleranza di 100 EPS quando si calcola minimo posizionamento
|
||||
|
||||
Versione 2.6j6 (17/10/2024)
|
||||
- (GEN) Si ribadisce che la pinza era in presa, prima di cominciare con lo scambio del passo del pellegrino. Ticket#2121
|
||||
|
||||
Versione 2.6j5 (17/10/2024)
|
||||
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Nel taglio dello scarto finale riposizionava nel vuoto. Ticket#2115
|
||||
|
||||
Versione 2.6j4 (15/10/2024)
|
||||
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Non considerava i 50mm di tolleranza su primo pinzaggio dopo ribaltamento
|
||||
- (SIM-GEN) Gestione attivazione pressore verticale in nuovo riposizionamento
|
||||
|
||||
Versione 2.6j3 (11/10/2024)
|
||||
- (GEN) Corretta scrittura macro start/attesa movimenti per NUM. Veniva scritto codice per TPA.
|
||||
|
||||
Versione 2.6j2 (03/10/2024)
|
||||
- (SIM-GEN) Piccola correzione calcolo posizione carrello durante riposizionamento, nuova gestione
|
||||
|
||||
Versione 2.6j1 (01/10/2024)
|
||||
- (SIM-GEN) Sistemato calcolo in nuova disposzione carrelli
|
||||
|
||||
Versione 2.6i6 (25/09/2024)
|
||||
- (GEN) Migliorata gestione movimenti per portare testa vicino a cambio utensile se trave alta. Ticket#2066
|
||||
|
||||
Versione 2.6i5 (24/09/2024)
|
||||
- (SIM-GEN) Tolto controllo su lunghezza maggiore di 200mm introdotto con 2.6i2 perchè non completamente funzionante
|
||||
- (GEN) Gestione in OnRapid() di EMT.FLAG=5 (rotazione a Z max per lavorazione successiva). Ora allineata alla simulazione
|
||||
|
||||
Versione 2.6i4 (24/09/2024)
|
||||
- (SIM-GEN) Aggiunto ripinzaggio extra in caso servisse un grande spostamento e si sta pinzando poco.
|
||||
L'aggiunta del ripinzaggio dipende da FASTCLAMPING (che deve essere disattiva). Viene aggiunta GAIN_RECLAMPING per decidere il guadagno in mm del ripinzaggio.
|
||||
|
||||
Versione 2.6i3 (23/09/2024)
|
||||
- (SIM-GEN) Aggiunta nuova strategia riposizionamento morse
|
||||
- (SIM-GEN) Aggiunta lettura flag NEWCLAMPING in BeamData, per abilitare nuova strategia riposizionamento. Se false o nil, funziona con metodo vecchio.
|
||||
- (SIM-GEN) Aggiunta lettura flag FASTCLAMPING. Se false, al carico prende al massimo 1000mm, per evitare collisioni durante ciclo di lettura laser e prima lavorazione.
|
||||
|
||||
Versione 2.6i2 (16/09/2024)
|
||||
- (SIM-GEN) Se utensili più lunghi di 200mm, si ruota in home e poi si approccia il pezzo. Ticket#2038
|
||||
- (SIM-GEN) Aumentata distanza ingombro da 650mm a 660mm. In casi di utensile abbastanza lungo poteva andare in colisione. Ticket#2041
|
||||
|
||||
Versione 2.6i1 (02/09/2024)
|
||||
- (MLDE-SIM-GEN) Rinominato file da "Common-" a "Common_" per uniformità con i file common delle altre macchine. Serve modifica a MLDE macchina.
|
||||
|
||||
Versione 2.6g1 (03/07/2024)
|
||||
- (GEN) Corretto chiamata macro precarico in caso di taglio finale, ma con ribaltamento successivo. Ora si chiama solo se la fase successiva è una "END". Ticket#1881
|
||||
- (GEN) Per controllo NUM, se arco maggiore di 99999mm, si approssima con una retta. Ticket#1888
|
||||
|
||||
Versione 2.6e3 (06/05/2024)
|
||||
- (MLDE-SIM-GEN) Gestione facoltativa parametri MIN_JOIN_xx settabili in Ts3. Ticket#1794
|
||||
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
-- Gestione della versione dei file comuni post-processori macchine FAST e FASTrl di Essetre
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common-FAST', -- nome script PP standard
|
||||
VERSION = '2.6e3', -- versione script
|
||||
NAME = 'Common_FAST', -- nome script PP standard
|
||||
VERSION = '2.7a2', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user