Compare commits

...

15 Commits

Author SHA1 Message Date
luca.mazzoleni d0f062ab32 Cambio di versione 2025-08-05 15:14:33 +02:00
luca.mazzoleni 26b673fc83 Allineamento con common test V1OpenOnTailCut 2025-08-05 15:11:23 +02:00
luca.mazzoleni 5a681e3d60 Merge branch 'master' into develop 2025-08-05 09:27:22 +02:00
andrea.villa f876850772 - Allineamento con common ver. 2.7g4
- Aggiunto parametro MaxBackClamp5
2025-07-23 12:23:10 +02:00
andrea.villa 4d7297c498 Allineamento con common ver. 2.7g3 2025-07-22 11:20:15 +02:00
andrea.villa 9c358734ba Allineamento con common ver. 2.7g2 2025-07-08 10:38:08 +02:00
andrea.villa 88691bddcc Nome macchian ricavata da percorso 2025-07-01 10:26:48 +02:00
andrea.villa b633dc4349 Allineamento con common ver. 2.7g1 2025-07-01 10:23:04 +02:00
andrea.villa c443adc95b Allineamento con Common ver. 2.7e1 2025-05-28 12:36:31 +02:00
andrea.villa 0f18e03948 - Allineamento con common ver. 2.7d1
- Aggiornamento MachNotes
2025-04-28 13:32:49 +02:00
luca.mazzoleni d8793d5a7a - update GetSetupInfo per includere bIsCSymmetrical e dMaxMatDecrease 2025-04-10 09:08:17 +02:00
andrea.villa deccc61aa1 #critical# Allineamento con common 2.7c3 2025-03-25 17:40:17 +01:00
andrea.villa d609a50996 Allineamento con common ver. 2.7c2 2025-03-12 08:32:29 +01:00
andrea.villa 8d01762144 Allineamento con common ver. 2.7c1 2025-03-05 11:52:55 +01:00
luca.mazzoleni ea4c237ab9 - modificata GetSetupInfo 2025-02-28 09:24:48 +01:00
9 changed files with 219 additions and 108 deletions
+22 -7
View File
@@ -108,6 +108,13 @@ if EgtExistsFile( sData) then
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER
BeamData.LONGCUT_ENDLEN = Machine.Offsets.LONGCUT_ENDLEN or BeamData.LONGCUT_ENDLEN
BeamData.LONGCUT_MAXLEN = Machine.Offsets.LONGCUT_MAXLEN or BeamData.LONGCUT_MAXLEN
BeamData.ADVANCE_TAIL_OFFS = Machine.Offsets.ADVANCE_TAIL_OFFS or BeamData.ADVANCE_TAIL_OFFS
BeamData.LEN_VERY_SHORT_PART = Machine.Offsets.LEN_VERY_SHORT_PART or BeamData.LEN_VERY_SHORT_PART
BeamData.LEN_SHORT_PART = Machine.Offsets.LEN_SHORT_PART or BeamData.LEN_SHORT_PART
BeamData.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
if Machine.Offsets.ROT90 ~= nil then BeamData.ROT90 = ( Machine.Offsets.ROT90 == 1) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
@@ -216,7 +223,7 @@ local function GetSetupInfo( sHead)
local SetupInfo = {}
-- dati comuni
SetupInfo.bIsCSymmetric = true
SetupInfo.bIsCSymmetrical = true
SetupInfo.dCAxisEncumbrance = 180
SetupInfo.bToolOnAggregate = false
SetupInfo.Head = {}
@@ -225,32 +232,40 @@ local function GetSetupInfo( sHead)
if sHead == 'H11' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = false, bBack = true}
SetupInfo.dMaxNegativeAngle = sin( -45)
SetupInfo.dMinNz = sin( -45)
-- testa 5 assi da sopra, davanti
elseif sHead == 'H21' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = true, bBack = false}
SetupInfo.dMaxNegativeAngle = sin( -45)
SetupInfo.dMinNz = sin( -45)
-- lama su testa 5 assi da sopra, dietro
elseif sHead == 'H12' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = false, bBack = true}
SetupInfo.dMaxNegativeAngle = sin( -45)
SetupInfo.dMinNz = sin( -45)
-- se con aggregato si considera non simmetrico
SetupInfo.bIsCSymmetrical = false
-- riduzione massimo materiale se usato in tagli orizzontali con affondamento verticale
SetupInfo.dMaxMatDecrease = 20
-- lama su testa 5 assi da sopra, davanti
elseif sHead == 'H22' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = true, bBack = false}
SetupInfo.dMaxNegativeAngle = sin( -45)
SetupInfo.dMinNz = sin( -45)
-- se con aggregato si considera non simmetrico
SetupInfo.bIsCSymmetrical = false
-- riduzione massimo materiale se usato in tagli orizzontali con affondamento verticale
SetupInfo.dMaxMatDecrease = 20
-- motosega 1
elseif sHead == 'H13' or sHead == 'H23' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.dMaxNegativeAngle = 0
SetupInfo.dMinNz = 0
-- motosega 2
elseif sHead == 'H15' then
SetupInfo.HeadType = { bTop = false, bBottom = true}
SetupInfo.PreferredSide = {}
SetupInfo.dMaxPositiveAngle = 0
SetupInfo.dMaxNz = 0
end
return SetupInfo
+1
View File
@@ -36,6 +36,7 @@
22=Long2CutSide
23=SmallToolContour
24=AntiSplintMillCut
25=Prof_end
[Pocketing]
1=Pocket
+54 -35
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
@@ -1027,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
@@ -1042,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
@@ -1158,12 +1173,12 @@ function OnRapid()
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
@@ -1396,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
@@ -1411,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
@@ -1763,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
@@ -2399,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
@@ -2980,8 +2999,8 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta)
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 + 5
MDChar.Y2 = MDChar.Y2 - 5
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')
+49 -34
View File
@@ -24,7 +24,7 @@ end
---------------------------------------------------------------------
-- *** SIMULATION ***
---------------------------------------------------------------------
local COLL_SAFE_DIST = 4
local COLL_SAFE_DIST = 3
---------------------------------------------------------------------
function OnSimulInit()
@@ -237,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)
@@ -766,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
@@ -1047,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)
@@ -1113,9 +1120,9 @@ function OnSimulMoveStart()
end
-- altrimenti sega a catena (H13 o H15)
else
local dPosA = GetCurrChainSawingVirtualAxis()
-- se anche precedente con sega a catena ma depositata, devo riprenderla
if EMT.CHSAW_OUT then
local dPosA = GetCurrChainSawingVirtualAxis()
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
OnSimulToolDeselect()
EgtLoadTool( EMT.HEAD, 1, EMT.TOOL)
@@ -1155,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
@@ -1168,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)
@@ -1664,7 +1676,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
SimulMoveAxes( 'X1', HomeX, MCH_SIM_STEP.RAPID, 'C1', HomeC, MCH_SIM_STEP.COLLROT)
end
else
-- se sega a catena
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
if abs( HomeC - CurrC) > 0.1 or abs( HomeB - CurrB) > 0.1 then
local dZref = HomeZ + GetZExtra( EMT.HEAD, CurrB)
@@ -1717,13 +1729,13 @@ function ExecMoveZmax( bMchSplit, btoXHome)
EMT.XHOME = true
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
-- altrimenti sega a catena
-- altrimenti sega a catena
else
SimulMoveAxes( 'Z2', HomeZ, MCH_SIM_STEP.RAPID, 'B2', HomeB, MCH_SIM_STEP.COLLROT)
if EMT.R3 and abs( EMT.R3) < 0.1 then
SimulMoveAxis( 'Z2', ParkCSawZ2, MCH_SIM_STEP.RAPID)
end
SimulMoveAxes( 'X2', HomeX, MCH_SIM_STEP.RAPID, 'C2', HomeC, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'X2', ParkCSawX2, MCH_SIM_STEP.RAPID, 'C2', HomeC, MCH_SIM_STEP.COLLROT)
end
end
EMT.ZMAX = true
@@ -1854,9 +1866,9 @@ function ExecParkRoller( PosY1, PosY2, PosV1, PosV2, bSpliCut, bAgg)
-- 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 5mm ulteriori
-- se almeno una è rimasta ferma in posizione, allontano comunque di 30mm ulteriori
else
dAddMove = 5
dAddMove = 30
end
local MoveY1 = max( DiffY1, 0.0)
local MoveY2 = min( DiffY2, 0.0)
@@ -2195,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)
+22 -8
View File
@@ -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
+8 -4
View File
@@ -32,10 +32,10 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.7b3'
PP_NVER = '2.7.2.3'
PP_VER = '2.7g4_DEV2'
PP_NVER = '2.7.7.4'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF'
MACH_NAME = string.match( EgtGetCurrMachineDir(), "[^\\]+$") -- si ricava il nome della macchina dal direttorio
-- Carico i dati globali
@@ -163,7 +163,6 @@ SecondSaw = false
AutomaticRotation = true
OptimizedLoadBeam = true
AutoRotMinLen = 0
CoeffVM = 0.5
EstimationRapidMultiplier = 1
ForceToCloseRollersGate = false
@@ -249,9 +248,14 @@ if EgtExistsFile( sData) then
if Machine.Offsets.SAW2OFFSZ then Saw2OffsZ = Machine.Offsets.SAW2OFFSZ end
if Machine.Offsets.DEFTCPOS1 then DefTcPos1 = ( 'T' .. Machine.Offsets.DEFTCPOS1) end
if Machine.Offsets.DEFTCPOS2 then DefTcPos2 = ( 'T' .. Machine.Offsets.DEFTCPOS2) end
if Machine.Offsets.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
+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
+35
View File
@@ -1,5 +1,40 @@
==== 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
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '2.7b1', -- versione script
VERSION = '2.7g4', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}