Compare commits

...

35 Commits

Author SHA1 Message Date
andrea.villa 09aacf8327 - Prima versione funzionante gestione motosega da sotto diretta verso l'alto
- Aggiunto solido collisione a NGE
2025-08-29 15:58:05 +02:00
andrea.villa 9c7e546e47 Merge branch 'develop' into ProbingWithTool 2025-08-28 15:26:00 +02:00
andrea.villa 6627aae2de Merge branch 'master' into develop 2025-08-28 15:20:55 +02:00
andrea.villa 1b613a97a4 Allineamento con common ver. 2.7h2 2025-08-28 15:20:17 +02:00
andrea.villa 12e7ee1e0e Allineamento con common ver. 2.7h1 2025-08-20 14:40:41 +02:00
andrea.villa 321a91ae5e Merge remote-tracking branch 'origin/master' into ProbingWithTool 2025-07-23 12:29:53 +02:00
andrea.villa 4cc33e3b95 - Allineamento con common ver. 2.7g4
- Aggiunto parametro MaxBackClamp5
2025-07-23 12:25:52 +02:00
andrea.villa a4b6a9c93f Allineamento con common ver. 2.7g3 2025-07-22 11:22:06 +02:00
andrea.villa dc4bf6f405 Aggiunta nuovo tipo di lavorazione 2025-07-21 09:00:48 +02:00
andrea.villa fbea0da2dd Allineamento con common ver. 2.7g2 2025-07-08 10:39:13 +02:00
andrea.villa 7284b417a9 Allineamento con common ver. 2.7g1 2025-07-01 10:41:34 +02:00
andrea.villa 449f03fb09 - IsToolCompatibleWithProbe spostata in MLDE
- in OnPostApplyMachining si salta risalita se tastatura e utensile già precaricato. NB: serve CAM5 2.7f3
2025-06-30 16:02:09 +02:00
andrea.villa 7c91df35fc - Spostate funzioni da MLPE a MLDE perchè servono anche a MLSE
- In MLSE su lavorazione tastatura, si seleziona utensile di default sul mandrino per calcoli ingombri per paratie
2025-06-27 16:38:57 +02:00
andrea.villa 0d99310258 Cambiati limiti feed massima pinze 2025-06-25 09:58:27 +02:00
andrea.villa 0b49335c8e Corretto calcolo accelerazioni massima/minima 2025-06-25 08:39:01 +02:00
andrea.villa 0d87a703ce Corretto nome file 2025-06-23 17:58:31 +02:00
andrea.villa 475b0a7ebf - Se si mantiene utensile vecchio, allora si ribadiscono i dati vecchi
- Aggiunta lista lavorazioni probing
2025-06-23 15:06:38 +02:00
luca.mazzoleni 28c911ebe1 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-PFrl 2025-06-23 15:03:33 +02:00
luca.mazzoleni a613078e3f update BeamData.GetSetupInfo per nuovo automatismo 2025-06-23 15:03:25 +02:00
andrea.villa c54ddd02e9 Disattivazione tastatura spostata prima della risalita a Z massima 2025-06-20 11:39:26 +02:00
andrea.villa fd9314ea5a Aggiunto aggregato BIG per motosega 2025-06-20 10:27:07 +02:00
andrea.villa d075af1a91 Corretta lettura posizione home testa 1 2025-06-18 18:20:59 +02:00
andrea.villa f229fae4d3 Corretto segni movimento pre e post tastatura 2025-06-18 16:58:20 +02:00
andrea.villa 5219330a4d Cambio versione per rilascio a Essetre 2025-06-18 15:26:14 +02:00
andrea.villa fd85570cfd Corretta disattivazione tastatura 2025-06-18 15:21:59 +02:00
andrea.villa 2adb157b28 - Corretto ingombro lavorazione in caso di tastatura
- Migliorie generazione
2025-06-17 18:20:13 +02:00
andrea.villa 5e6121703c - Se tastatura orizzontale, ci si alza sopra pezzo in sicurezza
- Prima versione scrittura macro tastatura
2025-06-17 12:14:34 +02:00
andrea.villa 5316abecf4 In generazione, si seleziona utensile compatibile per tastatura 2025-06-17 10:34:02 +02:00
andrea.villa f958dc8a0a Simulazione con movimenti corretti. 2025-06-16 10:45:48 +02:00
andrea.villa 4989ae5d99 Prima versione funzionante in simulazione 2025-06-13 16:50:55 +02:00
andrea.villa 9ac0aafea0 Aggiunta lavorazione e primi test 2025-06-11 17:30:59 +02:00
andrea.villa 1c047b1890 Aggiunto testa in TC e varie info 2025-06-11 12:37:59 +02:00
andrea.villa 7eea1439c4 Prima versione gestione Probe con utensile dedicato 2025-06-11 11:00:25 +02:00
andrea.villa 7b35cccaf5 Corretto indice faccia e legato al tipo di macchina, carico desto o sinistro. 2025-06-11 10:02:37 +02:00
andrea.villa da6d0bed2a Movimento tastatura aumentato a 20mm. Poi bisognerà metterlo a configurazione 2025-06-11 09:29:08 +02:00
16 changed files with 821 additions and 309 deletions
+15
View File
@@ -106,6 +106,13 @@ if EgtExistsFile( sData) then
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER
BeamData.LONGCUT_ENDLEN = Machine.Offsets.LONGCUT_ENDLEN or BeamData.LONGCUT_ENDLEN
BeamData.LONGCUT_MAXLEN = Machine.Offsets.LONGCUT_MAXLEN or BeamData.LONGCUT_MAXLEN
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.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
if Machine.Offsets.ROT90 ~= nil then BeamData.ROT90 = ( Machine.Offsets.ROT90 == 1) end
if Machine.Offsets.PRECUT_HEAD_DISABLE then BeamData.PRECUT_HEAD = ( Machine.Offsets.PRECUT_HEAD_DISABLE == 0) end
if Machine.Offsets.PRECUT_TAIL_DISABLE then BeamData.PRECUT_TAIL = ( Machine.Offsets.PRECUT_TAIL_DISABLE == 0) end
end
@@ -235,11 +242,19 @@ local function GetSetupInfo( sHead)
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = false, bBack = true}
SetupInfo.dMinNz = sin( -45)
-- se con aggregato si considera non simmetrico
SetupInfo.bIsCSymmetrical = false
-- riduzione massimo materiale se usato in tagli orizzontali con affondamento verticale
SetupInfo.dMaxMatDecrease = 20
-- lama su testa 5 assi da sopra, davanti
elseif sHead == 'H22' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = true, bBack = false}
SetupInfo.dMinNz = sin( -45)
-- se con aggregato si considera non simmetrico
SetupInfo.bIsCSymmetrical = false
-- riduzione massimo materiale se usato in tagli orizzontali con affondamento verticale
SetupInfo.dMaxMatDecrease = 20
-- motosega 1
elseif sHead == 'H13' or sHead == 'H23' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
+4
View File
@@ -36,6 +36,7 @@
22=Long2CutSide
23=SmallToolContour
24=AntiSplintMillCut
25=Prof_end
[Pocketing]
1=Pocket
@@ -47,3 +48,6 @@
[Sawing]
1=Sawing
[Probing]
1=DTMortise
+11
View File
@@ -0,0 +1,11 @@
-- Probingata.lua by Egaltech s.r.l. 20/06/2025
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local ProbingData = {
{ On = true, Name = 'Probing_H1', Type = 'DTMortise'},
{ On = true, Name = 'Probing_H2', Type = 'DTMortise'}
}
---------------------------------------------------------------------
return ProbingData
+350 -238
View File
@@ -27,7 +27,7 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 102000, 20000, 102000) -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 102000, 20000, 155000) -- feed massima pinze
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
@@ -312,6 +312,8 @@ function OnDispositionEnd()
MyOutputNoNum( '(PART UNLOAD)')
for i = 1, #EMT.MDCHAR do
EmitMoveDataChars( EMT.MDCHAR[i])
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
EmitMoveStartChars( 2)
-- se dopo c'è scarico spezzone devo mettere attesa termine esecuzione
@@ -327,7 +329,8 @@ function OnDispositionEnd()
end
elseif EMT.SPECUNLOADING then
EmtOutput( '(PART SPEC UNLOADING)')
EmitBeamHeadData( { T=EMT.L1, Pz5=2})
local dAbsHeadPos = EMT.L1pp or EMT.L1
EmitBeamHeadData( { T=dAbsHeadPos, Pz5=2})
EMT.SPECUNLOADING = nil
EMT.W2DELTA = nil
-- emissione conclusione pezzo precedente
@@ -412,6 +415,7 @@ function OnToolSelect()
if MCH_TP.DIST then EMT.TDIST = EgtTdbGetCurrToolParam( MCH_TP.DIST) end
if EMT.TDIST and abs( EMT.TDIST) < 0.1 then EMT.TDIST = nil end
EMT.TUSERNOTES = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES)
EMT.ISPROBING = HeadIsProbe( EMT.HEAD)
end
end
@@ -445,14 +449,7 @@ function OnMachiningStart()
local MyParkCSawC2 = GetChainSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkCSawC2)
end
-- gestione eventuale tastatura
local bProbing = EgtGetValInNotes( EMT.MCHUSERNOTES, 'PROBE', 'b') or EgtGetValInNotes( EMT.MCHUSERNOTES, 'START-PROBE', 'b')
if bProbing and Probe then
if VerifyToolProbeCompatibility() then
EMT.PROBE = true
EMT.EXECPROBE = true
end
end
-- gestione eventuale lavorazione in doppio
local nDouType = EgtGetValInNotes( EMT.MCHUSERNOTES, 'DOUBLE', 'i')
if nDouType == 2 or nDouType == 3 then
@@ -617,15 +614,6 @@ function OnMachiningEnd()
EMT.PREVHEAD = EMT.HEAD
EMT.PREVTCPOS = EMT.TCPOS
-- se tastatura attiva, si disabilita la tastatura
if EMT.PROBE then
-- gestione eventuale tastatura
local bStopProbing = EgtGetValInNotes( EMT.MCHUSERNOTES, 'PROBE', 'b') or EgtGetValInNotes( EMT.MCHUSERNOTES, 'END-PROBE', 'b')
if bStopProbing then
EmtOutput( 'G145 Z-10 EF0')
EMT.PROBE = nil
end
end
-- se taglio finale, aggiorno lunghezza barra
if EMT.MCHCUT then
EMT.LB = EMT.LT + ( EMT.X_OFF or 0)
@@ -691,8 +679,8 @@ function OnPathStart()
EMT.L1pp = EMT.L1op
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.L1pp = nil
EMT.L2pp = nil
@@ -829,8 +817,8 @@ function OnRapid()
EMT.IPLGL = false
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
local HomeR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'C1', 'C2'))
local HomeR2 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'B1', 'B2'))
local HomeR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1 or nHSet == 11, 'C1', 'C2'))
local HomeR2 = EgtGetAxisHomePos( EgtIf( nHSet == 1 or nHSet == 11, 'B1', 'B2'))
local PrevR1 = EMT.R1p or EMT.R1pp or HomeR1
local PrevR2 = EMT.R2p or EMT.R2pp or HomeR2
EmtResetPrev()
@@ -840,6 +828,101 @@ function OnRapid()
EMT.L3 = EMT.L3s
end
end
-- se tastatore
if EMT.ISPROBING then
local nSetHead = GetHeadSet( EMT.HEAD)
local bIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
local idProbeMachining = EMT.MCHID
local bFound = false
local nProbeHead = GetHeadSet( EMT.HEAD)
local idProbeNextMachining = EgtGetNextActiveOperation( idProbeMachining)
while not bFound do
if idProbeNextMachining then
EgtSetCurrMachining( idProbeNextMachining)
local sToolNameNextProbe = EgtGetMachiningParam( MCH_MP.TOOL)
if sToolNameNextProbe then
local sToolHeadNextProbe, sToolTcPosNextProbe = GetToolHead( sToolNameNextProbe)
local nToolHead = GetHeadSet( sToolHeadNextProbe)
-- se sono sulla stessa testa
if bIsFirstHead and nProbeHead == 11 then
EMT.PROBENEXTTOOL_H1 = sToolNameNextProbe
EMT.PROBENEXTHEAD_H1 = sToolHeadNextProbe
EMT.PROBENEXTTCPOS_H1 = sToolTcPosNextProbe
bFound = true
elseif not bIsFirstHead and nProbeHead == 21 then
EMT.PROBENEXTTOOL_H2 = sToolNameNextProbe
EMT.PROBENEXTHEAD_H2 = sToolHeadNextProbe
EMT.PROBENEXTTCPOS_H2 = sToolTcPosNextProbe
bFound = true
end
end
else
break
end
idProbeNextMachining = EgtGetNextActiveOperation( idProbeNextMachining)
end
-- ripristino lavorazione corrente
EgtSetCurrMachining( EMT.MCHID)
local bChanged = true
if bIsFirstHead then
-- se prossimo utensile compatibile, lo prelevo
if IsToolCompatibleWithProbe( EMT.PROBENEXTTOOL_H1, EMT.TOOL) then
EMT.TCPOS = EMT.PROBENEXTTCPOS_H1
EMT.HEAD = EMT.PROBENEXTHEAD_H1
EMT.TOOL = EMT.PROBENEXTTOOL_H1
else
-- se vecchio utensile compatibile, tengo quello caricato
if IsToolCompatibleWithProbe( EMT.PREVTOOL_H1, EMT.TOOL) then
bChanged = false
EMT.TCPOS = EMT.PREVTCPOS_H1
EMT.HEAD = EMT.PREVHEAD_H1
EMT.TOOL = EMT.PREVTOOL_H1
-- altrimenti si seleziona utensile di default
else
ExecMoveZmax( EMT.MCHSPLIT, true)
EMT.TCPOS = DefTcPos1
EMT.TOOL = GetToolNameFromTcPos( DefTcPos1)
EMT.HEAD, _ = GetToolHead( EMT.TOOL)
end
end
-- se cambiato utensile, si setta subito nome precedente
if bChanged then
EMT.PREVTOOL_H1 = EMT.TOOL
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
end
else
-- se prossimo utensile compatibile, lo prelevo
if IsToolCompatibleWithProbe( EMT.PROBENEXTTOOL_H2, EMT.TOOL) then
EMT.TCPOS = EMT.PROBENEXTTCPOS_H2
EMT.HEAD = EMT.PROBENEXTHEAD_H2
EMT.TOOL = EMT.PROBENEXTTOOL_H2
else
-- se vecchio utensile compatibile, tengo quello caricato
if IsToolCompatibleWithProbe( EMT.PREVTOOL_H2, EMT.TOOL) then
bChanged = false
EMT.TCPOS = EMT.PREVTCPOS_H2
EMT.HEAD = EMT.PREVHEAD_H2
EMT.TOOL = EMT.PREVTOOL_H2
-- altrimenti si seleziona utensile di default
else
ExecMoveZmax( EMT.MCHSPLIT, true)
EMT.TCPOS = DefTcPos2
EMT.TOOL = GetToolNameFromTcPos( DefTcPos2)
EMT.HEAD, _ = GetToolHead( EMT.TOOL)
end
end
-- se cambiato utensile, si setta subito nome precedente
if bChanged then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
end
end
end
-- se prima lavorazione
if EMT.LOAD then
EMT.V2POS = ParkV2
@@ -1172,8 +1255,8 @@ function OnRapid()
EMT.TO_XHOME = nil
EMT.L1pp = nil
EMT.L3pp = nil
PrevR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'C1', 'C2'))
PrevR2 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'B1', 'B2'))
PrevR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1 or nHSet == 11, 'C1', 'C2'))
PrevR2 = EgtGetAxisHomePos( EgtIf( nHSet == 1 or nHSet == 11, 'B1', 'B2'))
end
-- calcolo Movimento Pinze (potrebbe richiedere movimento testa in Home)
for i = 1, #EMT.AUXCMD do
@@ -1188,7 +1271,7 @@ function OnRapid()
local nPrevHSet = GetHeadSet( EMT.PREVHEAD)
-- vado in parcheggio sempre con utensile precedente
if not HeadIsChainSaw( EMT.PREVHEAD) then
if nPrevHSet == 1 then
if nPrevHSet == 1 or nPrevHSet == 11 then
local HomeX1 = EgtGetAxisHomePos( 'X1')
EmitMoveDataHead( 1, { X=-EMT.PREVHOMEX_H1, Z=MaxZ1, B=EMT.PREVHOMEB_H1, C=EMT.PREVHOMEC_H1, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H1)})
EmitMoveStartHead( 1, 'EA1')
@@ -1529,130 +1612,99 @@ function OnRapid()
EMT.RELOAD = false
EMT.RELOAD2 = nil
end
-- TODO DA SISTEMARE
-- se bisogna fare tastatura
if EMT.EXECPROBE then
EMT.EXECPROBE = nil
local dSecDistProbe = 10 -- 10 = distanza sicurezza tastatore
local dLenProbe = 170 -- 170 = lunghezza tastatore
local dOffHeadProbe = 75 -- offset naso mandrino / centro tastatore
local dPivot = EgtIf( GetHeadSet( EMT.HEAD) == 1, MillOffs, Mill2Offs)
local vtE = Vector3d( EMT.EXTR)
local sFace, ProbePosX, ProbePosZ
if AreSameVectorApprox( vtE, Y_AX()) then
ProbePosX = -( EMT.TABORI1[2] + EMT.HB + dSecDistProbe + dLenProbe + MillOffs)
ProbePosZ = EMT.TABORI1[3] - MillOffs + ( EMT.SB / 2) + EgtIf( EMT.R2 > 0, dOffHeadProbe, -dOffHeadProbe)
sFace = 2
elseif AreSameVectorApprox( vtE, -Y_AX()) then
ProbePosX = -( EMT.TABORI1[2] - dSecDistProbe - dLenProbe - MillOffs)
ProbePosZ = EMT.TABORI1[3] - MillOffs + ( EMT.SB / 2) + EgtIf( EMT.R2 > 0, dOffHeadProbe, -dOffHeadProbe)
sFace = 4
elseif AreSameVectorApprox( vtE, Z_AX()) then
ProbePosX = -( EMT.TABORI1[2] + ( EMT.HB / 2) + dOffHeadProbe)
ProbePosZ = EMT.TABORI1[3] + EMT.SB + dSecDistProbe + dLenProbe
sFace = 3
else
error( "PROBING DIRECTION NOT MANAGED")
end
EmitMoveDataHead( GetHeadSet( EMT.HEAD), { X=ProbePosX, Z=ProbePosZ, B=EMT.R2, C=EMT.R1})
EmitMoveStartHead( GetHeadSet( EMT.HEAD))
EmitMoveWaitHead( GetHeadSet( EMT.HEAD))
local sProbeHead = ' ET' .. GetHeadSet( EMT.HEAD)
EmtOutput( 'G145 Z-10 EF'..sFace..sProbeHead)
-- ci si riporta in posizione fuori ingombro pezzo
if AreSameVectorApprox( vtE, Y_AX()) or AreSameVectorApprox( vtE, -Y_AX()) then
ProbePosZ = EMT.TABORI1[3] + EMT.SB
elseif AreSameVectorApprox( vtE, Z_AX()) then
ProbePosX = EMT.L2
end
EmitMoveDataHead( GetHeadSet( EMT.HEAD), { X=ProbePosX, Z=ProbePosZ, B=EMT.R2, C=EMT.R1})
EmitMoveStartHead( GetHeadSet( EMT.HEAD))
EmitMoveWaitHead( GetHeadSet( EMT.HEAD))
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', 1, true) then
EmtOutput( 'M175')
end
EMT.REFLOC = 0
EMT.MCHFIRST = false
EMT.PLANEACTIVE = true
EMT.ZMAX = false
-- se standard
elseif EMT.FLAG == 0 or EMT.FLAG == 1 or EMT.FLAG == 2 then
local sPostMove = ''
if EMT.MCHFIRST then
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '['), '%)', ']')
if EMT.DOU_TYPE then sOut = sOut .. ' Double' end
EmtOutput( '( *** '..sOut..' *** )')
-- gestione comandi rulli
local sPreMove = ''
if GetV1ToCloseNum( true) then
sPostMove = ' EC-3'
else
sPreMove = ' EC3'
end
if GetV2ToCloseNum( true) then
sPostMove = sPostMove .. ' ED-3'
else
sPreMove = sPreMove .. ' ED3'
end
-- comandi rulli prima di movimento (aperture)
if #sPreMove > 0 then
EmtOutput( 'G157 EA2' .. sPreMove)
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', 1, true) then
EmtOutput( 'M175')
end
EMT.MCHFIRST = false
end
-- se necessario, impostazione riferimento locale
if EMT.REFLOC == 0 then
-- se lavorazione in doppio
if EMT.DOU_TYPE == 2 then
-- aggiusto assi
EMT.L2 = -EMT.L2
-- emetto movimenti in Zero macchina
local Speed = EMT.S * EgtIf( EMT.HEAD ~= 'H12', 1, 1.65)
EmitMoveDataHead( 1, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 1)
local dX2 = - ( Delta2TabY - EMT.DOU_TLEN - ( -DeltaTabY - EMT.L2 - EMT.TLEN + EgtIf( BD.RIGHT_LOAD, -EMT.HB, EMT.HB)))
local dZ2 = -Head2Z + MillOffs - Mill2Offs + EMT.L3
local dC2 = -EMT.R1
local dB2 = -EMT.R2
EmitMoveDataHead( 2, { X=dX2, Z=dZ2, B=dB2, C=dC2, TPos=EMT.DOU_TPOS, S=EMT.DOU_SPEED})
EmitMoveStartHead( 2)
-- aspetto esecuzione movimento testa 2 e 1
EmitMoveWaitHead( 2)
EmitMoveWaitHead( 1)
-- ripristino assi
EMT.L2 = -EMT.L2
end
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = 1
-- trasformo i punti nel piano
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EMT.L1p = nil
EMT.L2p = nil
EMT.L3p = nil
local sDouFlag = EgtIf( EMT.DOU_TYPE, ' EE1', '')
EmtOutput( 'G142'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..EMT.IPLGLSTR..EgtIf( nHSet~=2, ' EU1', ' EU2')..sDouFlag..' EF'..GetFmaxClamp())
-- forzo successiva emissione assi rotanti
EMT.R1p = nil
EMT.R2p = nil
if EMT.ISPROBING then
-- emetto movimenti in Zero macchina
EmitMoveDataHead( GetHeadSet( EMT.HEAD), { X=-EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( GetHeadSet( EMT.HEAD))
EmitMoveWaitHead( GetHeadSet( EMT.HEAD))
else
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
local sPostMove = ''
if EMT.MCHFIRST then
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '['), '%)', ']')
if EMT.DOU_TYPE then sOut = sOut .. ' Double' end
EmtOutput( '( *** '..sOut..' *** )')
-- gestione comandi rulli
local sPreMove = ''
if GetV1ToCloseNum( true) then
sPostMove = ' EC-3'
else
sPreMove = ' EC3'
end
if GetV2ToCloseNum( true) then
sPostMove = sPostMove .. ' ED-3'
else
sPreMove = sPreMove .. ' ED3'
end
-- comandi rulli prima di movimento (aperture)
if #sPreMove > 0 then
EmtOutput( 'G157 EA2' .. sPreMove)
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', 1, true) then
EmtOutput( 'M175')
end
EMT.MCHFIRST = false
EMT.PLANEACTIVE = true
end
-- emissione movimento
local sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
-- comandi rulli dopo movimento (chiusure)
EmtOutput( sOut)
if #sPostMove > 0 then
EmtOutput( 'G157 EA2' .. sPostMove)
-- se necessario, impostazione riferimento locale
if EMT.REFLOC == 0 then
-- se lavorazione in doppio
if EMT.DOU_TYPE == 2 then
-- aggiusto assi
EMT.L2 = -EMT.L2
-- emetto movimenti in Zero macchina
local Speed = EMT.S * EgtIf( EMT.HEAD ~= 'H12', 1, 1.65)
EmitMoveDataHead( 1, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 1)
local dX2 = - ( Delta2TabY - EMT.DOU_TLEN - ( -DeltaTabY - EMT.L2 - EMT.TLEN + EgtIf( BD.RIGHT_LOAD, -EMT.HB, EMT.HB)))
local dZ2 = -Head2Z + MillOffs - Mill2Offs + EMT.L3
local dC2 = -EMT.R1
local dB2 = -EMT.R2
EmitMoveDataHead( 2, { X=dX2, Z=dZ2, B=dB2, C=dC2, TPos=EMT.DOU_TPOS, S=EMT.DOU_SPEED})
EmitMoveStartHead( 2)
-- aspetto esecuzione movimento testa 2 e 1
EmitMoveWaitHead( 2)
EmitMoveWaitHead( 1)
-- ripristino assi
EMT.L2 = -EMT.L2
end
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = 1
-- trasformo i punti nel piano
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EMT.L1p = nil
EMT.L2p = nil
EMT.L3p = nil
local sDouFlag = EgtIf( EMT.DOU_TYPE, ' EE1', '')
EmtOutput( 'G142'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..EMT.IPLGLSTR
..EgtIf( nHSet~=2 and nHSet~=22, ' EU1', ' EU2')..sDouFlag..' EF'..GetFmaxClamp())
-- forzo successiva emissione assi rotanti
EMT.R1p = nil
EMT.R2p = nil
else
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
end
-- emissione movimento
local sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
-- comandi rulli dopo movimento (chiusure)
EmtOutput( sOut)
if #sPostMove > 0 then
EmtOutput( 'G157 EA2' .. sPostMove)
end
end
-- se altrimenti risalita a Z max a fine lavorazione
elseif EMT.FLAG == 3 then
@@ -1661,17 +1713,19 @@ function OnRapid()
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
-- se Split o Presplit lascio agganciata solo la pinza Y2 alla fine dei movimenti
local sNextTool = GetNextTool( EMT.MCHID)
local sNextTool = GetNextTool( EMT.MCHID, true)
-- vado in home se è ultimo movimento ed è ultima lavorazione, se sono con motosega e devo cambiare utensile, oppure se ho la lama
local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool) or ( EMT.HEAD == 'H23' and EMT.TOOL ~= sNextTool) or ( EMT.HEAD == 'H13' and EMT.TOOL ~= sNextTool) or
( EMT.HEAD == 'H12' and EMT.TOOL ~= sNextTool ) or ( EMT.HEAD == 'H22' and EMT.TOOL ~= sNextTool) or EMT.MCHSPLIT
local CurrL3o = EMT.L3o
EMT.L3o = EMT.L3op
EmitZmax( true, true, bToXhome, EMT.R1p, EMT.R2p, EMT.MCHSPLIT)
local bZMax = EmitZmax( true, true, bToXhome, EMT.R1p, EMT.R2p, EMT.MCHSPLIT)
EMT.L3o = CurrL3o
-- aggiorno quota finale trave dopo Zmax
EMT.L1o = EMT.TPOS
EMT.ZMAX = true
if bZMax then
EMT.ZMAX = true
end
-- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then
-- non previsto
@@ -1686,85 +1740,111 @@ end
---------------------------------------------------------------------
function OnLinear()
-- se necessario, impostazione riferimento locale
if EMT.REFLOC == 0 then
-- gruppo della testa
local nHSet = GetHeadSet( EMT.HEAD)
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = 1
-- salvo posizione attuale
local OldL1 = EMT.L1
local OldL2 = EMT.L2
local OldL3 = EMT.L3
-- imposto posizione precedente (non contiene l'offset in X per sovramateriale di testa EMT.X_OFF)
EMT.L1 = EMT.L1o
EMT.L2 = EMT.L2o
EMT.L3 = EMT.L3o
-- trasformo i punti nel piano
-- se tastatore
if EMT.ISPROBING then
if not EMT.PROBE then
local p3FirstPoint = Point3d( EMT.L1, EMT.L2, EMT.L3)
local p3SecondPoint = Point3d( EMT.L1p, EMT.L2p, EMT.L3p)
local dProbingDist = dist( p3FirstPoint, p3SecondPoint) * 2
local vtE = Vector3d( EMT.EXTR)
local sFace, ProbePosZ
if AreSameVectorApprox( vtE, Y_AX()) then
sFace = EgtIf( BD.RIGHT_LOAD, 4, 2)
elseif AreSameVectorApprox( vtE, -Y_AX()) then
sFace = EgtIf( BD.RIGHT_LOAD, 2, 4)
elseif AreSameVectorApprox( vtE, Z_AX()) then
sFace = 3
else
error( "PROBING DIRECTION NOT MANAGED")
end
local sProbeHead = ' ET' .. GetHeadSet( EMT.HEAD)
EmtOutput( 'G145 Z-'.. EgtNumToString( dProbingDist).. ' EF'..sFace..sProbeHead)
-- tastatura attivata
EMT.PROBE = true
end
else
-- se necessario, impostazione riferimento locale
if EMT.REFLOC == 0 then
-- gruppo della testa
local nHSet = GetHeadSet( EMT.HEAD)
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = 1
-- salvo posizione attuale
local OldL1 = EMT.L1
local OldL2 = EMT.L2
local OldL3 = EMT.L3
-- imposto posizione precedente (non contiene l'offset in X per sovramateriale di testa EMT.X_OFF)
EMT.L1 = EMT.L1o
EMT.L2 = EMT.L2o
EMT.L3 = EMT.L3o
-- trasformo i punti nel piano
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EMT.L1p = nil
EMT.L2p = nil
EMT.L3p = nil
local sDouFlag = EgtIf( EMT.DOU_TYPE, ' EE1', '')
EmtOutput( 'G142'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..EMT.IPLGLSTR
..EgtIf( nHSet~=2 and nHSet~=22, ' EU1', ' EU2')..sDouFlag..' EF'..GetFmaxClamp())
-- emissione movimento
local sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
EmtOutput( sOut)
-- aggiorno precedenti
EMT.MOVE = 0
EmtUpdatePrev()
EMT.MOVE = 1
-- ripristino posizione attuale
EMT.L1 = OldL1
EMT.L2 = OldL2
EMT.L3 = OldL3
end
-- aggiustamento valori
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EMT.L1p = nil
EMT.L2p = nil
EMT.L3p = nil
local sDouFlag = EgtIf( EMT.DOU_TYPE, ' EE1', '')
EmtOutput( 'G142'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..EMT.IPLGLSTR..EgtIf( nHSet~=2, ' EU1', ' EU2')..sDouFlag..' EF'..GetFmaxClamp())
-- emissione movimento
local sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
EmtOutput( sOut)
-- aggiorno precedenti
EMT.MOVE = 0
EmtUpdatePrev()
EMT.MOVE = 1
-- ripristino posizione attuale
EMT.L1 = OldL1
EMT.L2 = OldL2
EMT.L3 = OldL3
end
-- aggiustamento valori
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
-- se lavorazione in doppio e fondo foro, inverto movimento punta doppia
local bDouHoleBott = ( EMT.MCHTYPE == MCH_MY.DRILLING and EMT.DOU_TYPE == 2 and EMT.FLAG == 101)
if bDouHoleBott then
EmtOutput( "G157 EE-1")
end
-- valori degli assi
local sL1, bL1 = EmtGetAxis( 'L1')
local sL2, bL2 = EmtGetAxis( 'L2')
local sL3, bL3 = EmtGetAxis( 'L3')
local sR1, bR1 = EmtGetAxis( 'R1')
local sR2, bR2 = EmtGetAxis( 'R2')
local sAxes = sL1 .. sL2 .. sL3 .. sR2 .. sR1
-- se nulla da emettere, esco
if #sAxes == 0 then return end
-- arresto preciso in angoli di fresature per utensili (non penne) di piccolo diametro
local sSlowDown = ''
if EMT.MCHTYPE == MCH_MY.MILLING and EMT.TTOTDIAM < 15 and abs( EMT.S) > 1000 and ( bL1 or bL2) and not bL3 then
sSlowDown = ' G9'
end
-- aggiungo feed
local sFeed = EmtGetFeed()
-- emetto linea
EmtOutput( "G1"..sSlowDown..sAxes..sFeed)
-- se lavorazione in doppio e fondo foro, muovo punta 2 e poi ripristino movimento standard punta doppia
if bDouHoleBott then
if EMT.DOU_TYPE == 2 or EMT.DOU_TYPE == 3 then
local dZ = 2 * EMT.L3p - EMT.L3
EmtOutput( "G1 Z" .. EgtNumToString( dZ, 3))
EmtOutput( "G1 Z" .. EgtNumToString( EMT.L3p, 3))
-- se lavorazione in doppio e fondo foro, inverto movimento punta doppia
local bDouHoleBott = ( EMT.MCHTYPE == MCH_MY.DRILLING and EMT.DOU_TYPE == 2 and EMT.FLAG == 101)
if bDouHoleBott then
EmtOutput( "G157 EE-1")
end
EmtOutput( "G157 EE1")
end
-- aggiorno valori come precedenti
EMT.TPOS = EMT.L1o
EmtUpdatePrev()
-- valori degli assi
local sL1, bL1 = EmtGetAxis( 'L1')
local sL2, bL2 = EmtGetAxis( 'L2')
local sL3, bL3 = EmtGetAxis( 'L3')
local sR1, bR1 = EmtGetAxis( 'R1')
local sR2, bR2 = EmtGetAxis( 'R2')
local sAxes = sL1 .. sL2 .. sL3 .. sR2 .. sR1
-- se nulla da emettere, esco
if #sAxes == 0 then return end
-- arresto preciso in angoli di fresature per utensili (non penne) di piccolo diametro
local sSlowDown = ''
if EMT.MCHTYPE == MCH_MY.MILLING and EMT.TTOTDIAM < 15 and abs( EMT.S) > 1000 and ( bL1 or bL2) and not bL3 then
sSlowDown = ' G9'
end
-- aggiungo feed
local sFeed = EmtGetFeed()
-- emetto linea
EmtOutput( "G1"..sSlowDown..sAxes..sFeed)
-- se lavorazione in doppio e fondo foro, muovo punta 2 e poi ripristino movimento standard punta doppia
if bDouHoleBott then
if EMT.DOU_TYPE == 2 or EMT.DOU_TYPE == 3 then
local dZ = 2 * EMT.L3p - EMT.L3
EmtOutput( "G1 Z" .. EgtNumToString( dZ, 3))
EmtOutput( "G1 Z" .. EgtNumToString( EMT.L3p, 3))
end
EmtOutput( "G157 EE1")
end
-- aggiorno valori come precedenti
EMT.TPOS = EMT.L1o
EmtUpdatePrev()
end
end
---------------------------------------------------------------------
@@ -1791,7 +1871,8 @@ function OnArc()
EMT.L2p = nil
EMT.L3p = nil
local sDouFlag = EgtIf( EMT.DOU_TYPE, ' EE1', '')
EmtOutput( 'G142'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..EMT.IPLGLSTR..EgtIf( nHSet~=2, ' EU1', ' EU2')..sDouFlag..' EF'..GetFmaxClamp())
EmtOutput( 'G142'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..EMT.IPLGLSTR
..EgtIf( nHSet~=2 and nHSet~=22, ' EU1', ' EU2')..sDouFlag..' EF'..GetFmaxClamp())
-- emissione movimento
local sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
@@ -1841,17 +1922,13 @@ end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s]
local MaxTempoAcc = 4.0 -- [s]
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 = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
local AccMaxPinze = EMT.MAXACC or FMaxPinze / ( 60 * MinTempoAcc)
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local AccMaxPinze = EMT.MAXACC
local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
@@ -2477,6 +2554,9 @@ end
---------------------------------------------------------------------
function GetV1ToCloseNum( UseCurrV1)
if EMT.MCHPRECUT or EMT.MCHCUT then
return false
end
--EmtOutput( string.format( 'L1m=%.3f L1M=%.3f', EMT.MAXMIN[1], EMT.MAXMAX[1]))
--EmtOutput( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LT))
local dV1Pos
@@ -2530,12 +2610,13 @@ end
---------------------------------------------------------------------
function GetDiffRotAxAtStart( R1, R2)
local HomeR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'C1', 'C2'))
local nHSet = GetHeadSet( EMT.HEAD)
local HomeR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1 or nHSet == 11, 'C1', 'C2'))
local PrevR1 = EMT.R1p or EMT.R1pp or HomeR1
if not R1 or not PrevR1 or abs( R1 - PrevR1) > 0.1 then
return true
end
local HomeR2 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'B1', 'B2'))
local HomeR2 = EgtGetAxisHomePos( EgtIf( nHSet == 1 or nHSet == 11, 'B1', 'B2'))
local PrevR2 = EMT.R2p or EMT.R2pp or HomeR2
if not R2 or not PrevR2 or abs( R2 - PrevR2) > 0.1 then
return true
@@ -2551,12 +2632,12 @@ function MyAdjustLinearAxes()
if EMT.REFLOC then
local vtE
if EMT.HEAD == 'H11' or EMT.HEAD == 'H12' then
if EMT.HEAD == 'H11' or EMT.HEAD == 'H12' or EMT.HEAD == 'H19' then
local dAddLen = EgtIf( EMT.HEAD == 'H12', -SawOffsZ, 0)
local Len = EMT.TLEN + dAddLen + MillOffs
local LenRef = MillOffs
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
elseif EMT.HEAD == 'H21' or EMT.HEAD == 'H22' then
elseif EMT.HEAD == 'H21' or EMT.HEAD == 'H22' or EMT.HEAD == 'H29' then
local dAddLen = EgtIf( EMT.HEAD == 'H22', -Saw2OffsZ, 0)
local Len = EMT.TLEN + dAddLen + Mill2Offs
local LenRef = Mill2Offs
@@ -2572,7 +2653,7 @@ function MyAdjustLinearAxes()
else
EmtSetLastError( 1211, 'Head not defined ' .. ( EMT.HEAD or ''))
end
if EMT.HEAD == 'H11' or EMT.HEAD == 'H12' or EMT.HEAD == 'H13' or EMT.HEAD == 'H15' then
if EMT.HEAD == 'H11' or EMT.HEAD == 'H12' or EMT.HEAD == 'H13' or EMT.HEAD == 'H15' or EMT.HEAD == 'H19' then
EMT.L1 = EMT.L1 - vtE:getX()
EMT.L2 = EMT.L2 - DeltaTabY - vtE:getY()
EMT.L3 = EMT.L3 - DeltaTabZ - vtE:getZ()
@@ -2778,13 +2859,40 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
if bReset then
EmitResetMachining()
end
if EMT.ISPROBING then
-- se lavorazione successiva con stessa testa non si va a Z massima
local nSetHead = GetHeadSet( EMT.HEAD)
local bIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
local sToolNameNextProbe
local idProbeNextMachining = EgtGetNextActiveOperation( EMT.MCHID)
if idProbeNextMachining then
EgtSetCurrMachining( idProbeNextMachining)
sToolNameNextProbe = EgtGetMachiningParam( MCH_MP.TOOL)
EgtSetCurrMachining( EMT.MCHID)
end
if sToolNameNextProbe and bIsFirstHead and EMT.PREVTOOL_H1 == sToolNameNextProbe then
return false
elseif sToolNameNextProbe and not bIsFirstHead and EMT.PREVTOOL_H2 == sToolNameNextProbe then
return false
end
end
-- se tastatura attiva, si disabilita la tastatura
-- gestione eventuale tastatura
local bStopProbing = EgtGetValInNotes( EMT.MCHUSERNOTES, 'PROBE', 'b') or EgtGetValInNotes( EMT.MCHUSERNOTES, 'END-PROBE', 'b')
if bStopProbing then
EmtOutput( 'G145 Z-10 EF0')
end
EMT.PROBE = nil
-- gruppo della testa
local nHSet = GetHeadSet( EMT.HEAD)
local dXPos = EgtIf( bUsePrevDelta, EMT.L2pp or EMT.L2o, EMT.L2o)
-- reset stato di testa in home
EMT.XHOME = nil
-- se testa 1
if nHSet == 1 then
if nHSet == 1 or nHSet == 11 then
-- posizioni sicure
local dMaxZ1 = EgtGetAxisMax( 'Z1')
local dSafeX1 = EgtGetAxisHomePos( 'X1')
@@ -2858,9 +2966,7 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
local MovH = { Z = EgtIf( dZref > EMT.L3o, dZref, EMT.L3o)}
MovH.X = -dXPos ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
EmitMoveDataHead( 1, MovH)
if EMT.HEAD == 'H12' and ( abs( dSafeC1 - PrevR1) > 30.1 or abs( dSafeB1 - PrevR2) > 30.1) or not( bProgress) then
EmitMoveDataHead( 1, { Z=dMaxZ1, B=0})
end
EmitMoveDataHead( 1, { Z=dMaxZ1, B=0})
EmitMoveDataHead( 1, { C=dSafeC1})
EmitMoveDataHead( 1, { B=dSafeB1})
EmitMoveDataHead( 1, { Z=dMaxZ1})
@@ -2950,6 +3056,7 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
EmitMoveWaitHead( 2)
end
end
return true
end
---------------------------------------------------------------------
@@ -2979,7 +3086,7 @@ function EmitXhome()
-- gruppo della testa
local nHSet = GetHeadSet( EMT.HEAD)
-- se testa 1
if nHSet == 1 then
if nHSet == 1 or nHSet == 11 then
local dMaxZ1 = EgtGetAxisMax( 'Z1')
local dSafeX1 = EgtGetAxisHomePos( 'X1')
local dSafeZ1 = EgtGetAxisHomePos( 'Z1')
@@ -3011,14 +3118,19 @@ end
---------------------------------------------------------------------
function EmitResetMachining()
if ( EMT.TOOL ~= GetNextTool( EMT.MCHID) and IsLastPath( EMT.PATHID)) or GetSpecUnloading( EMT.PATHID) or GetFall( EMT.PATHID) then
-- se da MLDE parametro non settato, o settato a true, scrivo il comando arresto mandrino
if WriteM05Command == nil or WriteM05Command then
if EMT.PLANEACTIVE and not EMT.ISPROBING then
-- se non sono a Z massima e operatore deve entrare in cabina spango sempre
if not EMT.ZMAX and ( GetSpecUnloading( EMT.PATHID) or GetFall( EMT.PATHID)) then
EmtOutput( 'M05')
-- altrimenti spegnimento dipende da parametro
elseif ( EMT.TOOL ~= GetNextTool( EMT.MCHID, false) and IsLastPath( EMT.PATHID)) or GetSpecUnloading( EMT.PATHID) or GetFall( EMT.PATHID) then
EmtOutput( 'M05')
end
local sOut = 'G157 EA1'
EmtOutput( sOut)
-- piano non più attivo
EMT.PLANEACTIVE = false
end
local sOut = 'G157 EA1'
EmtOutput( sOut)
end
---------------------------------------------------------------------
+205 -49
View File
@@ -88,6 +88,10 @@ function OnSimulStart()
if DefTcPos2 then
LoadFirstTool( 2, DefTcPos2)
end
-- se presenti, nascondo i tastatori
DeactivateProbeTool()
ExecStartHome()
-- Se reset o home, esco
if EMT.SIM1ST then return end
@@ -122,7 +126,8 @@ function OnSimulStart()
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC2'},
{ Grp = 'Base', Sub = 'BELT', Name = 'COLLISION'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM'}}
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM2'}}
if EgtGetHeadId( 'H21') then
table.insert( McdData, { Grp = 'X2', Sub = 'COLLISION', Name = 'STM'})
@@ -237,9 +242,9 @@ function OnSimulDispositionStart()
end
end
-- determino la risoluzione dello Zmap
local dTol = 4.00
local dTol = 4.71
if EmtGetVMillStep then
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.00)
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
@@ -503,9 +508,11 @@ function OnSimulToolSelect( dPosA)
EMT.TDIAM = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
EMT.TUSERNOTES = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES)
local nSetHead = GetHeadSet( EMT.HEAD)
local bIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
EMT.ISPROBING = HeadIsProbe( EMT.HEAD)
-- se ho due teste, verifico che l'altra sia dalla parte opposta
if EgtGetHeadId( 'H21') then
if nSetHead == 1 then
if bIsFirstHead then
EgtSetAxisPos( 'X2', MinX2)
else
EgtSetAxisPos( 'X1', MaxX1)
@@ -513,10 +520,8 @@ function OnSimulToolSelect( dPosA)
end
-- se sega a catena, imposto subito angolo scelto per asse virtuale A
if HeadIsChainSaw( EMT.HEAD) then
-- se non Progress, apro le paratie
if not Progress then
ExecParkRoller( nil, nil, nil, nil, false, IsStartPhase( EMT.PHASE))
end
-- apro le paratie
ExecParkRoller( nil, nil, nil, nil, false, IsStartPhase( EMT.PHASE))
-- valore dell'asse virtuale
dPosA = dPosA or GetNextChainSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
@@ -543,6 +548,75 @@ function OnSimulToolSelect( dPosA)
-- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end
-- se tastatore
if HeadIsProbe( EMT.HEAD) then
local bChanged = true
if bIsFirstHead then
-- se prossimo utensile compatibile, lo prelevo
if IsToolCompatibleWithProbe( EMT.PROBENEXTTOOL_H1, EMT.TOOL) then
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
EgtLoadTool( EMT.PROBENEXTHEAD_H1, 1, EMT.PROBENEXTTOOL_H1)
EMT.TCPOS = EMT.PROBENEXTTCPOS_H1
EMT.HEAD = EMT.PROBENEXTHEAD_H1
EMT.TOOL = EMT.PROBENEXTTOOL_H1
else
-- se vecchio utensile compatibile, tengo quello caricato
if IsToolCompatibleWithProbe( EMT.PREVTOOL_H1, EMT.TOOL) then
bChanged = false
EMT.TCPOS = EMT.PREVTCPOS_H1
EMT.TOOL = EMT.PREVTOOL_H1
EMT.HEAD = EMT.PREVHEAD_H1
-- altrimenti si seleziona utensile di default
else
ExecMoveZmax( EMT.MCHSPLIT, true)
EMT.TCPOS = DefTcPos1
EMT.TOOL = GetToolNameFromTcPos( DefTcPos1)
EMT.HEAD, _ = GetToolHead( EMT.TOOL)
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
EgtLoadTool( EMT.HEAD, 1, EMT.TOOL)
end
end
-- se cambiato utensile, si setta subito nome precedente
if bChanged then
EMT.PREVTOOL_H1 = EMT.TOOL
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
end
else
-- se prossimo utensile compatibile, lo prelevo
if IsToolCompatibleWithProbe( EMT.PROBENEXTTOOL_H2, EMT.TOOL) then
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
EgtLoadTool( EMT.PROBENEXTHEAD_H2, 1, EMT.PROBENEXTTOOL_H2)
EMT.TCPOS = EMT.PROBENEXTTCPOS_H2
EMT.HEAD = EMT.PROBENEXTHEAD_H2
EMT.TOOL = EMT.PROBENEXTTOOL_H2
else
-- se vecchio utensile compatibile, tengo quello caricato
if IsToolCompatibleWithProbe( EMT.PREVTOOL_H2, EMT.TOOL) then
bChanged = false
EMT.TCPOS = EMT.PREVTCPOS_H2
EMT.TOOL = EMT.PREVTOOL_H2
EMT.HEAD = EMT.PREVHEAD_H2
-- altrimenti si seleziona utensile di default
else
ExecMoveZmax( EMT.MCHSPLIT, true)
EMT.TCPOS = DefTcPos2
EMT.TOOL = GetToolNameFromTcPos( DefTcPos2)
EMT.HEAD, _ = GetToolHead( EMT.TOOL)
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
EgtLoadTool( EMT.HEAD, 1, EMT.TOOL)
end
end
-- se cambiato utensile, si setta subito nome precedente
if bChanged then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
end
end
end
-- carico utensile, con breve pausa
EgtPause( 100)
EgtOutText( '')
@@ -611,10 +685,57 @@ function OnSimulToolDeselect( dPrevA)
LoadNextTool( 2, DefTcPos2)
end
end
-- se presenti, nascondo i tastatori
DeactivateProbeTool()
local bSkipToolChange = false
-- se prossima lavorazione è tastatura, si controlla compatibilità con utensile successivo
if HeadIsProbe( EMT.NEXTHEAD) then
local idProbeMachining = EgtGetNextActiveOperation( EMT.MCHID)
local bFound = false
local nProbeHead = GetHeadSet( EMT.NEXTHEAD)
local idProbeNextMachining = EgtGetNextActiveOperation( idProbeMachining)
while not bFound do
if idProbeNextMachining then
EgtSetCurrMachining( idProbeNextMachining)
local sToolNameNextProbe = EgtGetMachiningParam( MCH_MP.TOOL)
if sToolNameNextProbe then
local sToolHeadNextProbe, sToolTcPosNextProbe = GetToolHead( sToolNameNextProbe)
local nToolHead = GetHeadSet( sToolHeadNextProbe)
-- se sono sulla stessa testa
if nToolHead == 1 and nProbeHead == 11 then
EMT.PROBENEXTTOOL_H1 = sToolNameNextProbe
EMT.PROBENEXTHEAD_H1 = sToolHeadNextProbe
EMT.PROBENEXTTCPOS_H1 = sToolTcPosNextProbe
bFound = true
elseif nToolHead == 2 and nProbeHead == 21 then
EMT.PROBENEXTTOOL_H2 = sToolNameNextProbe
EMT.PROBENEXTHEAD_H2 = sToolHeadNextProbe
EMT.PROBENEXTTCPOS_H2 = sToolTcPosNextProbe
bFound = true
end
end
else
break
end
idProbeNextMachining = EgtGetNextActiveOperation( idProbeNextMachining)
end
-- ripristino lavorazione corrente
EgtSetCurrMachining( EMT.MCHID)
if nProbeHead == 11 and not( IsToolCompatibleWithProbe( EMT.PREVTOOL_H1, EMT.TOOL)) then
;
elseif nProbeHead == 21 and not( IsToolCompatibleWithProbe( EMT.PREVTOOL_H2, EMT.TOOL)) then
;
else
bSkipToolChange = true
end
end
-- reset flag sega a catena già depositata
EMT.CHSAW_OUT = nil
-- se utensile non cambia e non è sega a catena, esco
if ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and not HeadIsChainSaw( EMT.NEXTHEAD) then return end
if bSkipToolChange or ( ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and not HeadIsChainSaw( EMT.NEXTHEAD)) then return end
-- deposito utensile
EgtOutText( 'Tool change in progress...')
-- se prossimo utensile sega a catena, devo mettere in home testa 1 e depositare l'utensile sulla testa 2 o viceversa
@@ -623,7 +744,7 @@ function OnSimulToolDeselect( dPrevA)
-- se ci sono due teste
if EgtGetHeadId( 'H21') then
local nSetHead = GetHeadSet( EMT.NEXTHEAD)
if nSetHead == 1 then
if nSetHead == 1 or nSetHead == 11 then
-- porto in home testa 1
SimulMoveAxis( 'X1', MaxX1, MCH_SIM_STEP.RAPID)
-- deposito utensile fresa
@@ -679,7 +800,7 @@ function OnSimulToolDeselect( dPrevA)
if nSetHead == 1 and EMT.PREVHEAD_H1 then
local MyParkX1 = EgtIf( GetHeadTCSet( EMT.HEAD, EMT.TCPOS) == 'Head1_TC1', ParkX1, ParkFrnX1)
SimulMoveAxis( 'X1', MyParkX1, MCH_SIM_STEP.RAPID)
elseif EMT.PREVHEAD_H2 then
elseif nSetHead == 2 and EMT.PREVHEAD_H2 then
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
end
@@ -710,7 +831,7 @@ function OnSimulToolDeselect( dPrevA)
SimulMoveAxis( 'Z2', ParkCSawZ2, MCH_SIM_STEP.RAPID)
end
-- per prossima testa gruppo 1
else
elseif nNextSetHead == 1 then
-- visualizzo utensile su TcPos
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
-- nascondo l'utensile sulla testa
@@ -721,7 +842,7 @@ function OnSimulToolDeselect( dPrevA)
local MyParkB1 = ParkB1
local MyParkC1 = ParkC1
-- se ho due teste oppure è progress, significa che ho CU verticale
if EgtGetHeadId('H21') or bProgress then
if EgtGetHeadId('H21') or Progress then
MyParkB1 = EgtIf( GetHeadTCSet( EMT.NEXTHEAD, EMT.NEXTTCPOS) == 'Head1_TC1', ParkB1, ParkFrnB1)
MyParkC1 = EgtIf( GetHeadTCSet( EMT.NEXTHEAD, EMT.NEXTTCPOS) == 'Head1_TC1', ParkC1, ParkFrnC1)
-- altrimenti su one CU speciale motosega-utensile lungo
@@ -772,6 +893,7 @@ function OnSimulMachiningStart()
EMT.VMRS = ( EMT.MCHTYPE ~= MCH_MY.DRILLING and not EMT.MCHUSERNOTES:find( 'VMRS=0;', 1, true))
EMT.MCHSPLIT = ( EMT.MCHUSERNOTES:find( 'Split;', 1, true) ~= nil)
EMT.MCHPRECUT = ( EMT.MCHUSERNOTES:find( 'Precut;', 1, true) ~= nil)
EMT.MCHCUT = ( EMT.MCHUSERNOTES:find( 'Cut;', 1, true) ~= nil)
-- recupero TASKID della feature lavorata
local vId = EgtGetMachiningGeometry()
if vId and #vId > 0 and #vId[1] > 0 then
@@ -779,12 +901,6 @@ function OnSimulMachiningStart()
else
EMT.TASKID = 0
end
-- gestione eventuale tastatura
EMT.PROBE = nil
local bProbing = EgtGetValInNotes( EMT.MCHUSERNOTES, 'PROBE', 'b')
if bProbing then
EMT.PROBE = true
end
-- gestione eventuale lavorazione in doppio
local nDouType = EgtGetValInNotes( EMT.MCHUSERNOTES, 'DOUBLE', 'i')
if nDouType == 2 then
@@ -848,6 +964,7 @@ function OnSimulMachiningEnd()
EMT.DOU_TOOL = nil
-- salvo dati utensile
local nSetHead = GetHeadSet( EMT.HEAD)
-- se non ho già tolto la sega a catena, aggiorno valori
if not EMT.CHSAW_OUT then
-- per gruppo testa 1
@@ -971,7 +1088,12 @@ function OnSimulMoveStart()
-- pinza 5
if EMT.W2DELTA then
EMT.A5n = 'W'
EMT.A5m = 'T'
local dPosQW = EgtGetAxisPos( 'QW') or 0
if dPosQW < 1 then
EMT.A5m = nil
else
EMT.A5m = 'T'
end
EMT.A5 = EMT.L1 + EMT.W2DELTA - EMT.A4
VerifyWStroke( EMT.A5)
end
@@ -1059,9 +1181,9 @@ function OnSimulMoveStart()
end
-- altrimenti sega a catena
else
local dPosA = GetCurrChainSawingVirtualAxis()
-- se anche precedente con sega a catena ma depositata, devo riprenderla
if EMT.CHSAW_OUT then
local dPosA = GetCurrChainSawingVirtualAxis()
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
OnSimulToolDeselect()
EgtLoadTool( EMT.HEAD, 1, EMT.TOOL)
@@ -1125,9 +1247,9 @@ function OnSimulMoveStart()
end
-- altrimenti sega a catena (H13 o H15)
else
local dPosA = GetCurrChainSawingVirtualAxis()
-- se anche precedente con sega a catena ma depositata, devo riprenderla
if EMT.CHSAW_OUT then
local dPosA = GetCurrChainSawingVirtualAxis()
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
OnSimulToolDeselect()
EgtLoadTool( EMT.HEAD, 1, EMT.TOOL)
@@ -1201,9 +1323,9 @@ function OnSimulMoveStart()
end
-- altrimenti sega a catena
else
local dPosA = GetCurrChainSawingVirtualAxis()
-- se anche precedente con sega a catena ma depositata, devo riprenderla
if EMT.CHSAW_OUT then
local dPosA = GetCurrChainSawingVirtualAxis()
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
OnSimulToolDeselect()
EgtLoadTool( EMT.HEAD, 1, EMT.TOOL)
@@ -1349,7 +1471,7 @@ function OnSimulMoveEnd()
-- eventuale rimozione sfridi
ExecRemoveScraps()
-- se Split o Presplit lascio agganciata solo la pinza Y2 alla fine dei movimenti
local sNextTool = GetNextTool( EMT.MCHID)
local sNextTool = GetNextTool( EMT.MCHID, true)
-- vado in home se è ultimo movimento ed è ultima lavorazione, se sono con motosega e devo cambiare utensile, oppure se ho la lama
local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool) or ( EMT.HEAD == 'H23' and EMT.TOOL ~= sNextTool) or ( EMT.HEAD == 'H13' and EMT.TOOL ~= sNextTool) or
( EMT.HEAD == 'H12' and EMT.TOOL ~= sNextTool ) or ( EMT.HEAD == 'H22' and EMT.TOOL ~= sNextTool) or EMT.MCHSPLIT
@@ -1483,7 +1605,7 @@ function ExecAuxCmd( sCmd, bPathStart)
ExecMoveHome( Cmd[2] == '1', EgtIf( bPathStart, false, EMT.MCHSPLIT))
elseif Cmd[1] == '11' then
local bClose = Cmd[2] ~= '0'
if bPathStart and EMT.MCHSPLIT and not EMT.FALL and GetPY2Light() then bClose = false end
if bPathStart and EMT.MCHSPLIT and not ( EMT.FALL or EMT.TO_FALL) and GetPY2Light() then bClose = false end
ExecMovePY1( bClose)
elseif Cmd[1] == '12' then
ExecMovePY2( Cmd[2] ~= '0')
@@ -1617,16 +1739,50 @@ function ExecMoveZmax( bMchSplit, btoXHome)
-- set della testa
local nSetHead = GetHeadSet( EMT.HEAD)
if nSetHead == 0 then return end
local bIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
if EMT.ISPROBING then
-- se lavorazione successiva con stessa testa non si va a Z massima
local sToolNameNextProbe
local idProbeNextMachining = EgtGetNextActiveOperation( EMT.MCHID)
if idProbeNextMachining then
EgtSetCurrMachining( idProbeNextMachining)
sToolNameNextProbe = EgtGetMachiningParam( MCH_MP.TOOL)
EgtSetCurrMachining( EMT.MCHID)
end
local bMoveToZMax = true
if sToolNameNextProbe and bIsFirstHead and EMT.PREVTOOL_H1 == sToolNameNextProbe then
bMoveToZMax = false
elseif sToolNameNextProbe and not bIsFirstHead and EMT.PREVTOOL_H2 == sToolNameNextProbe then
bMoveToZMax = false
end
-- se non serve alzarsi
if not bMoveToZMax then
local vtE = Vector3d( EMT.EXTR)
local ProbePosZ
-- ci si riporta in posizione fuori ingombro pezzo
if AreSameVectorApprox( vtE, Y_AX()) or AreSameVectorApprox( vtE, -Y_AX()) then
ProbePosZ = EMT.TABORI1[3] + EMT.SB
if nSetHead == 1 then
SimulMoveAxis( 'Z1', ProbePosZ, MCH_SIM_STEP.RAPID)
else
SimulMoveAxis( 'Z2', ProbePosZ, MCH_SIM_STEP.RAPID)
end
end
return
end
end
-- posizioni correnti degli assi testa
local CurrX = EgtGetAxisPos( EgtIf( nSetHead == 1, 'X1', 'X2'))
local CurrZ = EgtGetAxisPos( EgtIf( nSetHead == 1, 'Z1', 'Z2'))
local CurrC = EgtGetAxisPos( EgtIf( nSetHead == 1, 'C1', 'C2'))
local CurrB = EgtGetAxisPos( EgtIf( nSetHead == 1, 'B1', 'B2'))
local CurrX = EgtGetAxisPos( EgtIf( bIsFirstHead, 'X1', 'X2'))
local CurrZ = EgtGetAxisPos( EgtIf( bIsFirstHead, 'Z1', 'Z2'))
local CurrC = EgtGetAxisPos( EgtIf( bIsFirstHead, 'C1', 'C2'))
local CurrB = EgtGetAxisPos( EgtIf( bIsFirstHead, 'B1', 'B2'))
-- posizioni home degli assi testa
local HomeX = EgtGetAxisHomePos( EgtIf( nSetHead == 1, 'X1', 'X2'))
local HomeZ = EgtGetAxisHomePos( EgtIf( nSetHead == 1, 'Z1', 'Z2'))
local HomeC = EgtGetAxisHomePos( EgtIf( nSetHead == 1, 'C1', 'C2'))
local HomeB = EgtGetAxisHomePos( EgtIf( nSetHead == 1, 'B1', 'B2'))
local HomeX = EgtGetAxisHomePos( EgtIf( bIsFirstHead, 'X1', 'X2'))
local HomeZ = EgtGetAxisHomePos( EgtIf( bIsFirstHead, 'Z1', 'Z2'))
local HomeC = EgtGetAxisHomePos( EgtIf( bIsFirstHead, 'C1', 'C2'))
local HomeB = EgtGetAxisHomePos( EgtIf( bIsFirstHead, 'B1', 'B2'))
-- verifico se necessario ruotare la testa
local bRot = ( abs( HomeC - CurrC) > 1 or abs( HomeB - CurrB) > 1)
-- se necessario ruotare la testa, allargo i carrelli
@@ -1637,7 +1793,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
ExecParkRoller( nil, nil, nil, nil, bMchSplit, bAgg)
end
-- se testa 1
if nSetHead == 1 then
if bIsFirstHead then
-- se fresa o lama
if GetHeadTCSet( EMT.HEAD, EMT.TCPOS) == 'Head1_TC1' then
if not HeadIsChainSaw( EMT.HEAD) then
@@ -1681,14 +1837,12 @@ function ExecMoveZmax( bMchSplit, btoXHome)
SimulMoveAxes( 'X1', HomeX, MCH_SIM_STEP.RAPID, 'C1', HomeC, MCH_SIM_STEP.COLLROT)
end
else
-- se sega a catena
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
if abs( HomeC - CurrC) > 0.1 or abs( HomeB - CurrB) > 0.1 then
local dZref = HomeZ + GetZExtra( EMT.HEAD, CurrB)
SimulMoveAxes( 'Z1', EgtIf( dZref > CurrZ, dZref, CurrZ), MCH_SIM_STEP.RAPID, 'B1', EgtClamp( CurrB, -90, 90), MCH_SIM_STEP.COLLROT)
if EMT.HEAD == 'H12' and ( abs( HomeC - CurrC) > 30.1 or abs( HomeB - CurrB) > 30.1) or not( bProgress) then
SimulMoveAxes( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID, 'B1', 0, MCH_SIM_STEP.COLLROT)
end
SimulMoveAxes( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID, 'B1', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', HomeC, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'B1', HomeB, MCH_SIM_STEP.COLLROT)
end
@@ -1734,13 +1888,13 @@ function ExecMoveZmax( bMchSplit, btoXHome)
EMT.XHOME = true
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
-- altrimenti sega a catena
-- altrimenti sega a catena
else
SimulMoveAxes( 'Z2', HomeZ, MCH_SIM_STEP.RAPID, 'B2', HomeB, MCH_SIM_STEP.COLLROT)
if EMT.R3 and abs( EMT.R3) < 0.1 then
SimulMoveAxis( 'Z2', ParkCSawZ2, MCH_SIM_STEP.RAPID)
end
SimulMoveAxes( 'X2', HomeX, MCH_SIM_STEP.RAPID, 'C2', HomeC, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'X2', ParkCSawX2, MCH_SIM_STEP.RAPID, 'C2', HomeC, MCH_SIM_STEP.COLLROT)
end
end
EMT.ZMAX = true
@@ -2212,6 +2366,9 @@ end
---------------------------------------------------------------------
function GetV1ToClose()
if EMT.MCHPRECUT or EMT.MCHCUT then
return false
end
--EgtOutLog( string.format( 'L1m=%.3f L1M=%.3f V2NP=%.3f LB=%.3f', EMT.MAXMIN[1], EMT.MAXMAX[1], EMT.V2NEXTPOS, EMT.LB))
--EgtOutLog( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LT or 0))
return ( EMT.MAXMAX[1] <= EMT.V1NEXTPOS + RollCageMin and EMT.MAXMIN[1] + EMT.LB >= EMT.V1NEXTPOS + RollCageMax)
@@ -2289,12 +2446,11 @@ function LoadNextTool( nHSet, sTcPosDef, bFirst)
end
---------------------------------------------------------------------
function VerifyToolProbeCompatibility()
local bToolIsCompatible = false
if EMT.TTOTLEN < 160 and EMT.TTOTDIAM < 80 then
bToolIsCompatible = true
function DeactivateProbeTool()
if Probe then
EgtSetMode( EgtGetHeadId( 'H19') or GDB_ID.NULL, GDB_MD.HIDDEN)
EgtSetMode( EgtGetHeadId( 'H29') or GDB_ID.NULL, GDB_MD.HIDDEN)
end
return bToolIsCompatible
end
---------------------------------------------------------------------
@@ -2703,7 +2859,7 @@ function GetHeadSetFromTcPos( sTcPos)
local TCPOS_2A = {}
local TCPOS_2B = {}
if EgtGetHeadId( 'H21') then
TCPOS_1A = { 'T1', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10'}
TCPOS_1A = { 'T1', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10', '501'}
TCPOS_1B = { 'T101'}
TCPOS_2A = { 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20'}
TCPOS_2B = { 'T111'}
@@ -2711,7 +2867,7 @@ function GetHeadSetFromTcPos( sTcPos)
TCPOS_1A = { 'T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10'}
TCPOS_1B = { 'T101', 'T201'}
TCPOS_1C = { 'T301'}
TCPOS_2A = { 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20'}
TCPOS_2A = { 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20', '502'}
end
for _, sVal in ipairs( TCPOS_1A) do
if sVal == sTcPos then return 1, 1 end
@@ -2830,7 +2986,7 @@ function GetNextChainSawingVirtualAxis( MchId)
end
---------------------------------------------------------------------
function GetNextTool( nMchId)
function GetNextTool( nMchId, bResetOnStart)
-- inizializzo prossimo utensile
local sNextTool
-- recupero lavorazione successiva
@@ -2838,7 +2994,7 @@ function GetNextTool( nMchId)
while nNextMchId do
-- se la prossima lavorazione è lo start di un altro pezzo, faccio finta che cambia utensile in modo che vada in parcheggio con utensili speciali
if EgtGetOperationType( nNextMchId) == MCH_OY.DISP then
if IsStartOrRestPhase( EMT.PHASE+1) then
if IsStartOrRestPhase( EMT.PHASE+1) and bResetOnStart then
return nil
end
else
+82 -11
View File
@@ -4,6 +4,12 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
---------------------------------------------------------------------
-- *** Generic Machinings ***
---------------------------------------------------------------------
require( 'EmtGenMachining')
---------------------------------------------------------------------
-- Carico libreria
local BD = require( 'BeamData')
@@ -208,6 +214,13 @@ function OnSpecialMoveZup()
EMC.MODIF = true
end
end
elseif HeadIsChainSaw( EMC.HEAD) then
EMC.TTOTLEN = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
if EMC.TDIR[3] < -0.15 and EMC.L3 > - EMC.TTOTLEN then
EMC.L3 = EMC.TTOTLEN * EMC.TDIR[3]
-- dichiaro modificato
EMC.MODIF = true
end
end
end
@@ -223,7 +236,7 @@ local MIN_BACK_ENG_V = 115 -- ingombro asse Z a sinistra
local AGG_V = MinDeltaYV -- ingombro rulli pressori + sicurezza
local MIN_CLAMP_5 = 150 -- minima presa con la pinza speciale (pinza 5)
local SIC_CLAMP_5 = 50 -- sicurezza testa da pinza speciale
local MAX_BACK_CLAMP_5 = 320 -- massima sporgenza posteriore del pezzo da pinza speciale
local MAX_BACK_CLAMP_5 = EgtClamp( MaxBackClamp5 or 320, 200, 380) -- massima sporgenza posteriore del pezzo da pinza speciale
----------------------- Variabili -----------------------------------
local Test = false
@@ -659,9 +672,49 @@ function OnPostApplyMachining()
-- Inizializzo codice di errore
EMC.ERR = 0
-- Recupero la precedente operazione
local nPrevOpeId = EgtGetPrevActiveOperation( EMC.MCHID)
-- Se esiste lavorazione precedente ed è una tastatura
if nPrevOpeId and EgtGetOperationType( nPrevOpeId) == MCH_OY.PROBING then
-- se stessa testa e montato già utensile corretto
-- recupero valori assi alla fine della lavorazione precedente e all'inizio della corrente
local vPrevAxes = EmtGetFinalAxesPos( nPrevOpeId, true)
local vCurrAxes = EmtGetInitialAxesPos( EMC.MCHID, true)
-- info lavorazione precedente
EgtSetCurrMachining( nPrevOpeId)
local sPrevTool = EgtGetMachiningParam( MCH_MP.TOOL)
local sPrevHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local nSetHead = GetHeadSet( sPrevHead)
local bPrevIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
-- info lavorazione corrente
EgtSetCurrMachining( EMC.MCHID)
local sCurrTool = EgtGetMachiningParam( MCH_MP.TOOL)
local sCurrHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
nSetHead = GetHeadSet( sCurrHead)
local bCurrIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
-- se utensile corrente è compatibile (significa che è già stato precaricato) se stessa testa e con stessa configurazioen assi rotanti, annullo risalita
if IsToolCompatibleWithProbe( sCurrTool, sPrevTool) and bPrevIsFirstHead == bCurrIsFirstHead and abs( vCurrAxes[4] - vPrevAxes[4]) < 1 and abs( vCurrAxes[5] - vPrevAxes[5]) < 1 then
-- in lavorazione precedente elimino eventuale retrazione a Zmax
EmtRemoveRise( nPrevOpeId)
-- in lavorazione corrente elimino eventuale approccio da Zmax
EmtRemoveClimb( EMC.MCHID)
-- prendo sempre la Z massima tra le due
local vClimbPoint
if vCurrAxes[3] - 1.0 < vPrevAxes[3] then
vClimbPoint = vCurrAxes
vCurrAxes[3] = vPrevAxes[3]
elseif vPrevAxes[3] - 1.0 < vCurrAxes[3] then
vClimbPoint = vPrevAxes
vPrevAxes[3] = vCurrAxes[3]
end
EmtAddClimb( EMC.MCHID, vClimbPoint, 4, 1, 0)
end
end
-- Recupero la posizione della trave e dei carrelli al termine della precedente operazione
local nPrevOpeId = EgtGetPrevActiveOperation( EMC.MCHID)
-- se precedente operazione non esiste, errore
if not nPrevOpeId then
EMC.ERR = 1
@@ -819,7 +872,6 @@ function OnPostApplyMachining()
local vAxes = EmtGetAxesPos( nLastEntId)
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
end
end
---------------------------------------------------------------------
@@ -1097,6 +1149,17 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
end
-- Recupero testa
local sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local sToolName = EgtTdbGetCurrToolParam( MCH_TP.NAME)
local nSetHead = GetHeadSet( sHead)
local bIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
-- se lavorazione di tastatura, si considera montato utensile di default
if HeadIsProbe( sHead) then
local sOtherToolName = GetToolNameFromTcPos( EgtIf( bIsFirstHead, DefTcPos1, DefTcPos2))
local sOtherHeadTool, _ = GetToolHead( sOtherToolName)
EgtLoadTool( sOtherHeadTool, 1, sOtherToolName)
end
-- Recupero valore assi macchina
local nSecId = EgtGetNext( EgtGetFirstInGroup( nPathId))
local vAxes = EmtGetAxesPos( nSecId)
@@ -1107,8 +1170,8 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
end
-- Calcolo dell'ingombro della testa rispetto allo Zero Macchina
local b3Enc
if sHead ~= 'H21' and sHead ~= 'H22' and sHead ~= 'H23' then
if bIsFirstHead then
EgtSetAxisPos( 'C1', vAxes[4])
EgtSetAxisPos( 'B1', vAxes[5])
if sHead == 'H13' or sHead == 'H15' then
@@ -1142,6 +1205,7 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
local dDistFront = - ptMax:getX() - LoadT - dHeadFront
local dDistBack = ptMin:getX() + LoadT + EMC.LB - dHeadBack
EgtOutLog( ' DistFront = ' .. EgtNumToString( dDistFront, 1) .. ' DistBack = ' .. EgtNumToString( dDistBack, 1), 3)
return dDistFront, dDistBack, dRollFront, dRollBack
end
@@ -1553,8 +1617,11 @@ function SpecCalcUnload()
EgtOutLog( ' *[U1]', 1)
end
local vCmd = {}
-- Tipo di scarico
local bStdUl = ( not MaxUnloadLen or MaxUnloadLen < 1 or EMC.LB - EMC.HOVM < MaxUnloadLen + 1)
-- Commento
table.insert( vCmd, { 0, 'Unloading'})
table.insert( vCmd, { 0, 'Unloading', EgtIf( bStdUl, 'Unloading', 'Manual Unloading')})
-- posizionamento sicuro teste e rulli (non serve ?)
--table.insert( vCmd, { 4, 0})
-- Se pinza Y chiusa, la apro
@@ -1562,11 +1629,15 @@ function SpecCalcUnload()
table.insert( vCmd, { 11, 0})
EMC.CNT = nil
end
-- Sposto il pezzo in posizione di scarico
local dFinT = UnloadT - EMC.LB
local dFinY2 = dFinT + EMC.Y2DELTA
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dFinY2), 1)
-- Se non supero la lunghezza massima di scarico, sposto il pezzo in posizione di scarico
if bStdUl then
local dFinT = UnloadT - EMC.LB
local dFinY2 = dFinT + EMC.Y2DELTA
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dFinY2), 1)
else
table.insert( vCmd, { 1, 'Y2', MaxY2})
end
-- apro la morsa
table.insert( vCmd, { 12, 0})
-- riporto il carrello in home
BIN
View File
Binary file not shown.
+11
View File
@@ -91,11 +91,13 @@ Language1=Italiano,Ita.txt
Language2=English,Eng.txt
[Tools]
Probe=1
Drillbit=1
Sawblade=1
Mill=1
Mortise=1
Chisel=0
ProbeMaker=MakeProbe.lua
DrillMaker=MakeWoodDrill.lua
SawbladeMaker=MakeSawblade.lua
MillMaker=MakeWoodCylMill.lua
@@ -113,6 +115,7 @@ H21.1:MILL_NOTIP=MillNoTip.nge
H22.1=Saw.nge
[Machinings]
Probing=1
Drilling=1
Sawing=1
Milling=1
@@ -125,6 +128,8 @@ SawFinishing=0
[Machining]
InitScript=InitMach.lua
ExitScript=ExitMach.lua
[Probing]
PrbScript1=StdProbe
[Disposition]
;InitScript=InitDisp.lua
@@ -136,10 +141,14 @@ H11=6608
H12=6615
; Chainsaw
H13=6616
; Probe
H19=6618
; Second 5 axis head
H21=6620
; Second 5 axis saw
H22=6623
; Probe
H29=6618
[SetUp]
Default=Standard
@@ -152,3 +161,5 @@ WinPlace=0,514,138,628,810
Enable=1
Save=0
[ToolTrace]
Enable=1
+99 -7
View File
@@ -42,12 +42,12 @@
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
EgtEnableDebug( true)
PP_VER = '2.7f1_DEV5'
PP_NVER = '2.7.6.1'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PFrl'
PP_VER = '2.7h2_DEV2_B'
PP_NVER = '2.7.8.2'
MIN_MACH_VER = '2.7f3'
MACH_NAME = string.match( EgtGetCurrMachineDir(), "[^\\]+$") -- si ricava il nome della macchina dal direttorio
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
@@ -174,7 +174,6 @@ SecondSaw = false
AutomaticRotation = true
OptimizedLoadBeam = true
AutoRotMinLen = 0
CoeffVM = 0.5
EstimationRapidMultiplier = 1
ForceToCloseRollersGate = false
Probe = nil
@@ -259,6 +258,10 @@ if EgtExistsFile( sData) then
if Machine.Offsets.SAWOFFSZ then SawOffsZ = Machine.Offsets.SAWOFFSZ end
if Machine.Offsets.SAW2OFFSX then Saw2OffsX = Machine.Offsets.SAW2OFFSX end
if Machine.Offsets.SAW2OFFSZ then Saw2OffsZ = Machine.Offsets.SAW2OFFSZ end
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD end
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.DEFTCPOS1 then DefTcPos1 = ( 'T' .. Machine.Offsets.DEFTCPOS1) end
if Machine.Offsets.DEFTCPOS2 then DefTcPos2 = ( 'T' .. Machine.Offsets.DEFTCPOS2) end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
@@ -268,6 +271,7 @@ if EgtExistsFile( sData) then
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.PROBE then Probe = Machine.Offsets.PROBE end -- Tastatore su entrembe le teste. 1 = solo testa 1, 2 = solo testa 2, 3 = entrambe le teste
if Machine.Offsets.MAX_BACK_CLAMP_5 then MaxBackClamp5 = Machine.Offsets.MAX_BACK_CLAMP_5 end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
@@ -384,6 +388,22 @@ local H12Id = EmtHead {
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H12_HEAD/GEO'}
--EgtSetInfo( H12Id, 'ZMAXONROT', '1,190')
-- Tastatore su testa 1
local H19Id
if Probe == 1 or Probe == 3 then
H19Id = EmtHead {
Name = 'H19',
Parent = 'B1',
HSet = 'H19',
Type = MCH_HT.STD,
Pos = Point3d( -60, -81, 0),
TDir = Z_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB1, MaxB1},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H19_HEAD/GEO'}
end
-- Sega a catena
EmtAxis {
Name = 'A',
@@ -471,6 +491,10 @@ EgtMove( EgtGetFirstNameInGroup( C2Id, 'SOLID'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( C2Id, 'COLLISION'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B2Id, 'SOLID'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B2Id, 'COLLISION'), vtMove2, GDB_RT.GLOB)
if Probe == 2 or Probe == 3 then
EgtMove( EgtGetFirstNameInGroup( B2Id, 'SOLID_PROBE'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B2Id, 'COLLISION_PROBE'), vtMove2, GDB_RT.GLOB)
end
-- Frese
local H21Id = EmtHead {
Name = 'H21',
@@ -499,6 +523,22 @@ if SecondSaw then
Geo = 'H22_HEAD/GEO'}
--EgtSetInfo( H22Id, 'ZMAXONROT', '1,190')
end
-- Tastatore su testa 2
local H29Id
if Probe == 2 or Probe == 3 then
H29Id = EmtHead {
Name = 'H29',
Parent = 'B2',
HSet = 'H29',
Type = MCH_HT.STD,
Pos = Point3d( Head2X - 60, Head2Y - 81, Head2Z + 0),
TDir = Z_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB2, MaxB2},
OthColl = {'B2/SOLID', 'C2/SOLID'},
Geo = 'H29_HEAD/GEO'}
end
-- *** Carrelli ***
-- Morse
local Y1Id = EmtAxis {
@@ -912,8 +952,12 @@ end
function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' then
return 1
elseif sHead == 'H19' then
return 11
elseif sHead == 'H21' or sHead == 'H22' then
return 2
elseif sHead == 'H29' then
return 21
else
return 0
end
@@ -961,6 +1005,54 @@ function HeadIsChainSaw( sHead)
return ( sHead == 'H13')
end
---------------------------------------------------------------------
-- Funzione che riconosce testa per tastatore
function HeadIsProbe( sHead)
return ( sHead == 'H19' or sHead == 'H29')
end
---------------------------------------------------------------------
function IsToolCompatibleWithProbe( sToolName, sCurrTool)
local bToolIsCompatible = false
if sToolName then
EgtTdbSetCurrTool( sToolName)
local dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM)
local dToolLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
if dToolDiam < 100 and dToolLen < 160 then
bToolIsCompatible = true
end
EgtTdbSetCurrTool( sCurrTool)
end
return bToolIsCompatible
end
---------------------------------------------------------------------
function GetToolNameFromTcPos( sTcPos)
local sToolName
-- Carico gli utensili sulle barre portautensili
local vTcPos = EgtGetAllTcPosNames()
if vTcPos then
for i = 1, #vTcPos do
if vTcPos[i] == sTcPos then
local sToolsName = EgtGetToolsInCurrSetupPos( vTcPos[i])
sToolName = sToolsName[1]
end
end
end
return sToolName
end
---------------------------------------------------------------------
function GetToolHead( sToolName)
local sHead
local sCurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
EgtTdbSetCurrTool( sToolName)
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
EgtTdbSetCurrTool( sCurrTool)
return sHead, sTcPos
end
---------------------------------------------------------------------
-- Funzione che calcola la posizione Home di Z per la sega a catena dal valore dell'asse virtuale
function GetChainSawZHomeFromVirtualAxis( dPosA)
@@ -1015,6 +1107,7 @@ function GetZExtra( sHead, dAngV)
return 0
end
end
return 0
end
---------------------------------------------------------------------
@@ -1055,7 +1148,6 @@ function GetPY2Light()
return ( EgtGetInfo( PY2LightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine()
+3
View File
@@ -2,6 +2,9 @@
;Index = Type, Description, Default Value
; Type : b=boolean, d=double, l=lenght, s=string
[Probing]
0=s,Type,Head
[Drilling]
[Sawing]
+12
View File
@@ -30,6 +30,8 @@ local GS = {}
-- Configurazione posizioni (con o senza TC2)
local PositionTable = {}
local SecondSaw = ( EgtGetHeadId( 'H22') ~= nil)
local ProbeFirstHead = ( EgtGetHeadId( 'H19') ~= nil)
local ProbeSecondHead = ( EgtGetHeadId( 'H29') ~= nil)
if SecondSaw then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"},
{Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"},
@@ -78,6 +80,16 @@ else
table.insert( PositionTable, {Pos = "Pos21", TcPos = "T201", Head = "H13", Group = "G2"})
end
end
-- aggiunta tastatori
if ProbeFirstHead then
local sIndex = EgtNumToString( #PositionTable + 1)
table.insert( PositionTable, {Pos = "Pos"..sIndex, TcPos = "T501", Head = "H19", Group = "G4"})
end
if ProbeSecondHead then
local sIndex = EgtNumToString( #PositionTable + 1)
table.insert( PositionTable, {Pos = "Pos"..sIndex, TcPos = "T502", Head = "H29", Group = "G4"})
end
local UsePositionHead = true
local function IsInGeomSet( ToolHead, PosHead)
Binary file not shown.
Binary file not shown.
+4 -3
View File
@@ -36,6 +36,7 @@
4=s,DOUBLE
[MORTISE_STD]
0=b,MORTISE
1=d,STEP
2=d,SIDESTEP
0=th,TH,
1=b,MORTISE
2=d,STEP
3=d,SIDESTEP
+24
View File
@@ -1,5 +1,29 @@
==== Common_ONE-PF Update Log ====
Versione 2.7h2 (28/08/2025)
- (GEN) Migliorata gestione spegnimento utensile e disattivazione piano
- (SIM-GEN) Corretto nome variabile e altre piccole modifiche per Progress
Versione 2.7h1 (20/08/2025)
- (SIM-GEN) Non si chiudono i rulli se tagli o pretagli di testa e coda
- (SIM) Corretto movimento pinza 5 in caso di riposizionamento pinza 1
- (GEN) Corretta quota assoluta posizione testa trave in caso di pinza 5 e testa rimasta bassa
- (GEN) Se ultima lavorazione pezzo precedente ha stesso utensile della prima lavorazione pezzo successivo, la speed resta accesa
Versione 2.7g4 (23/07/2025)
- (SIM-GEN) Aggiunto parametro configurabile da TS3 per massima sporgenza trave in coda per pinza 5. Ticket#2538
Versione 2.7g3 (22/07/2025)
- (SIM) Corretto lettura angolo di presa della motosega
Versione 2.7g2 (08/07/2025)
- (SIM) Corretto movimento a parcheggio sega a catena. Ticket#2517
Versione 2.7g1 (01/07/2025)
- (GEN) Rimossa gestione PROBE inserita per sbaglio
- (GEN) Corretto gestione accelerazioni
- (SIM-GEN) Aggiunta gestione massima lunghezza scarico
Versione 2.7f1 (04/06/2025)
- (SIM) Aggiunta gestione qualità VMILL da impostazioni macchina. Tolto parametro 'CoeffVM'.
- (GEN) Prima versione gestione tastatore
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '2.7f1', -- versione script
VERSION = '2.7h2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}