Compare commits

...

34 Commits

Author SHA1 Message Date
luca.mazzoleni b314c701fb V1OpenOnTailCut 2025-08-06 10:30:40 +02:00
luca.mazzoleni 1c731d2f51 Merge branch 'master' into develop 2025-08-06 10:21:17 +02:00
andrea.villa 9da267149a - Allineamento con common ver. 2.7g4
- Aggiunto parametro MaxBackClamp5
2025-07-23 12:15:47 +02:00
andrea.villa ee7db694e6 Allineamento con common ver. 2.7g3 2025-07-22 11:17:55 +02:00
andrea.villa b66f238ca5 Alineamento con common ver. 2.7g1 2025-07-01 10:07:32 +02:00
andrea.villa edd07a5bc5 - Allineamento con Common ver. 2.7e1
- Aggiornamento versione
2025-05-28 12:39:28 +02:00
andrea.villa 5825c0f292 Merge commit '8307af3165c0a7129705f4c27387d0bfac7a1190' 2025-05-21 08:33:03 +02:00
andrea.villa 7e5738ffa9 Cambio versione 2025-04-28 13:38:47 +02:00
andrea.villa 947a2c27ae - Allineamento con common ver. 2.7d1
- Aggiornamento MachNotes
- Lettura PRECUT per automatismo
2025-04-16 13:43:07 +02:00
andrea.villa b6f4304daa #critical# Allineamento con common 2.7c3 2025-03-26 07:59:49 +01:00
andrea.villa 4cb36a2899 Allineamento con common ver. 2.7c2 2025-03-12 08:30:20 +01:00
andrea.villa 8307af3165 Alla separazione si aprono le pinze di 30mm per evitare che pezzo torni indietro dell'offset compensato con misurazione laser. E' un test, non siamo sicuri che sia questo il problema. 2025-03-10 12:30:03 +01:00
andrea.villa 3c31786eae Merge remote-tracking branch 'origin/master' into develop 2025-03-10 12:26:50 +01:00
andrea.villa 0097239f56 Merge remote-tracking branch 'origin/develop' 2025-03-05 11:50:17 +01:00
andrea.villa 6b40c6e9f0 Allineamento con common ver. 2.7c1 2025-03-05 11:50:06 +01:00
andrea.villa 82dfa8fa65 Merge branch 'master' into develop 2025-02-07 12:48:23 +01:00
andrea.villa 906fd1ae7c Merge remote-tracking branch 'origin/develop' 2025-02-07 12:48:08 +01:00
andrea.villa 6e490a1675 - Allineamento con common ver. 2.7b1
- Modifica NGE per collisioni con traversa
2025-02-07 12:47:53 +01:00
andrea.villa 333b64981b Estensione soluzione Ticket#2206. Ora si aprono di 5mm extra anche se solo una morsa resta in posizione. 2025-01-23 09:06:07 +01:00
andrea.villa 7f63045fef In caso di Progress, alla deselezione utensile testa 1 su TC2 si fa movimento Z raddrizzando asse B. 2025-01-16 09:21:40 +01:00
andrea.villa cb04bbfe11 Merge remote-tracking branch 'origin/master' into develop 2025-01-16 09:21:04 +01:00
andrea.villa 83f8b80aa3 Aggiunta nota utensile 2025-01-15 12:06:30 +01:00
andrea.villa f97836f1d3 - Allineamento con common ver. 2.7a1
- In MLDE si legge il parcheggio della punta lunga su utensile standard ONE
2025-01-15 12:01:54 +01:00
andrea.villa 6a798bf431 Allineamento con common ver. 2.7a1 2025-01-07 16:31:09 +01:00
andrea.villa 0754284247 - Allineamento con common vr. 2.6l2
- In GetZExtra contemplato anche casi sotto-squadra
2024-12-09 12:40:30 +01:00
andrea.villa 2a6edc5bdd - Allineamento con common ver. 2.6l1
- Aggiunta variabile ROT180 per rotazioni nuovo automatismo
2024-12-02 08:35:40 +01:00
andrea.villa 32fcb2d854 Allineamento con common ver. 2.6j2 2024-10-21 16:56:53 +02:00
andrea.villa 32df68c419 - Allineamento con common ver. 2.6j2
- Tolti i commenti iniziali da quando è stato creato progetto GIT
2024-10-17 12:28:11 +02:00
andrea.villa 970bed202e Corretto calcolo posizione parcheggio V1 e V2 2024-10-09 14:24:19 +02:00
andrea.villa a7cf030659 Merge remote-tracking branch 'origin/develop' 2024-10-08 11:45:29 +02:00
andrea.villa 70f9b6b596 - Allineamento con common ver. 2.6j1 2024-10-08 11:45:16 +02:00
andrea.villa 01f223f690 Migliorie movimento in ZMAX leggendo quota X precedente 2024-10-03 10:10:16 +02:00
andrea.villa 95da880f98 Cambio nome versione 2024-10-02 15:12:54 +02:00
andrea.villa 5d07852adc Si manda in home utensile precedente solo se lama. Gli altri stanno a ZMAX 2024-10-02 15:12:21 +02:00
11 changed files with 410 additions and 205 deletions
+12
View File
@@ -8,6 +8,7 @@ local BeamData = {
RIGHT_LOAD = false, -- flag carico da destra
SIMUL_VIEW_DIR = 2, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
ROT90 = false, -- flag abilitazione rotazione 90 gradi
ROT180 = true, -- flag abilitazione rotazione 180 gradi
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 400, -- larghezza massima del grezzo
@@ -66,6 +67,8 @@ local BeamData = {
KIOTP = 6, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
MAXDIAM_POCK_CORNER = 31, -- diametro massimo utensile ammesso per tasche con angoli interni
USE_LONGCUT = false, -- per i tagli longitudinali usare solo la lavorazione di lama LongCut
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda
ADVANCE_TAIL_CUT = true, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con robabile caduta
ADVANCE_TAIL_OFFS = 1, -- accorciamento taglio di coda avanzato (minimo 1)
CLAMP5 = false -- presenza pinza speciale per pezzi piccoli
@@ -95,6 +98,15 @@ 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
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
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
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
+1
View File
@@ -28,6 +28,7 @@
17=ProfTCone
18=SmallToolContour
19=AntiSplintMillCut
20=Prof_end
[Pocketing]
1=Pocket
+137 -74
View File
@@ -27,7 +27,10 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 102000 -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 102000, 20000, 102000) -- 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
-- utensili default
EMT.PREVTCPOS_H1 = DefTcPos1
EMT.PREVTCPOS_H2 = DefTcPos2
@@ -56,6 +59,7 @@ function OnProgramStart()
end
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n')
EmtOutput( '(HEADER)')
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then
EmitTestProgramStart()
@@ -103,6 +107,7 @@ function OnProgramEnd()
EMT.SPECSPLIT = nil
EMT.RELOAD = nil
EMT.RELOAD2 = nil
EmtOutput( '(FOOTER)')
-- Se modalità test, termino il programma
if TEST_USE then
EmtOutput( 'M02')
@@ -603,6 +608,7 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVTCPOS = EMT.TCPOS
-- se taglio finale, aggiorno lunghezza barra
if EMT.MCHCUT then
EMT.LB = EMT.LT + ( EMT.X_OFF or 0)
@@ -614,11 +620,15 @@ function OnMachiningEnd()
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
EMT.PREVHOMEX_H1 = EgtGetAxisHomePos( 'X1')
EMT.PREVHOMEB_H1 = EgtGetAxisHomePos( 'B1')
EMT.PREVHOMEC_H1 = EgtGetAxisHomePos( 'C1')
elseif nHSet == 2 then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
EMT.PREVHOMEX_H2 = EgtGetAxisHomePos( 'X2')
EMT.PREVHOMEB_H2 = EgtGetAxisHomePos( 'B2')
EMT.PREVHOMEC_H2 = EgtGetAxisHomePos( 'C2')
end
if EMT.DOU_TYPE and not EMT.ZMAX then EMT.DOU_TO_ZMAX = true end
@@ -684,6 +694,10 @@ function OnPathEnd()
if not EMT.ZMAX then
EmitResetMachining()
end
-- salvo dati precedenti
EMT.L2pp = EMT.L2o
EMT.AUXTYPE = nil
EMT.UNL = nil
EMT.PREROT = nil
@@ -868,14 +882,20 @@ function OnRapid()
bMoveZbeforeX = true
end
-- se vado in posizione speciale rotazione assi, poi devo ritornare alla X vera di lavoro
local dMoveXtoFinalPosition = false
local dXref = EMT.L2
if EMT.HEAD == 'H12' and EMT.L2 < -LimX1PlRotSaw then
dXref = -LimX1PlRotSaw
EmitMoveDataHead( 1, { X=dXref, Z=MyMaxZ1, B=ParkB1, C=ParkC1, S=Speed})
dZref = max( EMT.L3, dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2))
dMoveXtoFinalPosition = true
elseif not bMoveZbeforeX then
EmitMoveDataHead( 1, { X=dXref, Z=MyMaxZ1, B=ParkB1, C=ParkC1, S=Speed})
else
EmitMoveDataHead( 1, { X=-LimX1PlRotSaw, Z=MyMaxZ1, B=ParkB1, C=ParkC1, S=Speed})
dZref = max( EMT.L3, dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2))
dMoveXtoFinalPosition = true
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
@@ -886,6 +906,9 @@ function OnRapid()
if bMoveZbeforeX then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
if dMoveXtoFinalPosition then
EmitMoveDataHead( 1, { X=EMT.L2, S=Speed})
end
-- caso standard
else
EmitMoveDataHead( 1, { X=dXref, Z=dZref, B=ParkB1, C=ParkC1, S=Speed})
@@ -970,8 +993,8 @@ function OnRapid()
-- altrimenti caso standard
else
EmitMoveDataHead( 1, { Z=dZref, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
end
-- altrimenti sega a catena
else
@@ -1014,7 +1037,7 @@ function OnRapid()
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX2RotSaw, EMT.L2 > -LimX2RotSaw) or EMT.R2 > 91) then
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 > 91) then
dZref = min( dSafeZ2 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ2)
end
@@ -1029,18 +1052,23 @@ function OnRapid()
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H22' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC2 - EMT.R1) > 30.1 or abs( HomeB2 - EMT.R2) > 30.1) then
EmitMoveDataHead( 2, { B=0, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
if abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC2 - EMT.R1) > 30.1 or abs( HomeB2 - EMT.R2) > 30.1) then
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { B=0, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 2, { Z=dZref, S=Speed})
EmitMoveDataHead( 2, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
end
end
-- altrimenti caso standard
else
EmitMoveDataHead( 2, { Z=dZref, S=Speed})
EmitMoveDataHead( 2, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
end
-- altrimenti sega a catena
else
@@ -1121,7 +1149,7 @@ function OnRapid()
end
bToPresel = false
-- risalita a Zmax
EmitZmax( false, false, EMT.TO_XHOME, PrevR1, PrevR2)
EmitZmax( false, false, EMT.TO_XHOME, PrevR1, PrevR2, nil, true)
EMT.ZMAX = true
EMT.TO_ZMAX = nil
EMT.TO_XHOME = nil
@@ -1137,32 +1165,20 @@ function OnRapid()
EMT.AUXCMD = {}
-- se necessario posizionamento in home (sono sicuramente già a Zmax)
if EMT.TO_XHOME then
local nHSet = GetHeadSet( EMT.HEAD)
local nPrevHSet = GetHeadSet( EMT.PREVHEAD)
-- se successivo non è sega a catena e la testa è la stessa, vado in home con utensile succesivo
if not HeadIsChainSaw( EMT.HEAD) and nHSet == nPrevHSet then
if nHSet == 1 then
local HomeX1 = EgtGetAxisHomePos( 'X1')
EmitMoveDataHead( 1, { X=-HomeX1, Z=MaxZ1, B=ParkB1, C=ParkC1})
EmitMoveStartHead( 1, 'EA1')
EmitMoveWaitHead( 1)
else
local HomeX2 = EgtGetAxisHomePos( 'X2')
EmitMoveDataHead( 2, { X=-HomeX2, Z=MaxZ2, B=ParkB2, C=ParkC2})
EmitMoveStartHead( 2, 'EA1')
EmitMoveWaitHead( 2)
end
else
-- se devo andare in home, ma lo sono già, non faccio nulla
if not EMT.XHOME then
local nHSet = GetHeadSet( EMT.HEAD)
local nPrevHSet = GetHeadSet( EMT.PREVHEAD)
-- vado in parcheggio sempre con utensile precedente
if not HeadIsChainSaw( EMT.PREVHEAD) then
if nPrevHSet == 1 then
local HomeX1 = EgtGetAxisHomePos( 'X1')
EmitMoveDataHead( 1, { X=-EMT.PREVHOMEX_H1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H1)})
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')
EmitMoveWaitHead( 1)
else
local HomeX2 = EgtGetAxisHomePos( 'X2')
EmitMoveDataHead( 2, { X=-EMT.PREVHOMEX_H2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H2)})
EmitMoveDataHead( 2, { X=-EMT.PREVHOMEX_H2, Z=MaxZ2, B=EMT.PREVHOMEB_H2, C=EMT.PREVHOMEC_H2, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H2)})
EmitMoveStartHead( 2, 'EA1')
EmitMoveWaitHead( 2)
end
@@ -1170,11 +1186,11 @@ function OnRapid()
if GetHeadTCSet( EMT.PREVHEAD, EMT.PREVTCPOS) == 'Head1_TC1' or GetHeadTCSet( EMT.PREVHEAD, EMT.PREVTCPOS) == 'Head1_TC2' then
EmitMoveDataHead( 1, { X=-ParkCSawX1S, Z=MaxZ1, B=HomeR2, C=HomeR1, TPos='50'})
EmitMoveStartHead( 1, 'EA1')
EmitMoveWaitHead( 1)
--EmitMoveWaitHead( 1)
else
EmitMoveDataHead( 2, { X=-ParkCSawX2S, Z=MaxZ2, B=HomeR2, C=HomeR1, TPos='50'})
EmitMoveStartHead( 2, 'EA1')
EmitMoveWaitHead( 2)
--EmitMoveWaitHead( 2)
end
end
end
@@ -1240,14 +1256,20 @@ function OnRapid()
bMoveZbeforeX = true
end
-- se vado in posizione speciale rotazione assi, poi devo ritornare alla X vera di lavoro
local dMoveXtoFinalPosition = false
local dXref = EMT.L2
if EMT.HEAD == 'H12' and EMT.L2 < -LimX1PlRotSaw then
dXref = -LimX1PlRotSaw
EmitMoveDataHead( 1, { X=dXref, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
dZref = max( EMT.L3, dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2))
dMoveXtoFinalPosition = true
elseif not bMoveZbeforeX then
EmitMoveDataHead( 1, { X=dXref, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
else
EmitMoveDataHead( 1, { X=CurrX1, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
dZref = max( EMT.L3, dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2))
dMoveXtoFinalPosition = true
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
@@ -1258,6 +1280,9 @@ function OnRapid()
if bMoveZbeforeX then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
if dMoveXtoFinalPosition then
EmitMoveDataHead( 1, { X=EMT.L2, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 1, { Z=dZref, S=Speed})
@@ -1347,8 +1372,8 @@ function OnRapid()
-- altrimenti caso standard
else
EmitMoveDataHead( 1, { Z=dZref, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
end
-- altrimenti sega a catena
else
@@ -1386,7 +1411,7 @@ function OnRapid()
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 > -LimX2RotSaw, EMT.L2 < -LimX2RotSaw) or EMT.R2 < -91) then
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 > -LimX2RotSaw, EMT.L2 > -LimX2RotSaw) or EMT.R2 < -91) then
dZref = min( dSafeZ2 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ2)
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
@@ -1401,18 +1426,23 @@ function OnRapid()
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H22' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC2 - EMT.R1) > 30.1 or abs( HomeB2 - EMT.R2) > 30.1) then
EmitMoveDataHead( 2, { B=0, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
if abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC2 - EMT.R1) > 30.1 or abs( HomeB2 - EMT.R2) > 30.1) then
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { B=0, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 2, { Z=dZref, S=Speed})
EmitMoveDataHead( 2, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
end
end
-- altrimenti caso standard
else
EmitMoveDataHead( 2, { Z=dZref, S=Speed})
EmitMoveDataHead( 2, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
end
-- altrimenti sega a catena
else
@@ -1753,17 +1783,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 = 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
@@ -1949,6 +1975,9 @@ function PrepareMoveChar( sCmd, nInd)
table.insert( EMT.MDCHAR, MDChar)
EMT.Y1POS = MoveY1 or EMT.Y1POS
EMT.TPOS = GetCmdAxMove( Cmd, 'T') or EMT.TPOS
if EMT.V1POS < 400 and ( EMT.HEAD == 'H12' or EMT.HEAD == 'H22') and EMT.ZMAX and not EMT.XHOME then
EMT.TO_XHOME = true
end
end
elseif Cmd[1] == '2' then
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, BeamVise=EMT.BV}
@@ -1976,6 +2005,9 @@ function PrepareMoveChar( sCmd, nInd)
end
table.insert( EMT.MDCHAR, MDChar)
EMT.TPOS = GetCmdAxMove( Cmd, 'T') or EMT.TPOS
if EMT.V1POS < 400 and ( EMT.HEAD == 'H12' or EMT.HEAD == 'H22') and EMT.ZMAX and not EMT.XHOME then
EMT.TO_XHOME = true
end
elseif Cmd[1] == '3' then
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, BeamVise=EMT.BV}
local MoveY1 = GetCmdAxMove( Cmd, 'Y1')
@@ -2002,6 +2034,9 @@ function PrepareMoveChar( sCmd, nInd)
end
table.insert( EMT.MDCHAR, MDChar)
EMT.TPOS = GetCmdAxMove( Cmd, 'T') or EMT.TPOS
if EMT.V1POS < 400 and ( EMT.HEAD == 'H12' or EMT.HEAD == 'H22') and EMT.ZMAX and not EMT.XHOME then
EMT.TO_XHOME = true
end
elseif Cmd[1] == '4' then
-- richiesta movimento a ZMAX già gestita
if Cmd[2] == '1' then
@@ -2240,7 +2275,7 @@ function PreparePreRotation( sCmd, nInd)
MDChar = { Y2=ParkY2, V2=ParkV2, IniStatY2=1, FinStatY2=1, BeamVise=0}
table.insert( EMT.MDCHAR, MDChar)
MDChar = { [Cmd[2]]=tonumber(Cmd[3]), IniStatY1=86, FinStatY1=87, BeamVise=0}
elseif EMT.SPECSPLIT then
elseif EMT.SPECSPLIT or EMT.SPLITROT then
MDChar = { [Cmd[2]]=tonumber(Cmd[3]), V1=ParkV1, IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, IniStatV1=3, BeamVise=EMT.BV}
EMT.V1POS = MDChar.V1
else
@@ -2380,6 +2415,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
@@ -2683,6 +2721,9 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
end
-- 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
-- posizioni sicure
@@ -2701,13 +2742,13 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
if not HeadIsChainSaw( EMT.HEAD) then
-- eseguo la salita a Z1max (oriento solo se assi rotanti non già a posto)
if abs( dSafeC1 - PrevR1) > 0.1 or abs( dSafeB1 - PrevR2) > 0.1 then
local dZref = dSafeZ1 + GetZExtra( EMT.HEAD, PrevR2)
if EgtIf( BD.RIGHT_LOAD, -EMT.L2o < -LimX1RotSaw, -EMT.L2o > -LimX1RotSaw) then
local dZref = dSafeZ1 + GetZExtra( EMT.HEAD, EgtClamp( PrevR2, -90, 90))
if EgtIf( BD.RIGHT_LOAD, -dXPos < -LimX1RotSaw, -dXPos > -LimX1RotSaw) then
dZref = dZref - EgtIf( not Mortiser, 100, 370)
end
dZref = min( dZref, dMaxZ1)
local MovH = { Z = EgtIf( dZref > EMT.L3o, dZref, EMT.L3o)}
MovH.X = -EMT.L2o ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
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) then
EmitMoveDataHead( 1, { Z=dMaxZ1, B=0})
@@ -2717,10 +2758,13 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
EmitMoveDataHead( 1, { Z=dMaxZ1})
else
local MovH = { Z = dMaxZ1}
MovH.X = -EMT.L2o ; MovH.B = PrevR2 ; MovH.C = PrevR1 ;
MovH.X = -dXPos ; MovH.B = PrevR2 ; MovH.C = PrevR1 ;
EmitMoveDataHead( 1, MovH)
end
if bXhome then EmitMoveDataHead( 1, { X=-dSafeX1}) end
if bXhome then
EMT.XHOME = true
EmitMoveDataHead( 1, { X=-dSafeX1})
end
EmitMoveStartHead( 1)
-- se lavorazione in doppio
if EMT.DOU_TYPE == 2 then
@@ -2730,14 +2774,15 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
-- altrimenti sega a catena
else
-- ribadisco movimento perchè in G141 si aspetta sempre tutti i valori
local MovH = { X = -EMT.L2o, Z = EMT.L3o, B = PrevR2, C = PrevR1}
local MovH = { X = -dXPos, Z = EMT.L3o, B = PrevR2, C = PrevR1}
EmitMoveDataHead( 1, MovH)
EmitMoveDataHead( 1, { Z=dSafeZ1, B=dSafeB1})
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
if EMT.R3 and abs( EMT.R3) < 0.1 then
EmitMoveDataHead( 1, { Z=ParkCSawZ1})
end
EmitMoveDataHead( 1, { X=-dSafeX1, C=dSafeC1})
if bXhome then
EMT.XHOME = true
EmitMoveDataHead( 1, { X=-ParkX1, Z=ParkCSawZ1, B=ParkB1, C=ParkC1, TPos=50})
end
EmitMoveStartHead( 1)
@@ -2752,9 +2797,9 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
local dZref = dSafeZ1 + GetZExtra( EMT.HEAD, PrevR2)
dZref = min( dZref, dMaxZ1)
local MovH = { Z = EgtIf( dZref > EMT.L3o, dZref, EMT.L3o)}
MovH.X = -EMT.L2o ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
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) then
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, { C=dSafeC1})
@@ -2762,23 +2807,27 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
EmitMoveDataHead( 1, { Z=dMaxZ1})
else
local MovH = { Z = dMaxZ1}
MovH.X = -EMT.L2o ; MovH.B = PrevR2 ; MovH.C = PrevR1 ;
MovH.X = -dXPos ; MovH.B = PrevR2 ; MovH.C = PrevR1 ;
EmitMoveDataHead( 1, MovH)
end
if bXhome then EmitMoveDataHead( 1, { X=-dSafeX1}) end
if bXhome then
EMT.XHOME = true
EmitMoveDataHead( 1, { X=-dSafeX1})
end
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
-- altrimenti sega a catena
else
-- ribadisco movimento perchè in G141 si aspetta sempre tutti i valori
local MovH = { X = -EMT.L2o, Z = EMT.L3o, B = PrevR2, C = PrevR1}
local MovH = { X = -dXPos, Z = EMT.L3o, B = PrevR2, C = PrevR1}
EmitMoveDataHead( 1, MovH)
EmitMoveDataHead( 1, { Z=dSafeZ1, B=dSafeB1})
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
if EMT.R3 and abs( EMT.R3) < 0.1 then
EmitMoveDataHead( 1, { Z=ParkCSawZ1})
end
EmitMoveDataHead( 1, { X=-dSafeX1, C=dSafeC1})
if bXhome then
EMT.XHOME = true
EmitMoveDataHead( 1, { X=-ParkX1, Z=ParkCSawZ1, B=ParkB1, C=ParkC1, TPos=50})
end
EmitMoveStartHead( 1)
@@ -2805,7 +2854,7 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
local dZref = dSafeZ2 + GetZExtra( EMT.HEAD, PrevR2)
dZref = min( dZref, dMaxZ2)
local MovH = { Z = EgtIf( dZref > EMT.L3o, dZref, EMT.L3o)}
MovH.X = -EMT.L2o ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
MovH.X = -dXPos ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
EmitMoveDataHead( 2, MovH)
if EMT.HEAD == 'H22' and ( abs( dSafeC2 - PrevR1) > 30.1 or abs( dSafeB2 - PrevR2) > 30.1) then
EmitMoveDataHead( 2, { Z=dMaxZ2, B=0})
@@ -2815,23 +2864,27 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
EmitMoveDataHead( 2, { Z=dMaxZ2})
else
local MovH = { Z = dMaxZ2}
MovH.X = -EMT.L2o ; MovH.B = PrevR2 ; MovH.C = PrevR1 ;
MovH.X = -dXPos ; MovH.B = PrevR2 ; MovH.C = PrevR1 ;
EmitMoveDataHead( 2, MovH)
end
if bXhome then EmitMoveDataHead( 2, { X=-dSafeX2}) end
if bXhome then
EMT.XHOME = true
EmitMoveDataHead( 2, { X=-dSafeX2})
end
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
-- altrimenti sega a catena
else
-- ribadisco movimento perchè in G141 si aspetta sempre tutti i valori
local MovH = { X = -EMT.L2o, Z = EMT.L3o, B = PrevR2, C = PrevR1}
local MovH = { X = -dXPos, Z = EMT.L3o, B = PrevR2, C = PrevR1}
EmitMoveDataHead( 2, MovH)
EmitMoveDataHead( 2, { Z=dSafeZ2, B=dSafeB2})
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
if EMT.R3 and abs( EMT.R3) < 0.1 then
EmitMoveDataHead( 2, { Z=ParkCSawZ2})
end
EmitMoveDataHead( 2, { X=-dSafeX2, C=dSafeC2})
if bXhome then
EMT.XHOME = true
EmitMoveDataHead( 2, { X=-ParkX2, Z=ParkCSawZ2, B=ParkB2, C=ParkC2, TPos=50})
end
EmitMoveStartHead( 2)
@@ -2928,17 +2981,27 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta)
local DiffY2 = MyParkY2 - dPosY2
--EmtOutput( string.format( 'PosT=%.3f DiffY1=%.3f DiffY2=%.3f', dPosT, DiffY1, DiffY2))
if bSplitCut then
local bYNoMove, bVNoMove
if DiffY1 > 0.1 then
bYNoMove = false
MDChar.Y1 = dPosY1 + DiffY1
else
bYNoMove = true
MDChar.Y1 = dPosY1
end
if DiffY2 < -0.1 then
bVNoMove = false
MDChar.Y2 = dPosY2 + DiffY2
dPosT = dPosT + DiffY2
else
bVNoMove = true
MDChar.Y2 = dPosY2
end
-- se anche solo una morsa è restata in posizione, le sposto comunque entrambe di 5mm per distanziare i pezzi separati
if bYNoMove or bVNoMove then
MDChar.Y1 = MDChar.Y1 + 30
MDChar.Y2 = MDChar.Y2 - 30
end
elseif DiffY1 > 0.1 and DiffY2 < -0.1 then
EmtSetLastError( 1201, 'Error Collision in ParkRoller')
elseif DiffY1 > 0.1 then
+103 -40
View File
@@ -24,7 +24,7 @@ end
---------------------------------------------------------------------
-- *** SIMULATION ***
---------------------------------------------------------------------
local COLL_SAFE_DIST = 4
local COLL_SAFE_DIST = 3
---------------------------------------------------------------------
function OnSimulInit()
@@ -121,7 +121,13 @@ function OnSimulStart()
{ Grp = 'Base', Sub = 'COLLISION', Name = 'COL2'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC2'},
{ Grp = 'Base', Sub = 'BELT', Name = 'COLLISION'}}
{ Grp = 'Base', Sub = 'BELT', Name = 'COLLISION'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM'}}
if EgtGetHeadId( 'H21') then
table.insert( McdData, { Grp = 'X2', Sub = 'COLLISION', Name = 'STM'})
end
-- gruppo CHSAW si attiva solo se progress, one con BIT mortiser o PF
if Progress or Mortiser or EgtGetHeadId( 'H21') then
table.insert( McdData, { Grp = 'Base', Sub = 'COLLISION', Name = 'CHSAW'})
@@ -231,18 +237,24 @@ function OnSimulDispositionStart()
end
end
-- determino la risoluzione dello Zmap
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
local dTol = 4.51
if dArea < CoeffVM * 0.5e6 then
dTol = 1.01
elseif dArea < CoeffVM * 1.2e6 then
dTol = 1.51
elseif dArea < CoeffVM * 2.5e6 then
dTol = 1.97
elseif dArea < CoeffVM * 5.0e6 then
dTol = 2.81
elseif dArea < CoeffVM * 10.0e6 then
dTol = 3.77
local dTol = 4.71
if EmtGetVMillStep then
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71)
else
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
if dArea < 0.075e6 then
dTol = 0.71
elseif dArea < 0.15e6 then
dTol = 1.01
elseif dArea < 0.3e6 then
dTol = 1.51
elseif dArea < 0.6e6 then
dTol = 1.97
elseif dArea < 1.2e6 then
dTol = 2.81
elseif dArea < 2.4e6 then
dTol = 3.77
end
end
-- creo lo Zmap
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
@@ -351,6 +363,8 @@ function OnSimulDispositionStart()
else
EgtOutText( 'Barra non ruotata')
end
-- forzo apertura rulli in caso fossero chiusi. Altrimenti all'apertura nell OnSimulMoveStart sposterebbe anche la trave
ExecParkRoller( nil, nil, nil, nil, nil, nil)
end
-- eseguo aggancio
local nRawId = EgtGetFirstRawPart()
@@ -758,6 +772,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
@@ -960,6 +975,7 @@ function OnSimulMoveStart()
VerifyY2Stroke( EMT.A2)
VerifyV1Stroke( EMT.A3)
VerifyV2Stroke( EMT.A4)
-- se devo subito parcheggiare i rulli
local nRes = 0
if bParkV then
@@ -1001,15 +1017,21 @@ function OnSimulMoveStart()
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
-- se vado in posizione speciale rotazione assi, poi devo ritornare alla X vera di lavoro
local dMoveXtoFinalPosition = false
local dXref = EMT.L2
if EMT.HEAD == 'H12' and -EMT.L2 < -LimX1PlRotSaw then
dXref = LimX1PlRotSaw
SimulMoveAxis( 'X1', dXref, MCH_SIM_STEP.RAPID)
dZref = max( EMT.L3, Z1Home + GetZExtra( EMT.HEAD, EMT.R2))
dMoveXtoFinalPosition = true
elseif not bMoveZbeforeX then
SimulMoveAxis( 'X1', dXref, MCH_SIM_STEP.RAPID)
else
SimulMoveAxis( 'X1', LimX1PlRotSaw, MCH_SIM_STEP.RAPID)
dZref = max( EMT.L3, Z1Home + GetZExtra( EMT.HEAD, EMT.R2))
dMoveXtoFinalPosition = true
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
@@ -1020,6 +1042,9 @@ function OnSimulMoveStart()
if bMoveZbeforeX then
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
end
if dMoveXtoFinalPosition then
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
end
-- caso standard
else
SimulMoveAxis( 'Z1', dZref, MCH_SIM_STEP.RAPID)
@@ -1029,9 +1054,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)
@@ -1089,15 +1114,15 @@ function OnSimulMoveStart()
-- caso standard
else
SimulMoveAxis( 'Z1', dZref, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
end
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)
@@ -1137,9 +1162,9 @@ function OnSimulMoveStart()
--EgtOutBox( 'Flag 2,1', 'Info Rapid')
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX2RotSaw, EMT.L2 > -LimX2RotSaw) or EMT.R2 > 91) then
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, -EMT.L2 < -LimX1RotSaw, -EMT.L2 > -LimX1RotSaw) or EMT.R2 > 91) then
dZref = Z2Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
@@ -1150,25 +1175,30 @@ function OnSimulMoveStart()
SimulMoveAxis( 'X2', LimX2RotSaw, MCH_SIM_STEP.RAPID)
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H22' and abs( C2Pos - EMT.R1) > 1 and ( abs( C2Home - EMT.R1) > 30.1 or abs(B2Home - EMT.R2) > 30.1) then
SimulMoveAxis( 'B2', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'Z2', dZref, MCH_SIM_STEP.RAPID, 'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
if bMoveZbeforeX then
SimulMoveAxis( 'Z2', EMT.L3, MCH_SIM_STEP.RAPID)
if abs( C2Pos - EMT.R1) > 1 and ( abs( C2Home - EMT.R1) > 30.1 or abs( B2Home - EMT.R2) > 30.1) then
if EMT.HEAD == 'H22' then
SimulMoveAxis( 'B2', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'Z2', dZref, MCH_SIM_STEP.RAPID, 'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
if bMoveZbeforeX then
SimulMoveAxis( 'Z2', EMT.L3, MCH_SIM_STEP.RAPID)
end
-- caso standard
else
SimulMoveAxis( 'Z2', dZref, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
if bMoveZbeforeX then
SimulMoveAxis( 'Z2', EMT.L3, MCH_SIM_STEP.RAPID)
end
end
-- caso standard
else
SimulMoveAxis( 'Z2', dZref, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
end
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)
@@ -1261,6 +1291,7 @@ function OnSimulMoveStart()
EMT.A4 = EgtIf( GetV2ToClose(), EMT.V2NEXTPOS, ParkV2)
end
EMT.ZMAX = nil
EMT.XHOME = nil
end
---------------------------------------------------------------------
@@ -1369,6 +1400,10 @@ function ExecAuxCmd( sCmd, bPathStart)
ExecOpenRoller( 1)
ExecOpenRoller( 2)
local sV1, MoveV1, sV2, MoveV2 = CalcMoveV1V2ForAuxCmd( Cmd)
-- se stringo i rulli e ho lama, verifico che sia in home
if MoveV1 and MoveV1 < 400 and ( EMT.HEAD == 'H12' or EMT.HEAD == 'H22') and EMT.ZMAX and not EMT.XHOME then
ExecMoveZmax( false, true)
end
local bOk, bOk1, bOk2, bOk3 = SimulMoveAxes( Cmd[2], tonumber( Cmd[3]), MCH_SIM_STEP.RAPID,
sV1, MoveV1, MCH_SIM_STEP.RAPID,
sV2, MoveV2, MCH_SIM_STEP.RAPID)
@@ -1391,6 +1426,10 @@ function ExecAuxCmd( sCmd, bPathStart)
ExecOpenRoller( 1)
ExecOpenRoller( 2)
local sV1, MoveV1, sV2, MoveV2 = CalcMoveV1V2ForAuxCmd( Cmd)
-- se stringo i rulli e ho lama, verifico che sia in home
if MoveV1 and MoveV1 < 400 and ( EMT.HEAD == 'H12' or EMT.HEAD == 'H22') and EMT.ZMAX and not EMT.XHOME then
ExecMoveZmax( false, true)
end
local bOk, bOk1, bOk2, bOk3, bOk4 = SimulMoveAxes( Cmd[2], tonumber( Cmd[3]), MCH_SIM_STEP.RAPID,
Cmd[4], tonumber( Cmd[5]), MCH_SIM_STEP.RAPID,
sV1, MoveV1, MCH_SIM_STEP.RAPID,
@@ -1414,6 +1453,10 @@ function ExecAuxCmd( sCmd, bPathStart)
ExecOpenRoller( 1)
ExecOpenRoller( 2)
local sV1, MoveV1, sV2, MoveV2 = CalcMoveV1V2ForAuxCmd( Cmd)
-- se stringo i rulli e ho lama, verifico che sia in home
if MoveV1 and MoveV1 < 400 and ( EMT.HEAD == 'H12' or EMT.HEAD == 'H22') and EMT.ZMAX and not EMT.XHOME then
ExecMoveZmax( false, true)
end
local bOk, bOk1, bOk2, bOk3, bOk4, bOk5 = SimulMoveAxes( Cmd[2], tonumber( Cmd[3]), MCH_SIM_STEP.RAPID,
Cmd[4], tonumber( Cmd[5]), MCH_SIM_STEP.RAPID,
Cmd[6], tonumber( Cmd[7]), MCH_SIM_STEP.RAPID,
@@ -1594,7 +1637,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
if GetHeadTCSet( EMT.HEAD, EMT.TCPOS) == 'Head1_TC1' then
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)
local dZref = HomeZ + GetZExtra( EMT.HEAD, EgtClamp( CurrB, -90, 90))
if EgtIf( BD.RIGHT_LOAD, -CurrX < -LimX1RotSaw, -CurrX > -LimX1RotSaw) then
dZref = dZref - EgtIf( not Mortiser, 100, 370)
end
@@ -1607,6 +1650,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
end
SimulMoveAxis( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID)
if btoXHome then
EMT.XHOME = true
SimulMoveAxis( 'X1', ParkX1, MCH_SIM_STEP.RAPID)
end
-- se lavorazione in doppio
@@ -1618,6 +1662,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
SimulMoveAxes( 'B2', ParkB2, MCH_SIM_STEP.COLLROT, 'C2', ParkC2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'Z2', MaxZ2, MCH_SIM_STEP.RAPID)
if bToXHome then
EMT.XHOME = true
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
EMT.DOU_TO_ZMAX = nil
@@ -1625,18 +1670,18 @@ function ExecMoveZmax( bMchSplit, btoXHome)
-- altrimenti sega a catena
else
SimulMoveAxes( 'Z1', HomeZ, MCH_SIM_STEP.RAPID, 'B1', HomeB, MCH_SIM_STEP.COLLROT)
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
if EMT.R3 and abs( EMT.R3) < 0.1 then
SimulMoveAxis( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID)
end
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) then
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
SimulMoveAxis( 'C1', HomeC, MCH_SIM_STEP.COLLROT)
@@ -1644,12 +1689,13 @@ function ExecMoveZmax( bMchSplit, btoXHome)
end
SimulMoveAxis( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID)
if btoXHome then
EMT.XHOME = true
SimulMoveAxis( 'X1', ParkX1, MCH_SIM_STEP.RAPID)
end
-- altrimenti sega a catena
else
SimulMoveAxes( 'Z1', HomeZ, MCH_SIM_STEP.RAPID, 'B1', HomeB, MCH_SIM_STEP.COLLROT)
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
if EMT.R3 and abs( EMT.R3) < 0.1 then
SimulMoveAxis( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID)
end
if btoXHome then
@@ -1659,6 +1705,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
EMT.PREVHEAD_H1 = nil
EMT.PREVTCPOS_H1 = nil
EMT.CHSAW_OUT = true
EMT.XHOME = true
end
SimulMoveAxes( 'X1', HomeX, MCH_SIM_STEP.RAPID, 'C1', HomeC, MCH_SIM_STEP.COLLROT)
end
@@ -1679,15 +1726,16 @@ function ExecMoveZmax( bMchSplit, btoXHome)
end
SimulMoveAxis( 'Z2', MaxZ2, MCH_SIM_STEP.RAPID)
if btoXHome then
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.SB > 650 and abs( EMT.R3) < 0.1 then
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
@@ -1814,8 +1862,20 @@ function ExecParkRoller( PosY1, PosY2, PosV1, PosV2, bSpliCut, bAgg)
local DiffY2 = MyParkY2 - PosY2
-- se appena eseguito taglio di separazione
if bSpliCut then
local dAddMove
-- se entrambe le morse si spostano vado in posizione calcolata
if DiffY1 > 0.1 and DiffY2 < -0.1 then
dAddMove = 0
-- se almeno una è rimasta ferma in posizione, allontano comunque di 30mm ulteriori
else
dAddMove = 30
end
local MoveY1 = max( DiffY1, 0.0)
local MoveY2 = min( DiffY2, 0.0)
MoveY1 = MoveY1 + dAddMove
MoveY2 = MoveY2 - dAddMove
-- aggancio i pezzi rimanenti all'asse Y1
LinkRemainingPartsToY1()
-- eseguo i movimenti
@@ -2147,6 +2207,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)
+25 -11
View File
@@ -73,7 +73,7 @@ function OnSpecialGetMaxZ()
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H12' and sHead_TC == 'Head1_TC1' then
if vtTp:getX() > 0.3 and vtT:getX() > 0.3 then
if vtTp:getX() > 0.4 and vtT:getX() > 0.4 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
@@ -95,7 +95,7 @@ function OnSpecialGetMaxZ()
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H12' and sHead_TC == 'Head1_TC2' then
if vtTp:getX() > 0.3 and vtT:getX() > 0.3 then
if vtTp:getX() > 0.4 and vtT:getX() > 0.4 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
@@ -124,7 +124,7 @@ function OnSpecialGetMaxZ()
EMC.MAXZ = ParkZ2 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H22' then
if vtTp:getX() > 0.3 and vtT:getX() > 0.3 then
if vtTp:getX() > 0.4 and vtT:getX() > 0.4 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ2 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
@@ -223,7 +223,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
@@ -1423,7 +1423,14 @@ function SpecCalcSplit( dLenRaw, dMaxLenLeft)
local vCmd = {}
EgtOutLog( ' *[S]', 1)
local bSplit = ( EMC.Y2DELTA ~= nil or EMC.W2DELTA ~= nil)
local ParkT = EgtIf( bSplit and dMaxLenLeft > ParkV1 - 50, LoadT, ParkV1)
local ParkT = ParkV1
if bSplit then
if dMaxLenLeft + 100 > LoadT then
ParkT = dMaxLenLeft + 300
elseif dMaxLenLeft + 100 > ParkV1 then
ParkT = LoadT
end
end
local sType = EgtIf( EMC.Y2DELTA, 'Split', EgtIf( EMC.W2DELTA, 'SpecSplit', 'Fall'))
table.insert( vCmd, { 0, sType})
if not bSplit then EnsureZmax( false, vCmd) end
@@ -1546,8 +1553,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
@@ -1555,11 +1565,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
+36 -60
View File
@@ -24,62 +24,18 @@
-- 2022/10/24 ver 2.4j1 Correzione gestione Z di primo movimento di prima lavorazione come primo movimento di lavorazioni successive.
-- 2022/11/10 ver 2.4k1 Riportate modifiche PF.
-- 2023/02/18 ver 2.5b2 Riportato da PF gestione speciale movimento in rapido solo a inizio lavorazione (corr. #817). Aggiunto solido collisione per eventuale segacatena sotto trave.
-- 2023/03/31 ver 2.5c5 Correzione per allontanamento trave di testa/coda con paratie (ParkRoller). Aggiornamenti vari come PF.
-- 2023/04/05 ver 2.5d1 Migliorato calcolo Zextra. Migliorata simulazione split con caduta pezzo. Eliminata testa dummy 'H14'.
-- 2023/04/28 ver 2.5d2 In OnSetHead si riassegna ad H3 (sega a catena ) la corretta direzione dell'asse B1.
-- 2023/06/12 ver 2.5f2 Corretta distanza Back per aggiuntivo al carico prima di scambi carrelli.
-- 2023/07/31 ver 2.5g1 Tolte da testa per lama forzatura risalite in Z.In generaz. CN aggiunto M05 su ultima lavorazione prima di Fall.
-- Aggiunta apertura V1 allo scarico finale di barra con uso di entrambe Y1 e Y2 (#1399).
-- 2023/08/07 ver 2.5h1 In split prima di rotazione migliorato controllo spazio dietro per scambio carrelli. Modificato approccio/retrazione sega a catena.
-- Ripristinata forzatura risalita in Z per lame se DeltaAng > 210 e HzPezzo > 610. Modificata notifica utensile su T201.
-- 2023/09/29 ver 2.5i1 In BeamData e mlde aggiunta la lettura di alcuni parametri da Ts3Data.
-- 2023/11/03 ver 2.5k1 Dopo rotazione, nuovo comando Aux per dichiarare morse non in presa su pezzo.
-- In simulazione : gestione corretta motosega in caso prima lavorazione della fase.
-- 2023/11/28 ver 2.6a1 Prima versione con utilizzo post-processore standard per macchine ONE e PF
-- 2024/01/17 ver 2.6a2 Allineamento con Common ver. 2.6a2
-- 2024/01/23 ver 2.6a3 Allineamento con Common ver. 2.6a3
-- 2024/01/23 ver 2.6a4 Allineamento con Common ver. 2.6a5
-- 2024/02/07 ver 2.6a5 Allineamento con Common ver. 2.6a6
-- 2024/02/19 ver 2.6b1 In BeamData aggiunta funzione GetBlockedAxis che sostituisce la GetChainSawBlockedAxis.
-- 2024/02/23 ver 2.6b2 Allineamento con common ver. 2.6b2; in mlde aggiunte chiamate EgtAddToPackagePath
-- 2024/02/29 ver 2.6c1 Allineamento con common ver. 2.6c1
-- 2024/03/04 ver 2.6c2 Modificato log con nome macchina
-- Allineamento con common ver. 2.6c2
-- 2024/03/06 ver 2.6c3 Allineamento con common ver. 2.6c4
-- 2024/03/06 ver 2.6c4 Allineamento con common ver. 2.6c5
-- 2024/03/08 ver 2.6c5 Allineamento con common ver. 2.6c6
-- 2024/03/11 ver 2.6c6 Allineamento con common ver. 2.6c7
-- 2024/03/26 ver 2.6c7 Con aggregati, non viene più aggiunto il gruippo SOLID (in MLDE)
-- 2024/03/28 ver 2.6d1 Allineamento con common ver. 2.6d1
-- 2024/04/12 ver 2.6d2 Allineamento con common ver. 2.6d2
-- Aggiunto parametro ForceToCloseRollersGate
-- 2024/04/30 ver 2.6e1 Allineamento con common ver. 2.6e1
-- Aggiunta variabile WoodDensity per gestione WOOD_DENSITY
-- 2024/06/03 ver 2.6f1 Aggiunta funzione GetSetupInfo a BeamData per nuovo automatismo
-- Allineamento con common ver. 2.6f1
-- 2024/07/10 ver 2.6g1 Allineamento con common ver. 2.6g1
-- 2024/07/16 ver 2.6g2 Allineamento con common ver. 2.6g2
-- 2024/07/17 ver 2.6g3 Allineamento con common ver. 2.6g3
-- 2024/07/22 ver 2.6g4 Gestione pezzi fino a 30 metri
-- Allineamento con common ver. 2.6g4
-- 2024/07/31 ver 2.6g5 Allineamento con common ver. 2.6g5
-- Aggiunta file note tool e machining
-- 2024/08/01 ver 2.6h1 Allineamento con common ver. 2.6h1
-- 2024/08/07 ver 2.6h2 Allineamento con common ver. 2.6h2
-- 2024/09/02 ver 2.6i1 Allineamento con common ver. 2.6i1
-- 2024/09/13 ver 2.6i2 Allineamento con common ver. 2.6i2
-- Inseriti in NGE solidi collisione TC, Aggiunta avriabile LimX1RotSawTC2
-- 2024/09/18 ver 2.6i3 Modificato YAML per comunicazione versioni a LiMan. Aggiunta PP_NVER, versione in formato numerico.
-- 2024/09/27 ver 2.6i4 Quota parcheggio ParkFrnX1 portato a 300mm
-------------------------------------
-- NOTE VERSIONI SUCCESSIVE IN GIT --
-------------------------------------
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6i4_DEV'
PP_NVER = '2.6.9.4'
PP_VER = '2.7g3_DEV1'
PP_NVER = '2.7.7.3'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-ONE'
MACH_NAME = string.match( EgtGetCurrMachineDir(), "[^\\]+$") -- si ricava il nome della macchina dal direttorio
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
@@ -159,7 +115,6 @@ ParkFrnB1 = -90
LimX1RotSaw = 800
LimX1PlRotSaw = 1970
LimX1RotSawTC2 = 800
SafeCSaw0X1 = 1350
ParkCSawX1 = 1350
ParkCSawX1S = MinX1
ParkCSawZ1 = -50
@@ -181,6 +136,7 @@ AutomaticRotation = true
AutoRotMinLen = 0
DefTcPos1 = 'T3'
CoeffVM = 0.5
EstimationRapidMultiplier = 1
ForceToCloseRollersGate = false
-- Aggiornamento con dati da TechnoEssetre7
@@ -205,6 +161,7 @@ if EgtExistsFile( sData) then
end
if Machine.Offsets.X1_POS then MinX1 = -Machine.Offsets.X1_POS end
if Machine.Offsets.X1_NEG then MaxX1 = -Machine.Offsets.X1_NEG end
if Machine.Offsets.PARK_X1 then ParkX1 = -Machine.Offsets.PARK_X1 end
if Machine.Offsets.Z1_NEG then MinZ1 = Machine.Offsets.Z1_NEG end
if Machine.Offsets.Z1_POS then MaxZ1 = min( MaxZ1, Machine.Offsets.Z1_POS) end
if Machine.Offsets.PARK_Z1 then ParkZ1 = Machine.Offsets.PARK_Z1 end
@@ -245,19 +202,24 @@ if EgtExistsFile( sData) then
if Machine.Offsets.SAWOFFSX then SawOffsX = Machine.Offsets.SAWOFFSX end
if Machine.Offsets.SAWOFFSZ then SawOffsZ = Machine.Offsets.SAWOFFSZ end
if Machine.Offsets.DEFTCPOS1 then DefTcPos1 = ( 'T' .. Machine.Offsets.DEFTCPOS1) 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.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.MAX_BACK_CLAMP_5 then MaxBackClamp5 = Machine.Offsets.MAX_BACK_CLAMP_5 end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
ParkV1 = MaxV1
ParkY1 = ParkV1 + MinDeltaYV
MinY2 = MinMchY2
MaxY2 = MaxV2 - MinDeltaYV
ParkV2 = MinV2
ParkY2 = ParkV2 - MinDeltaYV
ParkV1 = min( ParkV1, MaxV1, abs( MinV2))
ParkV2 = -ParkV1
ParkX1 = MaxX1
--ParkFrnX1 = MinX1
ParkX1 = min( ParkX1, MaxX1)
ParkCSawZ1 = min( ParkCSawZ1, MaxZ1)
ParkCSaw0Z1 = min( ParkCSaw0Z1, MaxZ1)
Mortiser = ( Mortiser and not Progress)
@@ -299,7 +261,7 @@ local X1Id = EmtAxis {
Home = ParkX1,
Invert = true,
Geo = 'X1_AXIS/GEO',
Aux = 'X1_AXIS/SOLID'}
Aux = {'X1_AXIS/SOLID', 'X1_AXIS/COLLISION'}}
-- *** Testa 1 ***
EmtAxis {
Name = 'Z1',
@@ -767,6 +729,7 @@ EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC2') or GDB_ID.NULL, vtMovB, GDB_RT.G
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'MTC') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'COLLISION'), vtMovB, GDB_RT.GLOB)
local vtMovC = Vector3d( 0, 0, ( DeltaTabZ + DeltaRulliTappetoZ + 1545)) -- -( -1060 - 485)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'BELT'), vtMovC, GDB_RT.GLOB)
local vtMove = Vector3d( 0, ( DeltaTabY - 1550.0), ( DeltaTabZ + 1060.0))
@@ -817,9 +780,20 @@ function OnSetHead()
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyAxisHome( 'B1', ParkB1)
else
local MyHomeB1, MyHomeC1
-- se cambio utensile verticale
if EgtGetHeadId('H21') or bProgress then
MyHomeB1 = ParkFrnB1
MyHomeC1 = ParkFrnC1
-- altrimenti su one CU speciale motosega-utensile lungo
else
MyHomeB1 = ParkLongToolB1
MyHomeC1 = ParkLongToolC1
end
EmtModifyAxisHome( 'X1', ParkFrnX1)
EmtModifyAxisHome( 'C1', ParkFrnC1)
EmtModifyAxisHome( 'B1', ParkFrnB1)
EmtModifyAxisHome( 'C1', MyHomeC1)
EmtModifyAxisHome( 'B1', MyHomeB1)
end
-- se testa H13 (sega a catena)
elseif EMC.HEAD == 'H13' then
@@ -935,7 +909,7 @@ function GetZExtra( sHead, dAngV)
elseif abs( dAngV) < 60.1 then
return 200
elseif abs( dAngV) < 90.1 then
return 10
return 1
else
return 0
end
@@ -947,7 +921,9 @@ function GetZExtra( sHead, dAngV)
elseif abs( dAngV) < 60.1 then
return 200
elseif abs( dAngV) < 90.1 then
return 10
return 1
elseif abs( dAngV) < 120 then
return -100
else
return 0
end
BIN
View File
Binary file not shown.
+27 -19
View File
@@ -7,18 +7,19 @@
[Sawing]
[Milling]
0=d,MaxElev,0
0=l,MaxElev,0
1=d,OutRaw,0
2=d,SideElev,0
2=l,SideElev,0
3=d,TrimExt,0
4=sr,VtFaceUse,0,0,0
4=s,VtFaceUse,0,0,0
5=s,EdgesFaceUse,0
[Pocketing]
0=d,MaxElev,0
0=l,MaxElev,0
1=b,Open,0
2=d,OpenMinSave,0
2=d,OpenMinSafe,0
3=d,OpenOutRaw,0
4=d,MaxOptSize,0
4=l,MaxOptSize,0
[Mortising]
0=d,MaxElev,0
@@ -30,21 +31,28 @@
[SawFinishing]
[GenMachining]
0=l,LinTol,0.1
1=l,MaxLen,2
2=s,Type,ZigZag
3=d,SideAng,90
4=l,Step,10
5=l,OffsProj,0
6=l,LiTang,0
7=l,LiOrth,0
8=l,LiElev,0
9=l,LoTang,0
10=l,LoOrth,0
11=l,LoElev,0
12=b,DirFromGuide,1
[SurfRoughing]
0=l,MaxElev,1000
1=b,PlaneZ,0
[SurfFinishing]
0=b,SkipMaxDown,1
[5AxMilling]
0=l,LinTol,0.01
1=l,MaxLen,10
2=s,Type,ZigZag
3=d,SideAng,90
4=l,Step,10
5=d,AngIni,-90
6=d,AngFin,90
7=l,LiTang,0
8=l,LiOrth,0
9=l,LiElev,0
10=l,LoTang,0
11=l,LoOrth,0
12=l,LoElev,0
13=b,DirFromGuide,0
14=b,SurfAvoid,0
+1
View File
@@ -8,6 +8,7 @@
0=th,TH,
1=d,STEP
2=s,DOUBLE
3=d,SECDIST
[SAW_STD]
0=th,TH,
+67
View File
@@ -1,5 +1,72 @@
==== Common_ONE-PF Update Log ====
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) Aggiunti parametri FMAXPINZE, MAXACC, MINACC configurabili da TS3. Ticket#2052
Versione 2.7e1 (28/05/2025)
- (SIM-GEN) Alla separazione si spostano i carrelli di 30mm aprendo il taglio. Ticket#2259,Ticket#2328
Versione 2.7d1 (16/04/2025)
- (SIM) Distanza di collisione portata a 3mm, qualità VMILL ridotta a 4mm. Ticket#2395
Versione 2.7c3 (25/03/2025)
- (GEN) Corretto movimento approccio alla lavorazione se utensile lama montata su magazzino 2. Ticket#2361
Versione 2.7c2 (12/03/2025)
- (SIM-GEN) Migliorato calcolo posizione barra dopo split. Tiene in considerazione ingombro lavorazioni pezzo. Ticket#2321
- (GEN) Aggiunta commenti HEADER e FOOTER per comunicazione con linea o altre macchine, da parte di Essetre.
- (SIm-GEN) Migliorato movimento approccio al pezzo con lama. Allineamento simulazione-generazione che facevano due movimenti leggermente diversi. Ticket#2335
Versione 2.7c1 (05/03/2025)
- (GEN) Corretto movimento in home utensile precedente. Ticket#2324
Versione 2.7b1 (07/02/2025)
- (SIM-GEN) In caso di Progress, alla deselezione utensile testa 1 su TC2 si fa movimento Z raddrizzando asse B. Ticket#2247
- (SIM-GEN) Estensione soluzione Ticket#2206. Ora si aprono di 5mm extra anche se solo una morsa resta in posizione. Ticket#2259
- (SIM) Migliorato controllo collisioni con traversa. Ora si considera asse X. Serve modifica NGE! Ticket#2257
Versione 2.7a2 (15/01/2024)
- (SIM-GEN) In caso di testa 1 su TC2 (ONE), si ruota prima la C e poi la B. Ticket#2247
Versione 2.7a1 (07/01/2024)
- (GEN) In separazione, quando si porta indietro il restante, si aprono le paratie rulli subito. Ticket#2214
- (SIM-GEN) Se entrambe le morse sono restate in posizione, le sposto comunque di 5mm per distanziare i pezzi separati. Ticket#2206
Versione 2.6l2 (09/12/2024)
- (SIM-GEN) Corretto problema introdotto in 2.6l1 per risolvere #2198. Ticket#2203
- (SIM-GEN) In MLSE modificato controllo direzione utensile per determinare Z massima. Ticket#2204
Versione 2.6l1 (02/12/2024)
- (SIM) Dopo scarico pezzo per ribaltamento, si aprono sempre i rulli. Ticket#2192
- (SIM-GEN) Nei movimenti si ricalcola la Z solo se la quota di lavoro è più in alta della posizione a ZHOME della testa. Ticket#2198
- (GEN) Se bisogna andare in home, ma la testa lo è già, non si scrive nulla
Versione 2.6j3 (21/10/2024)
- (GEN) Se richiesto movimento in home, si scrive sempre parcheggio in home dell'utensile precedente. Prima si scriveva solo per lama.
Versione 2.6j2 (17/10/2024)
- (SIM-GEN) Se motosega prelevata con A=0, alla fine la si porta sempre alla quota ZMAX, indipendentemente dall'altezza trave che era fissata a 650mm. Ora lo fa sempre.
Versione 2.6j1 (08/10/2024)
- (SIM-GEN) Corretto primo movimento di approccio al pezzo. Ticket#2093
- (SIM-GEN) Corretto movimento in Home in caso di lama e movimento rulliera di carico. Ticket#2054
- (GEN) In caso di movimento in Home non si fa più preselezione ma si tiene utensile vecchio. Ticket#1926
Versione 2.6i2 (13/09/2024)
- (GEN) Migliorato calcolo chiusura paratia rulli con aggiornamento lunghezza della barra in caso di ultimo taglio e grezzo residuo in coda. Ticket#2017
- (NGE-MLDE-GEN-SIM) Aggiunto solidi collisione TC. Corretto movimento a Y di sicurezza con lama. Ticket#2042
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '2.6i2', -- versione script
VERSION = '2.7g4', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}