Compare commits

...

22 Commits

Author SHA1 Message Date
andrea.villa fc2608def7 - Allineamento a common ver. 2.7l1
- Aggiunto parametro MAX_ANGLE_DRILL_CUT a BeamData
- Recupero nome macchina da funzione EGT
2025-12-18 12:33:32 +01:00
andrea.villa eb95ddc906 Corretto disegno porta utensile 2025-12-11 09:26:59 +01:00
andrea.villa 7c3e24362a Merge branch 'develop' 2025-11-27 09:44:52 +01:00
andrea.villa 1520bfee1d Aggiunto nuovo ToolHolder
Cambio versione per pubblicazione versione a cliente
2025-11-27 09:44:39 +01:00
daniele.nicoli 3265bc8f8c - Aggiornamento a Common 2.7k5
- mlde, aggiunti import CLAMP_CHECK
- mlde, inizializzato valore default di ClampingCoeffMin = nil
- Aggiornamento versione MACH_KERNEL minima necessaria per Common 2.7k4
2025-11-26 10:29:57 +01:00
daniele.nicoli c1fef81e2a Merge branch 'New3d' into develop 2025-11-26 10:22:11 +01:00
daniele.nicoli 7449346786 Ottimizzato 3d macchina (non testato), aggiunto 3d CLAMP_CHECK 2025-11-24 12:52:38 +01:00
andrea.villa c0f5ad297c Merge branch 'main' into develop 2025-11-21 10:01:31 +01:00
andrea.villa d76a57123d Cambio versione macchina 2025-11-19 13:48:54 +01:00
andrea.villa 9dca9abed9 Allineamento con common ver. 2.7k2 2025-11-19 13:45:42 +01:00
andrea.villa 0de6db7c3d Allineamento con common ver. 2.7k1 2025-11-19 08:04:21 +01:00
andrea.villa 1963f8dfdf Merge remote-tracking branch 'origin/develop' 2025-11-19 08:03:22 +01:00
daniele.nicoli 618e1b6cce Aggiunta gestione CUT_SIC impostabile da TS3Data.lua 2025-11-13 12:26:34 +01:00
daniele.nicoli ef69d65b5b Merge branch 'main' into develop 2025-11-13 12:25:23 +01:00
andrea.villa 835b644aa7 Merge branch 'develop' 2025-09-08 10:35:50 +02:00
andrea.villa a9c4faeb15 Allineamento con common ver. 2.7i1 2025-09-08 10:35:33 +02:00
andrea.villa 1630d18db4 Se testa 3 deve salire a ZMAX, sale alla X dove si trova e non torna in home 2025-09-02 10:27:33 +02:00
andrea.villa 2b1d0b6821 Allineamento con versione 2.7i1 dei common non ancora rilasciata. 2025-09-02 09:14:02 +02:00
andrea.villa 77f0d4d14c Merge remote-tracking branch 'origin/main' into develop 2025-09-02 09:12:43 +02:00
andrea.villa 8055ed70f0 Allineamento con common ver. 2.7h2 2025-08-21 17:59:59 +02:00
andrea.villa 6c176ee8f7 Cambio versione 2025-08-20 16:38:49 +02:00
andrea.villa 23bf122c9c - Allineamento con common ver. 2.7h1
- Dimensione tavola portata a 34m
- Aggiunto lettura coefficiente stima tempi
2025-08-20 16:37:41 +02:00
9 changed files with 455 additions and 86 deletions
+3
View File
@@ -42,6 +42,7 @@ local BeamData = {
DRILL_TOL = 0.2, -- tolleranza tra diametro foro e diametro punta
DRILL_VZ_MIN = - 0.51, -- componente limite in Z del versore di un foro
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
MAX_ANGLE_DRILL_CUT = 15, -- delta angolo massimo tra foro e taglio che lo attraversa
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
MAX_DIST_HTFEA = 50.0, -- massima distanza di feature da testa o coda per essere considerata tale
@@ -113,7 +114,9 @@ if EgtExistsFile( sDataBeam) then
BeamData.ADVANCE_TAIL_OFFS = Machine.Offsets.ADVANCE_TAIL_OFFS or BeamData.ADVANCE_TAIL_OFFS
BeamData.LEN_VERY_SHORT_PART = Machine.Offsets.LEN_VERY_SHORT_PART or BeamData.LEN_VERY_SHORT_PART
BeamData.LEN_SHORT_PART = Machine.Offsets.LEN_SHORT_PART or BeamData.LEN_SHORT_PART
BeamData.MAX_ANGLE_DRILL_CUT = Machine.Offsets.MAX_ANGLE_DRILL_CUT or BeamData.MAX_ANGLE_DRILL_CUT
BeamData.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
if Machine.Offsets.CUT_SIC then BeamData.CUT_SIC = EgtClamp( Machine.Offsets.CUT_SIC, 15, 50) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
+57 -50
View File
@@ -294,6 +294,8 @@ function OnDispositionEnd()
for i = 1, #EMT.MDCHAR do
EmitMoveDataChars( EMT.MDCHAR[i])
if EMT.MDCHAR[i].Y1 then EMT.CHY_ON = true end
if EMT.MDCHAR[i].V1 then EMT.V1POS = EMT.MDCHAR[i].V1 end
if EMT.MDCHAR[i].V2 then EMT.V2POS = EMT.MDCHAR[i].V2 end
end
if #EMT.MDCHAR > 0 then
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
@@ -584,8 +586,8 @@ function OnPathStart()
if EMT.TOOL == EMT.PREVTOOL and not EMT.ZMAX then
EMT.L2pp = EMT.L2op
EMT.L3pp = EMT.L3op
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R1pp = EMT.R1p or EMT.R1pp
EMT.R2pp = EMT.R2p or EMT.R2pp
else
EMT.L2pp = nil
EMT.L3pp = nil
@@ -626,6 +628,9 @@ function OnPathStartAux()
local Cmd = EgtSplitString( EMT.AUX)
if Cmd[1] == '4' then
EMT.TO_ZMAX = true
if Cmd[2] == '1' then
EMT.ROLL_IN = true
end
end
end
@@ -765,7 +770,15 @@ function OnRapid()
EmitMoveDataHead( 1, { B=0, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, S=Speed})
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
-- evita collisione con carro X
if EMT.R2 > 91 or EMT.R2 < -91 then
local dBref = EgtClamp( EMT.R2, -91, 91)
EmitMoveDataHead( 1, { Z=EMT.L3, B=dBref, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
else
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
end
-- caso standard
else
-- se bisogna scrivere tutti gli assi
@@ -905,6 +918,8 @@ function OnRapid()
local dPosT = EMT.TPOS or EMT.L1op
EmitParkRoller( dPosT, bSplitCut)
end
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- eseguo movimenti
local Speed = EMT.S
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
@@ -912,10 +927,6 @@ function OnRapid()
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- se gruppo lama dedicato, senza cambio utensile
elseif EgtGetHeadId( 'H38') then
local B3Home = EgtGetAxisHomePos( 'B3')
@@ -933,16 +944,14 @@ function OnRapid()
end
-- muovo in posizione finale
EmitMoveDataHead( 3, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- errore, testa non gestita
else
EmtSetLastError( 1212, "HEAD not managed")
end
EmitMoveStartHead( 3)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- errore, testa non gestita
end
-- dati aggancio a trave
local BhData = { T=EMT.L1, SetHead=0}
@@ -996,17 +1005,18 @@ function OnRapid()
else
--MyOutput( string.format( 'V1Pos=%.3f V2Pos=%.3f', EMT.V1POS, EMT.V2POS))
if not EMT.RELOAD and not EMT.ZMAX and #EMT.AUXCMD > 0 and EMT.TO_ZMAX then
local bGotoHome = EMT.HEAD == 'H38' and EMT.ROLL_IN
-- caso speciale in cui bisogna solo cambiare presa aggregato lama sotto
if EMT.R3_CHANGED then
-- EmitZmax è fatta per essere chiamata con utensile attuale. In questo caso l'attuale è già quello con nuova rotazione
-- Allora salvo l'attuale e imposto il vecchio solo momentanemente, per poi ripristinarlo
local sBckTcPos = EMT.TCPOS
EMT.TCPOS = EMT.PREVTCPOSREAL_H2
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
EmitZmax( false, false, PrevR1, PrevR2, false, bGotoHome, true)
EMT.TCPOS = sBckTcPos
EMT.R3_CHANGED = nil
else
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
EmitZmax( false, false, PrevR1, PrevR2, false, bGotoHome, true)
end
EMT.ZMAX = true
EMT.TO_ZMAX = nil
@@ -1082,7 +1092,15 @@ function OnRapid()
EmitMoveDataHead( 1, { Z=MyMaxZ1, B=0, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, S=Speed})
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
-- evita collisione con carro X
if EMT.R2 > 91 or EMT.R2 < -91 then
local dBref = EgtClamp( EMT.R2, -91, 91)
EmitMoveDataHead( 1, { Z=EMT.L3, B=dBref, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
else
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
end
-- caso standard
else
-- se ero in posizione speciale, prima ruoto poi scendo
@@ -1236,6 +1254,8 @@ function OnRapid()
EmitMoveWaitHead( 2)
-- altrimenti testa 3
else
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- selezione testa (posso muovere X solo a Zmax)
local MyMaxZ3 = EgtGetAxisMax( 'Z3')
local dSafeZ3 = EgtGetAxisHomePos( 'Z3')
@@ -1282,8 +1302,6 @@ function OnRapid()
end
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
end
@@ -1390,6 +1408,7 @@ function OnRapid()
MyOutput( 'M98')
MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true))
MyOutput( 'G24' .. EMT.IPLGLSTR)
EMT.PLANEACTIVE = true
-- forzo successiva emissione assi rotanti
EMT.R1p = nil
EMT.R2p = nil
@@ -1428,7 +1447,7 @@ function OnRapid()
local nNextTopHSet = GetNextTopHSet( EMT.MCHID)
-- ricavo prossimo utensile
local sNextTool = GetNextTool( EMT.MCHID)
local bTopGoHome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) or ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
local bTopGoHome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) or EMT.HEAD == 'H38' or ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome, false)
-- aggiorno quota finale trave dopo Zmax
EMT.L1o = EMT.TPOS
@@ -1471,6 +1490,7 @@ function OnLinear()
MyOutput( 'M98')
MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true))
MyOutput( 'G24' .. EMT.IPLGLSTR)
EMT.PLANEACTIVE = true
-- emissione movimento
EMT.R1p = nil
EMT.R2p = nil
@@ -1561,6 +1581,7 @@ function OnArc()
MyOutput( 'M98')
MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true))
MyOutput( 'G24' .. EMT.IPLGLSTR)
EMT.PLANEACTIVE = true
-- emissione movimento
EMT.R1p = nil
EMT.R2p = nil
@@ -1623,24 +1644,6 @@ function OnArc()
EmtUpdatePrev()
end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = EMT.MINACC -- [ms] ~600
local MaxTempoAcc = EMT.MAXACC -- [ms] ~6000
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = EgtClamp( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito), MinTempoAcc, MaxTempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return TempoAcc, MinTempoAcc, RidFeed
end
---------------------------------------------------------------------
function CalcForzaPinze( dH, dS, dL, dT)
local MassaRef = 1500 -- [Kg]
@@ -2323,7 +2326,7 @@ function AdjustTcPos( bLen3, sTcPos, dAxR3)
end
end
if sPos == '111' then
if not dAxR3 then dAxR3 = EMT.R3 end
if not dAxR3 then dAxR3 = EMT.R3 or 0 end
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
@@ -2340,7 +2343,7 @@ function AdjustTcPos( bLen3, sTcPos, dAxR3)
end
end
if sPos == '121' then
if not dAxR3 then dAxR3 = EMT.R3 end
if not dAxR3 then dAxR3 = EMT.R3 or 0 end
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
@@ -2574,9 +2577,9 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome, bUsePrev
local dPosT = EgtIf( bEnd, EMT.L1o, EMT.TPOS or EMT.L1op)
EmitParkRoller( dPosT, bSplitCut)
end
-- se non sono esattamente in home, devo ruotare in zona sicura
-- se non sono esattamente in home, ruoto dove sono
if abs( dHomeC3 - PrevR1) > 1 or abs( dHomeB3 - PrevR2) > 1 then
EmitMoveDataHead( 3, { X=-SafeX3RotAxis, Fmt=1})
--EmitMoveDataHead( 3, { X=-SafeX3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { B=dHomeB3, C=dHomeC3, Fmt=1})
end
@@ -2622,15 +2625,19 @@ end
---------------------------------------------------------------------
function EmitResetMachining()
MyOutput( 'G27')
if EMT.PREFALLCUT then
MyOutput( 'M29')
EMT.PREFALLCUT = nil
if EMT.PLANEACTIVE then
MyOutput( 'G27')
if EMT.PREFALLCUT then
MyOutput( 'M29')
EMT.PREFALLCUT = nil
end
local sP12 = ''
if EMT.TOOL ~= GetNextTool( EMT.MCHID) then sP12 = EgtIf( EMT.HEAD ~= 'H21', ' P1=0'..EgtIf( EMT.DOU_TYPE, ' P2=0', ''), ' P2=0') end
local sP4 = EgtIf( EMT.MCHUSERNOTES:find( 'Split', 1, true), ' P4=1', '')
MyOutput( 'M99'..sP12..sP4)
-- piano non più attivo
EMT.PLANEACTIVE = false
end
local sP12 = ''
if EMT.TOOL ~= GetNextTool( EMT.MCHID) then sP12 = EgtIf( EMT.HEAD ~= 'H21', ' P1=0'..EgtIf( EMT.DOU_TYPE, ' P2=0', ''), ' P2=0') end
local sP4 = EgtIf( EMT.MCHUSERNOTES:find( 'Split', 1, true), ' P4=1', '')
MyOutput( 'M99'..sP12..sP4)
end
---------------------------------------------------------------------
+278 -24
View File
@@ -79,6 +79,14 @@ function OnSimulStart()
for j = 1, #( vTools or {}) do
if vTools[j] ~= '' then
EgtLoadTool( vTcPos[i], j, vTools[j])
-- Aggiunto controllo lunghezza lama minima * 0.9 per ricavare la tolleranza del VMILL
if EgtTdbSetCurrTool(vTools[j]) then -- set utensile corrente
if EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_STD or EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_FLAT then -- controllo tipo utensile sega
local dCurrSawLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) * 0.9
-- se non definito o minore del valore precedente aggiorna la tolleranza
EMT.VMILLTOL = EgtIf( not EMT.VMILLTOL or dCurrSawLen < EMT.VMILLTOL, dCurrSawLen, EMT.VMILLTOL)
end
end
end
end
ShowToolInTcPos( vTcPos[i], true)
@@ -163,6 +171,29 @@ function OnSimulStart()
end
-- Preparo lista collisioni vuota
EMT.COLLIDE = {}
-- si crea gruppo temporaneo appoggio controllo clamping
CLAMP_CHECK_GROUP = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'CLAMP_CHECK')
CLAMP_CHECK_INTERS = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'CLAMP_INTERS')
if CLAMP_CHECK_GROUP then
EgtEmptyGroup( CLAMP_CHECK_GROUP)
else
local frClampCheckGroup = Frame3d( ORIG(), GDB_FR.FRONT)
CLAMP_CHECK_GROUP = EgtGroup( GDB_ID.ROOT, frClampCheckGroup)
EgtSetName( CLAMP_CHECK_GROUP, 'CLAMP_CHECK')
EgtSetLevel( CLAMP_CHECK_GROUP, GDB_LV.TEMP)
EgtSetStatus( CLAMP_CHECK_GROUP, GDB_ST.OFF)
end
if CLAMP_CHECK_INTERS then
EgtEmptyGroup( CLAMP_CHECK_INTERS)
else
CLAMP_CHECK_INTERS = EgtGroup( GDB_ID.ROOT)
EgtSetName( CLAMP_CHECK_INTERS, 'CLAMP_INTERS')
EgtSetLevel( CLAMP_CHECK_INTERS, GDB_LV.TEMP)
EgtSetStatus( CLAMP_CHECK_INTERS, GDB_ST.OFF)
end
end
---------------------------------------------------------------------
@@ -226,7 +257,7 @@ function OnSimulDispositionStart()
-- determino la risoluzione dello Zmap
local dTol = 4.71
if EmtGetVMillStep then
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71)
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol)
else
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
if dArea < 0.075e6 then
@@ -243,6 +274,7 @@ function OnSimulDispositionStart()
dTol = 3.77
end
end
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
-- creo lo Zmap
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
if VMillId then
@@ -646,7 +678,7 @@ function OnSimulToolDeselect( dPrevA)
-- se passo da testa 1 a 3 scarico aggregato
if nNextSetHead == 3 then
-- deposito utensile prelevato da posizioni speciali
if EMT.TCPOS == 'T101' or EMT.TCPOS == 'T111' or EMT.TCPOS == 'T121' then
if EMT.PREVTCPOS_H1 == 'T101' or EMT.PREVTCPOS_H1 == 'T111' or EMT.PREVTCPOS_H1 == 'T121' then
-- visualizzo utensile su TcPos
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
-- nascondo l'utensile sulla testa
@@ -1036,7 +1068,15 @@ function OnSimulMoveStart()
SimulMoveAxes( 'Z1', MyMaxZ1, MCH_SIM_STEP.RAPID, 'B1', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
-- evita collisione con carro X
if EMT.R2 > 91 or EMT.R2 < -91 then
local dBref = EgtClamp( EMT.R2, -91, 91)
SimulMoveAxes( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID, 'B1', dBref, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
end
-- caso standard
else
-- se bisogna scrivere tutti gli assi
@@ -1197,6 +1237,12 @@ function OnSimulMoveStart()
EMT.A6n = 'Z2'
local Z2 = -Head2Z + MillOffs + Mill2Offs + EMT.L3
EMT.A6 = EgtClamp( Z2, MinZ2, MaxZ2)
-- dato che la testa 2 è slave, bisogna controllare eventuale extra-corsa da post
if not( EMT.MOVE == 0 and EMT.FLAG == 2) and Z2 > MaxZ2 then
local sErr = EMT.MCHNAME..' ==> Out of Stroke: Z2 : '.. EgtNumToString( dZ2-MaxZ2, 2)
EmtSetLastError( 1220, sErr, true)
EgtOutBox( sErr, 'ERROR')
end
EMT.A6m = EgtIf( ( EMT.MOVE == 2 or EMT.MOVE == 3), 'Z1', nil)
EMT.A7n = 'C2'
EMT.A7 = EMT.R1
@@ -1227,6 +1273,12 @@ function OnSimulMoveStart()
EMT.DOU_DRILL_END = EMT.L3p - EMT.L3
Z2 = Z2 - 2 * EMT.DOU_DRILL_END
end
-- dato che la testa 2 è slave, bisogna controllare eventuale extra-corsa da post
if not( EMT.MOVE == 0 and EMT.FLAG == 2) and Z2 < MinZ2 then
local sErr = EMT.MCHNAME..' ==> Out of Stroke: Z2 : '.. EgtNumToString( MinZ2-Z2, 2)
EmtSetLastError( 1220, sErr, true)
EgtOutBox( sErr, 'ERROR')
end
EMT.A6 = EgtClamp( Z2, MinZ2, MaxZ2)
EMT.A6m = nil
EMT.A7n = 'C2'
@@ -1338,7 +1390,7 @@ function OnSimulMoveEnd()
-- ricavo prossimo utensile
local sNextTool = GetNextTool( EMT.MCHID)
-- vado in home se è ultimo movimento ed è ultima lavorazione
local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) or EMT.HEAD == 'H38' or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
-- eseguo
ExecMoveZmax( EMT.MCHSPLIT, bToXhome)
EMT.TO_ZMAX = nil
@@ -1656,9 +1708,9 @@ function ExecMoveZmax( bMchSplit, bGoToHome)
SimulMoveAxes( 'B3', ParkB3, MCH_SIM_STEP.COLLROT)
elseif EgtGetHeadId( 'H38') then
local MyMaxZ3 = EgtGetAxisMax( 'Z3')
-- se non sono esattamente in home, devo ruotare in zona sicura
-- se non sono esattamente in home, ruoto dove sono
if abs( HomeC - CurrC) > 1 or abs( HomeB - CurrB) > 1 then
SimulMoveAxis( 'X3', SafeX3RotAxis, MCH_SIM_STEP.RAPID)
-- SimulMoveAxis( 'X3', SafeX3RotAxis, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'Z3', SafeZ3RotAxis, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'C3', HomeC, MCH_SIM_STEP.COLLROT, 'B3', HomeB, MCH_SIM_STEP.COLLROT)
end
@@ -1725,16 +1777,163 @@ function ExecUnloading()
end
end
---------------------------------------------------------------------
function CheckClamping( sClampName)
nIndexClamp = EgtGetAxisId( sClampName)
local idClampPath = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nIndexClamp, 'CLAMP_CHECK') or GDB_ID.NULL)
local b3ClampingArea = EgtGetBBoxGlob( idClampPath or GDB_ID.NULL, GDB_BB.STANDARD)
-- se non trovo percorso area di clamping, esco subito
if not idClampPath or not EMT.VMILL or not ClampingCoeffMin then
return
end
local function GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
local idCurveList = {}
local vtIntersPlane
-- piano di interpolazione
if sIntersPlane == 'X' then
vtIntersPlane = X_AX()
elseif sIntersPlane == 'Y' then
vtIntersPlane = Y_AX()
elseif sIntersPlane == 'Z' then
vtIntersPlane = Z_AX()
end
for i = 1, #EMT.VMILL do
local b3VMill = EgtGetBBoxGlob( EMT.VMILL[i], GDB_BB.EXACT)
local ptPosIntersPlane
if sPosIntersPlane == 'MIN' then
ptPosIntersPlane = b3VMill:getMin() + dDepth * vtIntersPlane
elseif sPosIntersPlane == 'MAX' then
ptPosIntersPlane = b3VMill:getMax() - dDepth * vtIntersPlane
end
local idLoop, nLoopCnt = EgtPlaneVolZmapInters( ptPosIntersPlane, vtIntersPlane, EMT.VMILL[i], CLAMP_CHECK_INTERS, GDB_RT.GLOB)
-- se c'è almeno una curva
if idLoop then
for j = 1, nLoopCnt do
local idLoopTemp = idLoop + j - 1
table.insert( idCurveList, idLoopTemp)
end
end
end
return idCurveList
end
local function CalculateIntersectionArea( sPosIntersPlane, sIntersPlane, dDepth)
-- test piano frontale
local idCurveList = GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
-- si copia curva intersezione e curva pinza in gruppo di confronto
local idFlatSurf, nFlatSurfCnt = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, idCurveList)
local idClampSurf = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, idClampPath)
if idFlatSurf then
local dTotalArea = 0
local dTotalXLenght = 0
for k = 1, nFlatSurfCnt do
local idTempSurf = idFlatSurf + k - 1
EgtSurfFrIntersect( idTempSurf, idClampSurf)
if idTempSurf then
dTotalArea = dTotalArea + ceil( EgtSurfArea( idTempSurf) or 0)
local b3BoxIntersectionBox = EgtGetBBoxGlob( idTempSurf, GDB_BB.STANDARD)
if b3BoxIntersectionBox then
dTotalXLenght = dTotalXLenght + ceil( b3BoxIntersectionBox:getDimX()) -- somma lunghezze (x) delle aree pinzate
end
end
end
return dTotalArea, dTotalXLenght
end
return 0
end
-- minima area considerata per un corretto pinzaggio
DistZClampToTable = DistZClampToTable or 0
local MinJoin = BD.GetMinJoin( EMT.HB, EMT.SB, EgtIf( EMT.SPLIT, EMT.LT, EMT.LB))
local MinZClamping = min( b3ClampingArea:getDimZ() + DistZClampToTable, EMT.SB) - DistZClampToTable
-- si moltiplica per un coefficiente minimo sotto al quale si da l'errore di pinzaggio
ClampingCoeffMin = EgtClamp( ClampingCoeffMin, 0.01, 1)
local dMinClampingAreaWarn = ( MinJoin * MinZClamping) * ClampingCoeffMin
local dMinClampingAreaErr = ( MinJoin * MinZClamping) * ( ClampingCoeffMin / 3)
local bError = true
local sWrn, sErr
local bWriteWarnMessage = false
local bWriteErrMessage = false
-- controllo faccia frontale
local dArea, dXClampedLenght = CalculateIntersectionArea( 'MIN', 'Y', 3)
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
if dArea and dArea < dMinClampingAreaErr then
-- solo se pinza almeno 1cm2, e la somma della lunghezza pinzata è maggiore della lunghezza minima pinzabile da Warning e non errore
if dXClampedLenght >= MinJoin * ClampingCoeffMin and dArea > 1000 then
bError = false
end
-- pinzaggio non fattibile, errore
if bError then
sErr = 'ERROR CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteErrMessage = true
end
end
-- WARNING: pinza meno del minimo richiesto
if dArea and dArea < dMinClampingAreaWarn and not bWriteErrMessage then
sWrn = 'WARNING CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteWarnMessage = true
end
EgtEmptyGroup( CLAMP_CHECK_GROUP)
EgtEmptyGroup( CLAMP_CHECK_INTERS)
-- controllo altro lato solo se non sono già in errore
if not bWriteErrMessage then
-- controllo faccia posteriore
dArea = CalculateIntersectionArea( 'MAX', 'Y', 3)
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
if dArea and dArea < dMinClampingAreaErr then
-- solo se pinza almeno 1cm2, e la somma della lunghezza pinzata è maggiore della lunghezza minima pinzabile da Warning e non errore
if dXClampedLenght >= MinJoin * ClampingCoeffMin and dArea > 1000 then
bError = false
end
-- pinzaggio non fattibile, errore
if bError then
sErr = 'ERROR CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteErrMessage = true
end
end
-- WARNING: pinza meno del minimo richiesto
if dArea and dArea < dMinClampingAreaWarn and not bWriteWarnMessage and not bWriteErrMessage then
sWrn = 'WARNING CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteWarnMessage = true
end
EgtEmptyGroup( CLAMP_CHECK_GROUP)
EgtEmptyGroup( CLAMP_CHECK_INTERS)
end
if bWriteErrMessage then
EmtSetLastError( 1213, sErr, EgtGetEnableUI())
EgtOutBox( sErr, 'CLAMPING', 'ERROR', 'OK')
EmtSetSimulPause()
elseif bWriteWarnMessage then
EgtOutLog( sWrn)
EgtOutBox( sWrn, 'CLAMPING', 'WARNING', 'OK')
EmtSetSimulPause()
end
end
---------------------------------------------------------------------
function ExecMovePY1( bClose)
SimulMoveAxes( 'PY1', EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
SetPY1Light( bClose)
if bClose then
CheckClamping( 'PY1')
end
end
---------------------------------------------------------------------
function ExecMovePY2( bClose)
SimulMoveAxes( 'PY2', EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
SetPY2Light( bClose)
if bClose then
CheckClamping( 'PY2')
end
end
---------------------------------------------------------------------
@@ -2170,22 +2369,26 @@ end
---------------------------------------------------------------------
-- *** ESTIMATION T&L ***
---------------------------------------------------------------------
local RAPID_X_FEED = 70000 -- mm/min
local RAPID_Y_FEED = 100000 -- mm/min
local RAPID_Z_FEED = 32000 -- 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 = 70000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Y_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Z_FEED = 32000 / 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()
EMT.INCHES = not EgtUiUnitsAreMM() -- unità di misura mm/inches
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 116000, 20000, 130000) -- feed massima pinze
EMT.MAXACC = MaxAcc or 6000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
EMT.MINACC = MinAcc or 600 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
end
---------------------------------------------------------------------
@@ -2271,6 +2474,15 @@ function OnEstimDispositionEnd()
EMT.OPEISDISP = false
end
---------------------------------------------------------------------
function OnEstimRawMoveData()
-- se start del pezzo
if IsStartOrRestPhase( EMT.PHASE) then
EMT.SPLIT = false
end
OnRawMoveData()
end
---------------------------------------------------------------------
function OnEstimToolSelect()
-- reset indice utensile in tabella lunghezze
@@ -2327,6 +2539,12 @@ function OnEstimMachiningEnd()
EMT.TLE_NAME = nil
EMT.TLE_TIME = nil
end
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
EMT.MCHSPLIT = ( EMT.MCHUSERNOTES:find( 'Split;', 1, true) ~= nil)
if EMT.MCHSPLIT then
EMT.SPLIT = true
end
end
---------------------------------------------------------------------
@@ -2452,17 +2670,20 @@ function OnEstimRapid()
EMT.MCHEXTLEN = EMT.MCHEXTLEN + dLen
-- calcolo tempo
local dTime = RAPID_MIN_T
local dT1 = abs( dL1) / RAPID_X_FEED * 60
local dT1 = CalcMoveTime( abs( dL1), RAPID_X_FEED, EMT.SPLIT)
if dT1 > dTime then dTime = dT1 end
local dT2 = abs( dL2) / RAPID_Y_FEED * 60
local dT2 = CalcMoveTime( abs( dL2), EMT.FMAXPINZE, EMT.SPLIT)
if dT2 > dTime then dTime = dT2 end
local dT3 = abs( dL3) / RAPID_Z_FEED * 60
local dT3 = CalcMoveTime( abs( dL3), RAPID_Z_FEED, EMT.SPLIT)
if dT3 > dTime then dTime = dT3 end
local dT4 = abs( dR1) / RAPID_C_FEED * 60
if dT4 > dTime then dTime = dT4 end
local dT5 = abs( dR2) / RAPID_B_FEED * 60
if dT5 > dTime then dTime = dT5 end
EMT.MCHEXTTIME = EMT.MCHEXTTIME + dTime
EgtOutLog( string.format( ' G0 Len=%.0f Rot=%.0f° Time=%.2f', dLen, abs( dR1) + abs( dR2), dTime), 5)
-- aggiorno valori come precedenti
EmtUpdatePrev()
@@ -2478,7 +2699,7 @@ function OnEstimLinear()
local dLen = sqrt( dL1 * dL1 + dL2 * dL2 + dL3 * dL3)
EMT.MCHCUTLEN = EMT.MCHCUTLEN + dLen
-- calcolo tempo
local dTime = dLen / EMT.F * 60
local dTime = CalcMoveTime( dLen, EMT.F, EMT.SPLIT)
EMT.MCHCUTTIME = EMT.MCHCUTTIME + dTime
EgtOutLog( string.format( ' G1 Len=%.0f Time=%.2f', dLen, dTime), 5)
-- aggiorno valori come precedenti
@@ -2733,9 +2954,9 @@ end
---------------------------------------------------------------------
function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1) % 180.0 > 1))
elseif sHead == 'H21' or sHead == 'H22' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1) % 180.0 > 1))
elseif sHead == 'H38' then
return ( abs( dAng1 - dAng1p) > 1 or abs( dAng2 - dAng2p) > 1)
end
@@ -2752,5 +2973,38 @@ function GetCmdAxMove( Cmd, sAx)
end
end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = EMT.MINACC -- [ms] ~600
local MaxTempoAcc = EMT.MAXACC -- [ms] ~6000
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = EgtClamp( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito), MinTempoAcc, MaxTempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return TempoAcc, MinTempoAcc, RidFeed
end
---------------------------------------------------------------------
function CalcMoveTime( dPathLen, dFeed, bIsSplitted)
local dTime
local dFeedInSec = dFeed / 60
local dTempoAcc, _, _ = CalcDinamicaPinze( EMT.HB, EMT.SB, EgtIf( bIsSplitted, EMT.LT, EMT.LB))
dTempoAcc = dTempoAcc / 1000
-- se si raggiunge la velocità massima
if dPathLen >= dFeedInSec * dTempoAcc then
dTime = dTempoAcc * 2 + ( ( dPathLen - dFeedInSec * dTempoAcc) / dFeedInSec)
else
dTime = 2 * sqrt( (dPathLen * dTempoAcc) / dFeedInSec)
end
return dTime
end
---------------------------------------------------------------------
-- *** END GENERAL ***
+62 -3
View File
@@ -7,6 +7,65 @@ EgtEnableDebug( false)
-- Carico libreria
local BD = require( 'BeamData')
---------------------------------------------------------------------
-- *** Generic Machinings ***
---------------------------------------------------------------------
require( 'EmtGenMachining')
---------------------------------------------------------------------
-- *** Special GetPrevMachiningOffset ***
---------------------------------------------------------------------
-----------------------------------------------------------------------------------------
function OnSpecialGetPrevMachiningOffset()
-- Aggiorno posizione della testa della trave a seguito di movimenti delle pinze non previsti tra le fasi
local function TPosUpdate()
local nClId = EgtGetFirstNameInGroup( EMC.CURRMCHID, 'CL') -- recupero Id del gruppo CL della lavorazione corrente
local nPathId = EgtGetFirstInGroup( nClId or GDB_ID.NULL) -- Id del primo gruppo nella lavorazione (P1)
if not nPathId then
EMC.ERR = 12
EMC.MSG = ' Error : CL group path not found'
return
end
local dAuxMoveCount = EgtGetInfo( nPathId, 'AS#', 'd') or 0 -- numero di movimenti ausiliari
local dTRepos = nil
-- controlla ogni gruppo di movimenti ausiliari
for i = 1, dAuxMoveCount do
local aAuxMove = EgtGetInfo( nPathId, 'AS' .. tostring( i), 'vs') or {} -- array contenete i parametri di ogni gruppo
-- controlla solo i movimenti della testa trave e salva l'ultimo
if aAuxMove[1] == '2' or aAuxMove[1] == '3' then
for j = 2, #aAuxMove do
if aAuxMove[j] == 'T' then
dTRepos = aAuxMove[j+1]
break
end
end
end
end
return dTRepos
end
-- default
EMC.ERR = 0
EMC.PREVOFFSX = 0
-- se c'è cambio di fase tra le lavorazioni (quindi la precedente è l'ultima della sua fase e la corrente la prima)
if EMC.PREVPHASE ~= EMC.CURRPHASE then
-- se la fase corrente è di inizio lavorazione di nuova trave
if IsStartOrRestPhase( EMC.CURRPHASE) then
-- recupero la posizione finale della lavorazione precedente
local vPrevAx = EmtGetFinalAxesPos( EMC.PREVMCHID)
-- ricava se e quanto la trave viene spostata tra le due fasi dai movimenti ausiliari e corregge l'offset di fine fase
local dNewTPos = TPosUpdate()
-- se ci sono dei movimenti della testa trave tra le due fasi ricava il delta tra la vecchia e la nuova posizione
if dNewTPos then
EMC.PREVOFFSX = dNewTPos - vPrevAx[1]
-- oppure la X (L1) di questa corrisponde alla posizione iniziale della nuova trave, se ne deduce l'offset
else
EMC.PREVOFFSX = ParkV1 - vPrevAx[1]
end
end
end
end
---------------------------------------------------------------------
-- *** Special Z moves ***
---------------------------------------------------------------------
@@ -88,7 +147,7 @@ function OnSpecialGetMaxZ()
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
else
local vMZ = {{ Tz=0.85, Ez=400}, { Tz=0.7, Ez=300}, { Tz=0.5, Ez=195}, { Tz=0.15, Ez=70}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
local vMZ = {{ Tz=0.85, Ez=400}, { Tz=0.7, Ez=300}, { Tz=0.5, Ez=195}, { Tz=0.15, Ez=60}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H16' then
@@ -108,7 +167,7 @@ function OnSpecialGetMaxZ()
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
else
local vMZ = {{ Tz=0.85, Ez=400}, { Tz=0.7, Ez=300}, { Tz=0.5, Ez=195}, { Tz=0.15, Ez=70}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
local vMZ = {{ Tz=0.85, Ez=400}, { Tz=0.7, Ez=300}, { Tz=0.5, Ez=195}, { Tz=0.15, Ez=60}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H21' then
@@ -1109,7 +1168,7 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF + EMC.LT)
end
end
+14 -7
View File
@@ -5,10 +5,10 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.7g2'
PP_NVER = '2.7.7.2'
PP_VER = '2.7l2'
PP_NVER = '2.7.12.2'
MIN_MACH_VER = '2.7d2'
MACH_NAME = string.match( EgtGetCurrMachineDir(), "[^\\]+$") -- si ricava il nome della macchina dal direttorio
MACH_NAME = EgtGetCurrMachineName()
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
@@ -161,7 +161,7 @@ DeltaTabY = 2065.5
DeltaTabZ = -1491.0 + MillOffs -- per TPA : -1228.0 + MillOffs -- per NUM : -1058.0
DeltaRulliTraveZ = -1266
DimTabY = 1600
DimTabX = 30000
DimTabX = 34000
Delta2TabY = -2907.4
Delta2TabZ = 693.0 - Mill2Offs -- per TPA : 543.0 - Mill2Offs -- per NUM : 373.0
Delta3TabY = 2065.5
@@ -174,7 +174,6 @@ Head2Y = DeltaTabY - Delta2TabY
Head2Z = DeltaTabZ - Delta2TabZ
DefTcPos1 = 'T1'
DefTcPos2 = 'T220'
CoeffVM = 0.5
MinForzaPinze = 400 -- [Kgf]
MaxForzaPinze = 1000 -- [Kgf]
Tc2Active = true
@@ -188,6 +187,10 @@ EmitAccClamps = true
WriteAllCoordsOnFirstM101 = true
ForceToCloseRollersGate = false
Motors23KW = true
EstimationRapidMultiplier = 1
DistZClampToTable = 5 -- distanza tra la tavola e il punto più basso della morsa
ClampingCoeffMin = nil
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1500MAXrl-3T.data"
@@ -286,9 +289,11 @@ if EgtExistsFile( sDataBeam) then
if Machine.Offsets.MAXFEEDPINZE then MaxFeedPinze = Machine.Offsets.MAXFEEDPINZE end
if Machine.Offsets.MAXACC then MaxAcc = Machine.Offsets.MAXACC end
if Machine.Offsets.MINACC then MinAcc = Machine.Offsets.MINACC end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.MOTORS23KW then Motors23KW = Machine.Offsets.MOTORS23KW == 1 end
if Machine.Offsets.COEFF_CLAMP_CHECK then ClampingCoeffMin = Machine.Offsets.COEFF_CLAMP_CHECK end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
@@ -674,7 +679,7 @@ local PY1Id = EmtAxis {
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PY1_AXIS/GEO',
Aux = 'PY1_AXIS/SOLID'}
Aux = {'PY1_AXIS/SOLID', 'PY1_AXIS/CLAMP_CHECK'}}
local Y2Id = EmtAxis {
Name = 'Y2',
Parent = 'Base',
@@ -694,7 +699,7 @@ local PY2Id = EmtAxis {
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PY2_AXIS/GEO',
Aux = 'PY2_AXIS/SOLID'}
Aux = {'PY2_AXIS/SOLID', 'PY2_AXIS/CLAMP_CHECK'}}
-- Rulli
local V1Id = EmtAxis {
Name = 'V1',
@@ -1103,8 +1108,10 @@ local vtMove = Vector3d( 0, ( DeltaTabY - 2065.5), ( DeltaTabZ + 1321.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'..sGeomConvoyer), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY1Id, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY2Id, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( V1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( V1Id, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PV1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
Binary file not shown.
Binary file not shown.
+39
View File
@@ -1,5 +1,44 @@
==== Common_PF1250 Update Log ====
Versione 2.7l1 (18/12/2025)
- (SIM-GEN) Aggiunto controllo post movimenti ausiliari dell' EMC.PREVOFFSX nella funzione OnSpecialGetPrevMachiningOffset() come su ONE-PF. Ticket#2727
- (SIM-GEN) Cambiato delta di correzione Z per lama con inclinazione >= 81° da 70 a 60 mm. Risoluzione Ticket#2210
- (SIM-GEN) Divisione movimento B in approccio se > 90°.
Versione 2.7k5 (26/11/2025)
- (SIM) Migliorata funzione CheckClamping, ora il controllo di warning si basa sulla somma delle lunghezze delle aree pinzate
Versione 2.7k4 (25/11/2025)
- (SIM) Migliorata funzione CheckClamping, ora la sezione rientra di 3 mm
Versione 2.7k3 (21/11/2025)
- (SIM-GEN) Corretto problema riposizionamento carrelli. Ticket#2704
- (SIM) Aggiornata risoluzione VMillTol in funzione dello spessore lama
Versione 2.7k2 (19/11/2025)
- (SIM-GEN) Con testa H38 si va in home quando testa viene comandata a Zmassima. Ticket#2703_b
Versione 2.7k1 (19/11/2025)
- (GEN) Preselzione testa 1 spostata prima della selezione testa 3. Ticket#2513
- (SIM-GEN) Corretto calcolo per decidere se serve aprire i rulli
- (SIM) Aggiunto controllo Extra-Corsa testa 2 in caso di lavorazione in doppio. Ticket#2201
- (SIM) Prima versione controllo pinzaggio su VMILL. Per attivarlo serve modifica della macchina a MLDE e NGE.
- (GEN) Simulazione non allineata a generazione. Se testa H38 e si chiudono i rulli, si deve andare in home. Ticket#2703
Versione 2.7i1 (08/09/2025)
- (GEN) Se fase start o restart, si aggiorna la posizione in X dell'asse per calcolare il link corretto. Serve CAM5 2.7h1 (facoltativo)
- (EST) La stima tempi considera ora le accelerazoni degli assi
- (SIM) Corretto controllo ultimo utensile utilizzato su testa 1, prima si controllava il precedente, ma poteva essere la testa 2
- (SIM-GEN) Se testa 3 deve salire a ZMAX, sale alla X dove si trova e non torna in home
Versione 2.7h2 (21/08/2025)
- (GEN) Se la testa rimane bassa, corretto caso di reset del piano generico a fine lavorazione
- (GEN) Corretto movimento in Z massima dopo scarico pezzo
Versione 2.7h1 (20/08/2025)
- (GEN) Per posizione T111 e T121, se non è presente asse rotante per presa aggregato (es. se si mette una fresa normale) viene settato a zero.
- (MLDE-SIM) Aggiunta variabile FACOLTATIVA 'EstimationRapidMultiplier' in mlde per regolare il tempo stimato di rapido su macchine vecchie. Se non presente default 1.
Versione 2.7g1 (01/07/2025)
- (GEN) Lettura parametri accelerazioni da TS3. Ticket#2052
- (SIM-GEN) Aggiunta gestione massima lunghezza scarico
+2 -2
View File
@@ -3,8 +3,8 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '2.7g1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
VERSION = '2.7l1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.7k1' -- versione minima kernel
}
return InfoCommon_STD_PP