- Prima versione funzionante (DA VALIDARE!)

- Allineamento con common 2.6k1
- Pezzo massimo a 30metri
- Aggiunta aggregato foratore multiplo 6 uscite
This commit is contained in:
andrea.villa
2024-11-19 15:08:16 +01:00
parent 54f453c079
commit 31404c02bc
11 changed files with 463 additions and 281 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ local BeamData = {
SIMUL_VIEW_DIR = 1, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 1500, -- larghezza massima del grezzo
MAX_HEIGHT = 300, -- altezza massima del grezzo
MAX_WIDTH = 1505, -- larghezza massima del grezzo
MAX_HEIGHT = 605, -- altezza massima del grezzo
LEN_SHORT_PART = 1200, -- lunghezza massima pezzo piccolo
MAX_RAW = 20000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET)
STD_RAW = 14000, -- lunghezza standard della barra di grezzo
-80
View File
@@ -1,80 +0,0 @@
local Offsets = {
X1_NEG=-3675,
X1_POS=0,
PARK_X1=-250,
Z1_NEG=-1565,
Z1_POS=0,
PARK_Z1=-535,
PARK_SAWZ1=-150,
B1_NEG=-127,
B1_NEG1=-119,
B1_POS=127,
B1_POS1=119,
PARK_B1=-90,
PARK_SAWB1=0,
C1_NEG=-275,
C1_POS=275,
PARK_C1=-90,
PARK_SAWC1=-90,
PIVOT_T1=170.02,
X2_NEG=-3195,
X2_POS=0,
PARK_X2=-70,
Z2_NEG=-975,
Z2_POS=0,
PARK_Z2=-10,
B2_NEG=-127,
B2_NEG1=-119,
B2_POS=127,
B2_POS1=119,
PARK_B2=-90,
C2_NEG=-275,
C2_POS=275,
PARK_C2=-90,
PIVOT_T2=169.93,
MIN_Y1=378,
MAX_Y1=5771,
PARK_Y1=1036,
MIN_V1=10,
MAX_V1=670,
MIN_Y2=-5773,
MAX_Y2=-378,
PARK_Y2=-1036,
MIN_V2=-670,
MAX_V2=-10,
MIN_DELTAVY=375,
DIST_FTZERO=2224.25,
DELTA_CARICZERO=45,
DIST_UNLOAD=-2250,
OFFSETBLAMAT1=0,
OFFSETCLAMAT1=0,
OFFSETBLAMAT2=0,
OFFSETCLAMAT2=0,
OFFSETXT1=-1174.22,
OFFSETZT1=-1248.99,
OFFSETXT2=-2713.59,
OFFSETZT2=-528.29,
OFFSETZSOTTOTRAVE=1005,
SECONDSAW=1,
DOUBLE_HEAD_DOVETAIL=1,
DOUBLE_HEAD_MORTISE=1,
DOUBLE_HEAD_DRILLING=1,
}
local Trave = {
XMIN=30,
XMAX=1500,
ZMIN=30,
ZMAX=400,
}
local User = {
OPTIMIZATIONS_ENABLE_SLICES_F5=1,
OPTIMIZATIONS_ENABLE_SLICES_F6=1,
OPTIMIZATIONS_LENGTH_SLICES=100,
L020_DIAM_HOLE=12,
L040_OFFSET_P1=0,
}
local Machine = { Offsets=Offsets, Trave=Trave, User=User}
return Machine
+143 -43
View File
@@ -166,7 +166,7 @@ function OnDispositionStart()
' P15='..EmtLenToString( -DeltaTabY, 2)..' P16='..EmtLenToString( DeltaTabZ - MillOffs, 2)..
' P17='..EmtLenToString( Delta2TabY, 2)..' P18='..EmtLenToString( -Delta2TabZ - Mill2Offs, 2)
-- se è in configurazione a 3 teste
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
sOut = sOut .. ' P19='..EmtLenToString( -Delta3TabY, 2)..' P20='..EmtLenToString( Delta3TabZ - Mill3Offs, 2)..
' P21='..EmtLenToString( Mill3Offs, 2).. ' P22='.. EmtLenToString( -ParkInLavZ2, 2)
else
@@ -475,18 +475,18 @@ function OnMachiningEnd()
EmitRemark( 'PART UNLOAD')
elseif EMT.AUXTYPE == 'P' then
if EMT.PREROT then
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EmitRemark( 'PART ROTATION')
elseif EMT.FALL then
if EMT.TO_ZMAX and not EMT.ZMAX then
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EMT.TO_ZMAX = nil
end
EmitRemark( 'PART FALL')
else
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EmitRemark( 'PART SPLIT 2')
end
@@ -590,6 +590,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
@@ -883,13 +887,40 @@ function OnRapid()
end
-- eseguo movimenti
local Speed = EMT.S
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- se gruppo lama dedicato, senza cambio utensile
elseif EgtGetHeadId( 'H38') then
local B3Home = EgtGetAxisHomePos( 'B3')
local C3Home = EgtGetAxisHomePos( 'C3')
EmitMoveDataHead( 3, { X=SafeX3RotAxis, S=Speed})
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 3, { X=EMT.L2, S=Speed})
end
-- muovo in posizione finale
EmitMoveDataHead( 3, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- errore, testa non gestita
else
EmtSetLastError( 1212, "HEAD not managed")
end
end
-- dati aggancio a trave
local BhData = { T=EMT.L1, SetHead=0}
@@ -933,7 +964,7 @@ function OnRapid()
EmitParkedLines()
-- se sfrido grande, emetto comando speciale
if EMT.HOVM > 99 then
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
MyOutput( 'M107')
else
MyOutput( ';M107')
@@ -949,11 +980,11 @@ function OnRapid()
-- Allora salvo l'attuale e imposto il vecchio solo momentanemente, per poi ripristinarlo
local sBckTcPos = EMT.TCPOS
EMT.TCPOS = EMT.PREVTCPOSREAL_H2
EmitZmax( false, false, PrevR1, PrevR2)
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
EMT.TCPOS = sBckTcPos
EMT.R3_CHANGED = nil
else
EmitZmax( false, false, PrevR1, PrevR2)
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
end
EMT.ZMAX = true
EMT.TO_ZMAX = nil
@@ -991,7 +1022,7 @@ function OnRapid()
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut', 1, true) then
-- se sfrido grande, emetto comando speciale
if EMT.LB - EMT.LT > 99 then
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
MyOutput( 'M107')
else
MyOutput( ';M107')
@@ -1032,9 +1063,20 @@ function OnRapid()
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- caso standard
else
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
-- se ero in posizione speciale, prima ruoto poi scendo
if bXSpec then
local dZPos = max( HomeZ1, EMT.L3)
EmitMoveDataHead( 1, { Z=dZPos, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, S=Speed})
if abs( dZPos - EMT.L3) > 1 then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
else
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
end
end
-- altrimenti sega a catena
else
@@ -1178,20 +1220,43 @@ function OnRapid()
local HomeC3 = EgtGetAxisHomePos( 'C3')
local HomeB3 = EgtGetAxisHomePos( 'B3')
local Speed = EMT.S
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local CurrB3 = PrevR2
local CurrC3 = PrevR1
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, B=CurrB3, C=CurrC3, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, S=Speed})
end
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local CurrB3 = PrevR2
local CurrC3 = PrevR1
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, B=CurrB3, C=CurrC3, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, S=Speed})
end
EmitMoveDataHead( 3, { Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 3, { Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
end
-- se gruppo lama dedicato, senza cambio utensile
elseif EgtGetHeadId( 'H38') then
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local B3Home = EgtGetAxisHomePos( 'B3')
local C3Home = EgtGetAxisHomePos( 'C3')
EmitMoveDataHead( 3, { X=SafeX3RotAxis, S=Speed})
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 3, { X=EMT.L2, S=Speed})
end
end
-- muovo in posizione finale
EmitMoveDataHead( 3, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmtSetLastError( 1212, "HEAD not managed")
end
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
@@ -1338,7 +1403,7 @@ function OnRapid()
-- porto in home la testa corrente se lavorazione successiva sopra con testa diversa oppure se punta lunga
local nNextTopHSet = GetNextTopHSet( EMT.MCHID)
local bTopGoHome = ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome, false)
-- aggiorno quota finale trave dopo Zmax
EMT.L1o = EMT.TPOS
EMT.ZMAX = true
@@ -2350,11 +2415,12 @@ function GetHeadToolCode()
end
---------------------------------------------------------------------
function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome, bUsePrevDelta)
if bReset then
EmitResetMachining()
end
local nSetHead = GetHeadSet( EMT.HEAD)
local dXPos = EgtIf( bUsePrevDelta, EMT.L2pp or EMT.L2o, EMT.L2o)
-- se testa 1
if nSetHead == 1 then
-- posizioni sicure
@@ -2375,12 +2441,12 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
local dZref = dHomeZ1 + 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' or EMT.HEAD == 'H16') and ( abs( dHomeC1 - PrevR1) > 30.1 or abs( dHomeB1 - PrevR2) > 30.1) then
EmitMoveDataHead( 1, { Z=dMaxZ1, B=0, Fmt=1})
end
if EgtIf( BD.RIGHT_LOAD, ( EMT.L2 > -DeltaTabY), ( EMT.L2 < -DeltaTabY)) then
if EgtIf( BD.RIGHT_LOAD, ( -dXPos > -DeltaTabY), ( -dXPos < -DeltaTabY)) then
EmitMoveDataHead( 1, { X=-DeltaTabY, Fmt=1})
end
EmitMoveDataHead( 1, { C=dHomeC1, Fmt=1})
@@ -2426,8 +2492,8 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
else
EmitMoveDataHead( 2, { X=dHomeX2, Fmt=1})
end
-- solo se è macchina a 3 teste, devo stare più alto
if EgtGetHeadId( 'H31') then
-- solo se è macchina a 3 teste con gruppo truciolatore 4 assi, devo stare più alto
if EgtGetHeadId( 'H39') then
EmitMoveDataHead( 2, { Z=-ParkInLavZ2, Fmt=1})
end
EmitMoveStartHead( 2)
@@ -2438,11 +2504,36 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
local dMaxZ3 = EgtGetAxisMax( 'Z3')
local dHomeX3 = EgtGetAxisHomePos( 'X3')
local dHomeB3 = EgtGetAxisHomePos( 'B3')
-- eseguo la salita a Z3max
EmitMoveDataHead( 3, { Z=dMaxZ3, Fmt=1})
if bTopGoHome then
EmitMoveDataHead( 3, { X=-dHomeX3, B=dHomeB3, Fmt=1})
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
-- eseguo la salita a Z3max
EmitMoveDataHead( 3, { Z=dMaxZ3, Fmt=1})
if bTopGoHome then
EmitMoveDataHead( 3, { X=-dHomeX3, B=dHomeB3, Fmt=1})
end
-- se gruppo lama dedicato, senza cambio utensile
elseif EgtGetHeadId( 'H38') then
local dHomeC3 = EgtGetAxisHomePos( 'C3')
if RollerParkingNeeded( EMT.HEAD, PrevR1, PrevR2, dHomeC3, dHomeB3) then
local dPosT = EgtIf( bEnd, EMT.L1o, EMT.TPOS or EMT.L1op)
EmitParkRoller( dPosT, bSplitCut)
end
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( dHomeC3 - PrevR1) > 1 or abs( dHomeB3 - PrevR2) > 1 then
EmitMoveDataHead( 3, { X=SafeX3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { B=dHomeB3, C=dHomeC3, Fmt=1})
end
-- eseguo la salita a Z3max
EmitMoveDataHead( 3, { Z=dMaxZ3, Fmt=1})
if bTopGoHome then
EmitMoveDataHead( 3, { X=-dHomeX3, Fmt=1})
end
else
EmtSetLastError( 1212, "HEAD not managed")
end
EmitMoveStartHead( 3)
EmitMoveWaitHead( 3)
end
@@ -2667,8 +2758,10 @@ function PreselectNextDiffHead( nMchId, sHead)
else
-- se preselezione testa 1
if nNextHSet == 1 then
-- TC su montante destro
if nPrevTc == 1 then return
local nNextTc = GetTcForTopHeadTool( sNextTcPos) -- utensile da caricare
local nPrevTc = GetTcForTopHeadTool( EMT.PREVTCPOS_H1) -- utensile da depositare
-- se devo lasciare o prelevare da TC1 oppure non so cosa c'è montato, non posso preselezionare
if nNextTc == 1 or nPrevTc == 1 or nPrevTc == 0 then return
-- TC su montante sinistro
else
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
@@ -2688,8 +2781,15 @@ function PreselectNextDiffHead( nMchId, sHead)
-- faccio preselezione ( se sono arrivato qui, vuol dire che posso preselezionare)
if nNextHSet == 1 then
-- Recupero quota X1 (nostro L2)
local dNextX = GetStartMachiningXaxis( nNextMchId)
local dNextX
-- se sto lavorando con testa 3, la testa 1 deve restare in home
if nHSet == 3 then
dNextX = EgtGetAxisHomePos( 'X1')
-- altrimenti recupero quota X1 (nostro L2)
else
dNextX = GetStartMachiningXaxis( nNextMchId)
end
-- Emetto preselezione
if sNextHead == 'H11' then
if dNextTotLen < LongTool then
+104 -35
View File
@@ -76,10 +76,12 @@ function OnSimulStart()
if vTcPos then
for i = 1, #vTcPos do
local vTools = EgtGetToolsInCurrSetupPos( vTcPos[i])
if vTools and vTools[1] and #(vTools[1]) > 0 then
EgtLoadTool( vTcPos[i], 1, vTools[1])
ShowToolInTcPos( vTcPos[i], true)
for j = 1, #( vTools or {}) do
if vTools[j] ~= '' then
EgtLoadTool( vTcPos[i], j, vTools[j])
end
end
ShowToolInTcPos( vTcPos[i], true)
end
end
-- Carico gli utensili iniziali o di default sulle due teste
@@ -106,7 +108,7 @@ function OnSimulStart()
AddToCollisionCheck( 'X2', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C2', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'B2', 'COLLISION', EMT.COLLOBJ)
if EgtGetHeadId('H31') then
if IsHeadExisting( 3) then
AddToCollisionCheck( 'Z3', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C3', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'B3', 'COLLISION', EMT.COLLOBJ)
@@ -129,7 +131,7 @@ function OnSimulStart()
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'COL2'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM'}}
if EgtGetHeadId('H31') then
if IsHeadExisting( 3) then
table.insert( McdData, { Grp = 'X3', Sub = 'COLLISION', Name = 'STM'})
end
@@ -456,7 +458,7 @@ function OnSimulToolSelect( dPosA)
-- se fresa o lama su testa 1, reset assi rotanti
if nSetHead == 1 then
-- se ho la testa 3, la mando a parcheggio
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
EgtSetAxisPos( 'X3', ParkX3)
end
if EMT.HEAD == 'H12' or EMT.HEAD == 'H16' then
@@ -744,11 +746,19 @@ function OnSimulMachiningStart()
AddToolToCollisionObj( EMT.PREVTOOL_H2, EMT.PREVHEAD_H2, nPrevExit_H2, nInd_H2, true)
AddToolHolderToCollisionObj( EMT.PREVTOOL_H2, EMT.PREVHEAD_H2, nPrevExit_H2, nInd_H2 + 1)
end
if nSetHead ~= 3 and EgtGetHeadId( 'H31') then
if nSetHead ~= 3 and IsHeadExisting( 3) then
local nPrevExit_H3 = 1
local nInd_H3 = 1001
AddToolToCollisionObj( nil, 'H31', nPrevExit_H3, 1001)
AddToolHolderToCollisionObj( nil, 'H31', nPrevExit_H3, 1002)
local sHeadName
if EgtGetHeadId( 'H39') then
sHeadName = 'H39'
elseif EgtGetHeadId( 'H38') then
sHeadName = 'H38'
else
EmtSetLastError( 1212, "HEAD not managed")
end
AddToolToCollisionObj( nil, sHeadName, nPrevExit_H3, 1001)
AddToolHolderToCollisionObj( nil, sHeadName, nPrevExit_H3, 1002)
end
end
-- se precedente in doppio ma ora solo testa 1 e non in sicurezza
@@ -800,12 +810,12 @@ function OnSimulMachiningEnd()
EMT.PREVTCPOS_H2 = EMT.TCPOS
EMT.PREVTTOTLEN_H2 = EMT.TTOTLEN
EMT.PREVTCPOSREAL_H2 = EMT.TCPOSREAL
-- per gruppo testa 3 (resetto dati testa 1)
-- per gruppo testa 3
else
EMT.PREVTOOL_H3 = nil
EMT.PREVHEAD_H3 = nil
EMT.PREVTCPOS_H3 = nil
EMT.PREVTTOTLEN_H3 = nil
EMT.PREVTOOL_H3 = EMT.TOOL
EMT.PREVHEAD_H3 = EMT.HEAD
EMT.PREVTCPOS_H3 = EMT.TCPOS
EMT.PREVTTOTLEN_H3 = EMT.TTOTLEN
end
end
@@ -961,10 +971,21 @@ function OnSimulMoveStart()
if WriteAllCoordsOnFirstM101 then
SimulMoveAxis( 'X1', EgtIf( bXSpec, DeltaTabY, EMT.L2), MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
-- se ero in posizione speciale, prima ruoto poi scendo
if bXSpec then
local dZPos = max( Z1Home, EMT.L3)
SimulMoveAxis( 'Z1', dZPos, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT, 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
if abs( dZPos - EMT.L3) > 1 then
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
end
else
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
end
end
end
-- altrimenti sega a catena
@@ -1022,6 +1043,10 @@ function OnSimulMoveStart()
end
end
else
-- solo se è macchina a 3 teste con gruppo truciolatore 4 assi, devo andare prima in Z0
if EgtGetHeadId( 'H39') then
SimulMoveAxis( 'Z2', Z2Home, MCH_SIM_STEP.RAPID)
end
-- Porto la X alla giusta quota
if EMT.ZMAX and X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID)
@@ -1036,7 +1061,34 @@ function OnSimulMoveStart()
end
-- altrimenti testa 3
else
; -- non devo fare alcunchè di speciale
-- testa 4 assi dedicata truciolatore
if EgtGetHeadId( 'H39') then
if EMT.ZMAX then
local MaxZ3 = EgtGetAxisMax( 'Z3')
SimulMoveAxes( 'X3', EMT.L2, MCH_SIM_STEP.RAPID, 'Z3', MaxZ3, MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'Z3', EMT.L3, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B3', EMT.R2, MCH_SIM_STEP.COLLROT, 'C3', EMT.R1, MCH_SIM_STEP.COLLROT)
-- testa 5 assi dedicata lama
elseif EgtGetHeadId( 'H38') then
if EMT.ZMAX then
local B3Home = EgtGetAxisHomePos( 'B3')
local C3Home = EgtGetAxisHomePos( 'C3')
SimulMoveAxis( 'X3', SafeX3RotAxis, MCH_SIM_STEP.RAPID)
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
SimulMoveAxis( 'Z3', SafeZ3RotAxis, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B3', EMT.R2, MCH_SIM_STEP.COLLROT, 'C3', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'Z3', EMT.L3, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'X3', EMT.L2, MCH_SIM_STEP.RAPID)
end
end
-- si muovono tutti gli assi assieme
-- altre configurazioni
else
EmtSetLastError( 1212, "HEAD not managed")
end
end
end
-- se lavorazione split, muovo per riaggancio del carro Y1
@@ -1375,13 +1427,15 @@ end
function ExecMoveHome( bNearV, bMchSplit)
-- risalita a Zmax
ExecMoveZmax( bMchSplit)
-- se testa sotto e macchian a 3 teste
if GetHeadSet( EMT.HEAD) == 2 and EgtGetHeadId( 'H31') then
-- se testa sotto e macchian a 3 teste e gruppo truciolatore a 4 assi
if GetHeadSet( EMT.HEAD) == 2 and IsHeadExisting( 3) then
if not SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID) then
EgtOutLog( 'Error on MoveHome : X2')
end
if not SimulMoveAxis( 'Z2', ParkInLavZ2, MCH_SIM_STEP.RAPID) then
EgtOutLog( 'Error on MoveHome : X2')
if EgtGetHeadId( 'H39') then
if not SimulMoveAxis( 'Z2', ParkInLavZ2, MCH_SIM_STEP.RAPID) then
EgtOutLog( 'Error on MoveHome : Z2')
end
end
end
EMT.TO_ZMAX = nil
@@ -1401,15 +1455,15 @@ function ExecMoveZmax( bMchSplit)
-- set della testa
local nSetHead = GetHeadSet( EMT.HEAD)
-- 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( 'X'..nSetHead)
local CurrZ = EgtGetAxisPos( 'Z'..nSetHead)
local CurrC = EgtGetAxisPos( 'C'..nSetHead)
local CurrB = EgtGetAxisPos( 'B'..nSetHead)
-- 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( 'X'..nSetHead)
local HomeZ = EgtGetAxisHomePos( 'Z'..nSetHead)
local HomeC = EgtGetAxisHomePos( 'C'..nSetHead)
local HomeB = EgtGetAxisHomePos( 'B'..nSetHead)
-- 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
@@ -1466,14 +1520,27 @@ function ExecMoveZmax( bMchSplit)
else
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
-- solo se è macchina a 3 teste, devo stare più alto
if EgtGetHeadId( 'H31') then
-- solo se è macchina a 3 teste con gruppo truciolatore 4 assi, devo stare più alto
if EgtGetHeadId( 'H39') then
SimulMoveAxis( 'Z2', ParkInLavZ2, MCH_SIM_STEP.RAPID)
end
-- altrimenti testa 3
else
SimulMoveAxes( 'Z3', MaxZ3, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B3', ParkB3, MCH_SIM_STEP.COLLROT)
if EgtGetHeadId( 'H39') then
SimulMoveAxes( 'Z3', MaxZ3, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B3', ParkB3, MCH_SIM_STEP.COLLROT)
elseif EgtGetHeadId( 'H38') then
local MyMaxZ3 = EgtGetAxisMax( 'Z3')
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( HomeC - CurrC) > 1 or abs( HomeB - CurrB) > 1 then
SimulMoveAxis( 'X3', SafeX3RotAxis, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'Z3', SafeZ3RotAxis, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'C3', HomeC, MCH_SIM_STEP.COLLROT, 'B3', HomeB, MCH_SIM_STEP.COLLROT)
end
SimulMoveAxis( 'Z3', MyMaxZ3, MCH_SIM_STEP.RAPID)
else
EmtSetLastError( 1212, "HEAD not managed")
end
end
EMT.ZMAX = true
end
@@ -2496,6 +2563,8 @@ function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2)
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
elseif sHead == 'H21' or sHead == 'H22' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
elseif sHead == 'H38' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
end
end
+13 -2
View File
@@ -54,6 +54,9 @@ function OnSpecialGetMaxZ()
elseif nSetHead == 2 then
EMC.R1p = ParkC2
EMC.R2p = ParkB2
elseif nSetHead == 3 then
EMC.R1p = ParkC3
EMC.R2p = ParkB3
end
end
local vtT = Vector3d( EMC.TDIR)
@@ -111,6 +114,8 @@ function OnSpecialGetMaxZ()
local vMZ = {{ Tz=0.85, Ez=390}, { Tz=0.5, Ez=280}, { Tz=-0.01, Ez=160}}
EMC.MAXZ = ParkZ2 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H38' then
EMC.MAXZ = SafeZ3RotAxis
end
end
@@ -135,7 +140,7 @@ function OnSpecialMoveZup()
if EMC.HEAD == 'H11' or EMC.HEAD == 'H21' or EMC.HEAD == 'H22' then
;
-- se lama
else
elseif EMC.HEAD == 'H12' or EMC.HEAD == 'H16' then
-- riporto i valori tra -179 e + 180
local dCheckAxR1 = EMC.R1
if dCheckAxR1 < -180 then
@@ -180,6 +185,12 @@ function OnSpecialMoveZup()
end
end
end
elseif EMC.HEAD == 'H38' then
EMC.L3 = SafeZ3RotAxis
-- dichiaro modificato
EMC.MODIF = true
else
; -- non si fa nulla
end
end
@@ -895,7 +906,7 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
EgtSetAxisPos( 'A2', vAxMid[6])
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C2'), GDB_BB.ONLY_VISIBLE)
else -- 'H31'
else -- testa 3
EgtSetAxisPos( 'C3', vAxMid[4])
EgtSetAxisPos( 'B3', vAxMid[5])
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C3'), GDB_BB.ONLY_VISIBLE)
+3 -1
View File
@@ -49,6 +49,8 @@ ExitScript=ExitMach.lua
H11=6608
; 5 axis saw
H12=6615
; Drilling group
H14=6612
; Second 5 axis saw
H16=6623
; Chainsaw
@@ -58,7 +60,7 @@ H21=6620
; Second 5 axis bottom saw
H22=6628
; 5 axis head
H31=6608
H38=6615
[SetUp]
Default=Standard
+137 -59
View File
@@ -5,8 +5,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6j1'
PP_NVER = '2.6.10.1'
PP_VER = '2.6k2'
PP_NVER = '2.6.11.2'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF1500MAXrl-3T'
@@ -77,7 +77,7 @@ Mill3Offs = 163.0
MinX1 = 0
MaxX1 = 4750
MinZ1 = -1850
MaxZ1 = -50
MaxZ1 = 0
MaxZ1Blade = -100
MinC1 = -275
MaxC1 = 275
@@ -113,13 +113,18 @@ MinZ1ToChangeH2 = -1400
MinZ3 = -1550
MaxZ3 = 0
MinX3 = 0
MaxX3 = 3300
MaxX3 = 4000
MinC3 = -181
MaxC3 = 181
MinB3 = 0
MaxB3 = 180
ParkX3 = 0
ParkZ3 = 0
ParkC3 = 0
ParkB3 = 0
MinX2 = -2760
SafeX3RotAxis = 1300
SafeZ3RotAxis = -600
MinX2 = -3060
MaxX2 = 0
MinZ2 = 0
MaxZ2 = 1450
@@ -148,7 +153,7 @@ DeltaTabY = 1915.5
DeltaTabZ = -1491.0 + MillOffs -- per TPA : -1228.0 + MillOffs -- per NUM : -1058.0
DeltaRulliTraveZ = -1266
DimTabY = 1600
DimTabX = 24000
DimTabX = 30000
Delta2TabY = -2907.4
Delta2TabZ = 693.0 - Mill2Offs -- per TPA : 543.0 - Mill2Offs -- per NUM : 373.0
Delta3TabY = 1915.5
@@ -165,9 +170,11 @@ CoeffVM = 0.5
MinForzaPinze = 400 -- [Kgf]
MaxForzaPinze = 1000 -- [Kgf]
Tc2Active = true
FirstSaw = false
SecondSaw = true
SecondChain = true -- magazzino seconda sega a catena
TcSpecialTools = true -- magarzzino per utensili speciali. In genere truciolatore
TcSpecialTools = true -- magazzino per utensili speciali. In genere truciolatore
DrillingAggregate = true -- aggregato foratura multipla dipende dal magazzino utensili speciali. Viene montato li
TcAggreBladeUnder = true -- lama su aggregato per testa da sotto
EmitAccClamps = true
WriteAllCoordsOnFirstM101 = true
@@ -185,7 +192,7 @@ if EgtExistsFile( sTs3Data) then
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if false and EgtExistsFile( sDataBeam) then
if EgtExistsFile( sDataBeam) then
local Machine = dofile( sDataBeam)
if Machine then
if Machine.Offsets then
@@ -267,7 +274,7 @@ if false and EgtExistsFile( sDataBeam) then
if Machine.Offsets.MAXPRESS then MaxForzaPinze = Machine.Offsets.MAXPRESS end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.MOTORS23KW then Motors23KW = Machine.Offsets.MOTORS23KW end
if Machine.Offsets.MOTORS23KW then Motors23KW = Machine.Offsets.MOTORS23KW == 1 end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
@@ -279,7 +286,7 @@ if false and EgtExistsFile( sDataBeam) then
ParkV2 = MinV2
ParkY2 = ParkV2 - MinDeltaYV
UnloadSmT = UnloadT - 300
MaxZ1Blade = min( MaxZ1Blade, MaxZ1)
MaxZ1Blade = min( MaxZ1Blade, -100)
ParkX1 = EgtClamp( ParkX1, MinX1, MaxX1)
ParkTc1X1 = EgtClamp( ParkTc1X1, MinX1, MaxX1)
ParkZ1 = EgtClamp( ParkZ1, MinZ1, MaxZ1)
@@ -380,19 +387,21 @@ local H11Id = EmtHead {
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H11_HEAD/GEO'}
-- Lama
local H12Id = EmtHead {
Name = 'H12',
Parent = 'B1',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d( SawOffsX, SawOffsY, SawOffsZ),
TDir = Vector3d( 0, sin( SawB1Offs), cos( SawB1Offs)),
ADir = -X_AX(),
Rot1W = 0.5,
Rot2Stroke = { MinB1b, MaxB1b},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H12_HEAD/GEO'}
EgtSetInfo( H12Id, 'ZMAXONROT', '1,190')
if FirstSaw then
local H12Id = EmtHead {
Name = 'H12',
Parent = 'B1',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d( SawOffsX, SawOffsY, SawOffsZ),
TDir = Vector3d( 0, sin( SawB1Offs), cos( SawB1Offs)),
ADir = -X_AX(),
Rot1W = 0.5,
Rot2Stroke = { MinB1b, MaxB1b},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H12_HEAD/GEO'}
EgtSetInfo( H12Id, 'ZMAXONROT', '1,190')
end
-- Lama 2
if SecondSaw then
local H16Id = EmtHead {
@@ -435,6 +444,35 @@ local H13Id = EmtHead {
Geo = 'H13_HEAD/GEO'}
EgtSetInfo( H13Id, 'ZSAFEDELTA', '60')
EgtSetInfo( H13Id, 'ZMAXONROT', '1,80')
-- Eventuale rinvio angolare
if DrillingAggregate then
local H14Id = EmtHead {
Name = 'H14',
Parent = 'A1',
HSet = 'H11',
Type = MCH_HT.MULTI,
ExitNbr = 6,
Pos1 = Point3d( 0, 0, -206),
TDir1 = Z_AX(),
Pos2 = Point3d( -40, 0, -206),
TDir2 = Z_AX(),
Pos3 = Point3d( -80, 0, -206),
TDir3 = Z_AX(),
Pos4 = Point3d( 40, 0, -206),
TDir4 = Z_AX(),
Pos5 = Point3d( 80, 0, -206),
TDir5 = Z_AX(),
Pos6 = Point3d( 120, 0, -206),
TDir6 = Z_AX(),
ADir = X_AX(),
Rot1W = 0.2,
Rot2Stroke = { -91, 90},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H14_HEAD/GEO',
Aux = {'H14_HEAD/SOLID', 'H14_HEAD/COLLISION'}}
end
-- *** Testa 3 ***
local X3Id = EmtAxis {
Name = 'X3',
@@ -442,7 +480,7 @@ local X3Id = EmtAxis {
Token = 'X',
Type = MCH_AT.LINEAR,
Dir = Y_AX(),
Pos = Point3d( -163, 0, 109.0),
Pos = Point3d( 207, -300, 104),
Stroke = {MinX3, MaxX3},
Home = ParkX3,
Invert = true,
@@ -454,7 +492,7 @@ local Z3Id = EmtAxis {
Token = 'Z',
Type = MCH_AT.LINEAR,
Dir = Z_AX(),
Pos = Point3d( 0, 0, -140),
Pos = Point3d( 0, -140, 563),
Stroke = {MinZ3, MaxZ3},
Home = ParkZ3,
Geo = 'Z3_AXIS/GEO',
@@ -466,7 +504,7 @@ local C3Id = EmtAxis {
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d( Head3X+163, Head3Y, 503.0),
Stroke = {-181, 1},
Stroke = {MinC3, MaxC3},
Home = 0,
Geo = 'C3_AXIS/GEO',
Aux = {'C3_AXIS/SOLID', 'C3_AXIS/COLLISION'}}
@@ -492,16 +530,17 @@ EgtMove( EgtGetFirstNameInGroup( B3Id, 'SOLID'), vtMoveZ3, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B3Id, 'COLLISION'), vtMoveZ3, GDB_RT.GLOB)
-- Frese
local H31Id = EmtHead {
Name = 'H31',
Name = 'H38',
Parent = 'B3',
HSet = 'H31',
HSet = 'H38',
Type = MCH_HT.STD,
Pos = Point3d( Head3X, Head3Y, Head3Z),
TDir = X_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB1, MaxB1},
Rot2Stroke = {MinB3, MaxB3},
OthColl = {'B3/SOLID', 'C3/SOLID'},
Geo = 'H31_HEAD/GEO'}
Geo = 'H38_HEAD/GEO'}
-- *** Testa 2 ***
local Z2Id = EmtAxis {
Name = 'Z2',
@@ -711,7 +750,7 @@ EmtAxis {
Type = MCH_AT.LINEAR,
Dir = - X_AX(),
Pos = Point3d(0.0,2450.0,-958.0),
Stroke = {-20000, 20000},
Stroke = {-30000, 30000},
Home = LoadT,
Geo = 'T_AXIS/GEO'}
EmtTable {
@@ -722,12 +761,12 @@ EmtTable {
Geo = 'TABLE/GEO',
Aux = 'TABLE/SOLID'}
-- *** ToolChanger ***
local ptTc1 = Point3d( 150, 351, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc1 = Point3d( 150, 351, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
local vtDt1 = Vector3d( 0, 0, - 102.5)
EmtTcPos {
Name = 'T1',
Parent = 'Base',
Pos = ptTc1 + Vector3d( SawOffsX, SawOffsZ, 0),
Pos = ptTc1 + EgtIf( FirstSaw, Vector3d( SawOffsX, SawOffsZ, 0), V_NULL()),
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T1'}
@@ -817,7 +856,7 @@ EmtTcPos {
Geo = 'BASE/T13'}
if Tc2Active then
local ptTc2 = Point3d( 150, 5018.75, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc2 = Point3d( 150, 5018.75, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
local vtDt2 = Vector3d( 0, 0, - 102.5)
EmtTcPos {
Name = 'T21',
@@ -890,7 +929,7 @@ if Tc2Active then
ADir = X_AX(),
Geo = 'BASE/T30'}
end
local ptTc3 = Point3d( 600, 1031, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc3 = Point3d( 600, 1031, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T101',
Parent = 'Base',
@@ -898,7 +937,7 @@ EmtTcPos {
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
local ptTc4 = Point3d( 750, 1411, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc4 = Point3d( 750, 1411, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T111',
Parent = 'Base',
@@ -906,15 +945,28 @@ EmtTcPos {
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111'}
local ptTc5 = Point3d( 750, 1811, -115 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc5 = Point3d( 750, 1811, -321 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T121',
Parent = 'Base',
Pos = ptTc5,
TDir = Z_AX(),
Type = MCH_HT.MULTI,
ExitNbr = 6,
Pos1 = ptTc5 + Vector3d( 0, 0, 0),
TDir1 = Z_AX(),
Pos2 = ptTc5 + Vector3d( -40, 0, 0),
TDir2 = Z_AX(),
Pos3 = ptTc5 + Vector3d( -80, 0, 0),
TDir3 = Z_AX(),
Pos4 = ptTc5 + Vector3d( 40, 0, 0),
TDir4 = Z_AX(),
Pos5 = ptTc5 + Vector3d( 80, 0, 0),
TDir5 = Z_AX(),
Pos6 = ptTc5 + Vector3d( 120, 0, 0),
TDir6 = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T121'}
local ptTcS = Point3d( -1, 369.75, -1675 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
Geo = 'BASE/T121',
Aux = 'BASE/T121_HS'}
local ptTcS = Point3d( -1, 369.75, -1675 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T201',
Parent = 'Base',
@@ -922,7 +974,7 @@ EmtTcPos {
TDir = -Z_AX(),
ADir = Y_AX(),
Geo = 'BASE/T201'}
local ptTcR = Point3d( -0.5, 5202, -1973 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTcR = Point3d( -0.5, 5202, -1973 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T220',
Parent = 'Base',
@@ -1003,22 +1055,23 @@ EmtTcPos {
-- Aggiusto posizioni geometriche
local vtMovB = Vector3d( 0, 0, ( DeltaTabZ - DeltaRulliTraveZ + 55))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SOLID'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SIGN') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC1') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC2') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB) end
if SecondChain then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'COLLISION'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SIGN') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC1') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC2') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
if SecondChain then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'T121') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'COLLISION'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Z1Id, 'SOLID'), vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Z1Id, 'COLLISION'), vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'SOLID'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'COLLISION'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'COLLISION'), vtMovB, GDB_RT.GLOB)
local vtMove = Vector3d( 0, ( DeltaTabY - 1915.5), ( DeltaTabZ + 1321.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'..sGeomConvoyer), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
@@ -1115,6 +1168,8 @@ function OnSetHead()
else
EmtModifyAxisStroke( 'B2', {MinB2, MaxB2})
end
elseif EMC.HEAD == 'H38' then
;
end
end
@@ -1136,10 +1191,12 @@ end
---------------------------------------------------------------------
function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H14' or sHead == 'H16' then
return 1
elseif sHead == 'H21' or sHead == 'H22' then
return 2
elseif sHead == 'H39' or sHead == 'H38' then
return 3
else
return 0
end
@@ -1174,6 +1231,20 @@ function GetHeadSetFromTcPos( sTcPos)
return 0, 0
end
---------------------------------------------------------------------
-- Funzione che ritorna bool per dire se esiste o meno al testa richiesta
function IsHeadExisting( nHeadSet)
if nHeadSet == 1 then
return H11Id ~= nil
elseif nHeadSet == 2 then
return H21Id ~= nil
elseif nHeadSet == 3 then
return H31Id ~= nil
else
return ''
end
end
---------------------------------------------------------------------
-- Funzione che ritorna il nome della testa in base alla posizione utensile (ATT: deve rispecchiare il setup)
function GetAdjHeadFromTcPos( nHeadSet, sTcPos)
@@ -1183,7 +1254,11 @@ function GetAdjHeadFromTcPos( nHeadSet, sTcPos)
return 'H16'
-- utensili speciali
elseif TcSpecialTools and sTcPos == 'T121' then
return 'H11'
if DrillingAggregate then
return 'H14'
else
return 'H11'
end
-- motoseghe
elseif sTcPos == 'T101' or sTcPos == 'T111' then
return 'H13'
@@ -1200,7 +1275,7 @@ function GetAdjHeadFromTcPos( nHeadSet, sTcPos)
return 'H21'
end
elseif nHeadSet == 3 then
return 'H31'
return 'H38'
else
return ''
end
@@ -1303,6 +1378,9 @@ function GetZExtra( sHead, dAngV)
else
return 0
end
-- altri casi
else
return 0
end
end
Binary file not shown.
+44 -54
View File
@@ -34,8 +34,9 @@ local SecondSaw = ( EgtGetHeadId( 'H16') ~= nil)
local SecondChain = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC4') ~= nil)
local TcSpecialTools = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC5') ~= nil)
local TcAggreBladeUnder = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TCS') ~= nil)
local DrillingAggregate = ( EgtGetHeadId( 'H14') ~= nil)
local bFullOpt = bTc2Active and SecondSaw and SecondChain and TcSpecialTools and TcAggreBladeUnder -- se ha tutti gli optional attivati
local bFullOpt = bTc2Active and FirstSaw and SecondSaw and SecondChain and TcSpecialTools and TcAggreBladeUnder and DrillingAggregate -- se ha tutti gli optional attivati
if bFullOpt then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"}, -- TC 1
{Pos = "Pos2", TcPos = "T2", Head = "H11", Group = "G1"},
@@ -52,7 +53,7 @@ if bFullOpt then
{Pos = "Pos13", TcPos = "T13", Head = "H11", Group = "G1"},
{Pos = "Pos14", TcPos = "T101", Head = "H13", Group = "G2"}, -- motosega
{Pos = "Pos15", TcPos = "T111", Head = "H13", Group = "G2"}, -- motosega 2
{Pos = "Pos16", TcPos = "T121", Head = "H11", Group = "G2"}, -- utensile speciale
{Pos = "Pos16", TcPos = "T121", Head = "H14", Group = "G2"}, -- utensile speciale
{Pos = "Pos17", TcPos = "T21", Head = "H16", Group = "G3"}, -- TC 2
{Pos = "Pos18", TcPos = "T22", Head = "H11", Group = "G3"},
{Pos = "Pos19", TcPos = "T23", Head = "H11", Group = "G3"},
@@ -75,58 +76,47 @@ if bFullOpt then
{Pos = "Pos36", TcPos = "T228", Head = "H21", Group = "G4"},
{Pos = "Pos37", TcPos = "T229", Head = "H21", Group = "G4"},
{Pos = "Pos38", TcPos = "T230", Head = "H21", Group = "G4"},
{Pos = "Pos39", TcPos = "T301", Head = "H31", Group = "G5"}}
elseif bTc2Active then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"},
{Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"},
{Pos = "Pos3", TcPos = "T4", Head = "H11", Group = "G1"},
{Pos = "Pos4", TcPos = "T5", Head = "H11", Group = "G1"},
{Pos = "Pos5", TcPos = "T6", Head = "H11", Group = "G1"},
{Pos = "Pos6", TcPos = "T7", Head = "H11", Group = "G1"},
{Pos = "Pos7", TcPos = "T8", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T9", Head = "H11", Group = "G1"},
{Pos = "Pos9", TcPos = "T10", Head = "H11", Group = "G1"},
{Pos = "Pos10", TcPos = "T101",Head = "H13", Group = "G2"},
{Pos = "Pos11", TcPos = "T11", Head = "H11", Group = "G3"},
{Pos = "Pos12", TcPos = "T12", Head = "H11", Group = "G3"},
{Pos = "Pos13", TcPos = "T13", Head = "H11", Group = "G3"},
{Pos = "Pos14", TcPos = "T14", Head = "H11", Group = "G3"},
{Pos = "Pos15", TcPos = "T15", Head = "H11", Group = "G3"},
{Pos = "Pos16", TcPos = "T20", Head = "H21", Group = "G4"},
{Pos = "Pos17", TcPos = "T21", Head = "H21", Group = "G4"},
{Pos = "Pos18", TcPos = "T22", Head = "H21", Group = "G4"},
{Pos = "Pos19", TcPos = "T23", Head = "H21", Group = "G4"},
{Pos = "Pos20", TcPos = "T24", Head = "H21", Group = "G4"},
{Pos = "Pos21", TcPos = "T25", Head = "H21", Group = "G4"},
{Pos = "Pos22", TcPos = "T26", Head = "H21", Group = "G4"},
{Pos = "Pos23", TcPos = "T27", Head = "H21", Group = "G4"},
{Pos = "Pos24", TcPos = "T28", Head = "H21", Group = "G4"},
{Pos = "Pos25", TcPos = "T29", Head = "H21", Group = "G4"},
{Pos = "Pos26", TcPos = "T30", Head = "H21", Group = "G4"},
{Pos = "Pos27", TcPos = "T301", Head = "H31", Group = "G4"}}
else
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"},
{Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"},
{Pos = "Pos3", TcPos = "T4", Head = "H11", Group = "G1"},
{Pos = "Pos4", TcPos = "T5", Head = "H11", Group = "G1"},
{Pos = "Pos5", TcPos = "T6", Head = "H11", Group = "G1"},
{Pos = "Pos6", TcPos = "T7", Head = "H11", Group = "G1"},
{Pos = "Pos7", TcPos = "T8", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T9", Head = "H11", Group = "G1"},
{Pos = "Pos9", TcPos = "T10", Head = "H11", Group = "G1"},
{Pos = "Pos10", TcPos = "T101",Head = "H13", Group = "G2"},
{Pos = "Pos11", TcPos = "T20", Head = "H21", Group = "G3"},
{Pos = "Pos12", TcPos = "T21", Head = "H21", Group = "G3"},
{Pos = "Pos13", TcPos = "T22", Head = "H21", Group = "G3"},
{Pos = "Pos14", TcPos = "T23", Head = "H21", Group = "G3"},
{Pos = "Pos15", TcPos = "T24", Head = "H21", Group = "G3"},
{Pos = "Pos16", TcPos = "T25", Head = "H21", Group = "G3"},
{Pos = "Pos17", TcPos = "T26", Head = "H21", Group = "G3"},
{Pos = "Pos18", TcPos = "T27", Head = "H21", Group = "G3"},
{Pos = "Pos19", TcPos = "T28", Head = "H21", Group = "G3"},
{Pos = "Pos20", TcPos = "T29", Head = "H21", Group = "G3"},
{Pos = "Pos21", TcPos = "T30", Head = "H21", Group = "G3"},
{Pos = "Pos22", TcPos = "T301", Head = "H31", Group = "G4"}}
{Pos = "Pos39", TcPos = "T301", Head = "H38", Group = "G5"}}
elseif bTc2Active and SecondSaw and SecondChain and TcSpecialTools and TcAggreBladeUnder and DrillingAggregate then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H11", Group = "G1"}, -- TC 1
{Pos = "Pos2", TcPos = "T2", Head = "H11", Group = "G1"},
{Pos = "Pos3", TcPos = "T3", Head = "H11", Group = "G1"},
{Pos = "Pos4", TcPos = "T4", Head = "H11", Group = "G1"},
{Pos = "Pos5", TcPos = "T5", Head = "H11", Group = "G1"},
{Pos = "Pos6", TcPos = "T6", Head = "H11", Group = "G1"},
{Pos = "Pos7", TcPos = "T7", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T8", Head = "H11", Group = "G1"},
{Pos = "Pos9", TcPos = "T9", Head = "H11", Group = "G1"},
{Pos = "Pos10", TcPos = "T10", Head = "H11", Group = "G1"},
{Pos = "Pos11", TcPos = "T11", Head = "H11", Group = "G1"},
{Pos = "Pos12", TcPos = "T12", Head = "H11", Group = "G1"},
{Pos = "Pos13", TcPos = "T13", Head = "H11", Group = "G1"},
{Pos = "Pos14", TcPos = "T101", Head = "H13", Group = "G2"}, -- motosega
{Pos = "Pos15", TcPos = "T111", Head = "H13", Group = "G2"}, -- motosega 2
{Pos = "Pos16", TcPos = "T121", Head = "H14", Group = "G2"}, -- utensile speciale
{Pos = "Pos17", TcPos = "T21", Head = "H16", Group = "G3"}, -- TC 2
{Pos = "Pos18", TcPos = "T22", Head = "H11", Group = "G3"},
{Pos = "Pos19", TcPos = "T23", Head = "H11", Group = "G3"},
{Pos = "Pos20", TcPos = "T24", Head = "H11", Group = "G3"},
{Pos = "Pos21", TcPos = "T25", Head = "H11", Group = "G3"},
{Pos = "Pos22", TcPos = "T26", Head = "H11", Group = "G3"},
{Pos = "Pos23", TcPos = "T27", Head = "H11", Group = "G3"},
{Pos = "Pos24", TcPos = "T28", Head = "H11", Group = "G3"},
{Pos = "Pos25", TcPos = "T29", Head = "H11", Group = "G3"},
{Pos = "Pos26", TcPos = "T30", Head = "H11", Group = "G3"},
{Pos = "Pos27", TcPos = "T201", Head = "H22", Group = "G4"}, -- lama con aggregatop da sotto
{Pos = "Pos28", TcPos = "T220", Head = "H21", Group = "G4"}, -- TC margherita
{Pos = "Pos29", TcPos = "T221", Head = "H21", Group = "G4"},
{Pos = "Pos30", TcPos = "T222", Head = "H21", Group = "G4"},
{Pos = "Pos31", TcPos = "T223", Head = "H21", Group = "G4"},
{Pos = "Pos32", TcPos = "T224", Head = "H21", Group = "G4"},
{Pos = "Pos33", TcPos = "T225", Head = "H21", Group = "G4"},
{Pos = "Pos34", TcPos = "T226", Head = "H21", Group = "G4"},
{Pos = "Pos35", TcPos = "T227", Head = "H21", Group = "G4"},
{Pos = "Pos36", TcPos = "T228", Head = "H21", Group = "G4"},
{Pos = "Pos37", TcPos = "T229", Head = "H21", Group = "G4"},
{Pos = "Pos38", TcPos = "T230", Head = "H21", Group = "G4"},
{Pos = "Pos39", TcPos = "T301", Head = "H38", Group = "G5"}}
end
local UsePositionHead = true
+12
View File
@@ -1,5 +1,17 @@
==== Common_PF1250 Update Log ====
Versione 2.6k1 (04/11/2024)
- (SIM-GEN) Gestione terza testa 5 assi dedicata lama (H38)
Versione 2.6j3 (25/10/2024)
- (GEN) Piccola correzione per capire se testa 3 presente
- (SIM-GEN) In caso di lavorazione successiva alla prima, rivisto primo posizionamento alla quota Z di lavoro se precedentemente spostati a quota rotazione assi rotanti.
Versione 2.6j2 (23/10/2024)
- (MLDE-SIM) Aggiunto parametro ParkTc1X1 in MLDE per simulazione quota parcheggio Testa 1 su TC1.
- (SIM-GEN) Per movimento a ZMAX si considera utensile attuale o precedente
- (SIM-GEN) Prima versione con gestione testa 3 dedicata lama
Versione 2.6j1 (01/10/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-SIM) Aggiunta gestione solidi collisione per TC verticali e TC rotante sotto
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '2.6j1', -- versione script
VERSION = '2.6k1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}