- Corretto segno coordinata rotazione in sicurezza testa 3

- Testa 3 in home a fine barra
- ToolHolders
This commit is contained in:
andrea.villa
2024-12-11 09:27:54 +01:00
parent 49f6658943
commit f139552971
6 changed files with 28 additions and 10 deletions
+9 -5
View File
@@ -915,7 +915,7 @@ function OnRapid()
elseif EgtGetHeadId( 'H38') then elseif EgtGetHeadId( 'H38') then
local B3Home = EgtGetAxisHomePos( 'B3') local B3Home = EgtGetAxisHomePos( 'B3')
local C3Home = EgtGetAxisHomePos( 'C3') local C3Home = EgtGetAxisHomePos( 'C3')
EmitMoveDataHead( 3, { X=SafeX3RotAxis, S=Speed}) EmitMoveDataHead( 3, { X=-SafeX3RotAxis, S=Speed})
-- se non sono esattamente in home, devo ruotare in zona sicura -- se non sono esattamente in home, devo ruotare in zona sicura
if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then
EMT.L3 = min( EMT.L3, SafeZ3RotAxis) EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
@@ -1256,7 +1256,7 @@ function OnRapid()
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local B3Home = EgtGetAxisHomePos( 'B3') local B3Home = EgtGetAxisHomePos( 'B3')
local C3Home = EgtGetAxisHomePos( 'C3') local C3Home = EgtGetAxisHomePos( 'C3')
EmitMoveDataHead( 3, { X=SafeX3RotAxis, S=Speed}) EmitMoveDataHead( 3, { X=-SafeX3RotAxis, S=Speed})
-- se non sono esattamente in home, devo ruotare in zona sicura -- se non sono esattamente in home, devo ruotare in zona sicura
if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then
EMT.L3 = min( EMT.L3, SafeZ3RotAxis) EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
@@ -1417,7 +1417,9 @@ function OnRapid()
local bSplitCut = ( EMT.MCHUSERNOTES:find( 'Split', 1, true) ~= nil) local bSplitCut = ( EMT.MCHUSERNOTES:find( 'Split', 1, true) ~= nil)
-- porto in home la testa corrente se lavorazione successiva sopra con testa diversa oppure se punta lunga -- porto in home la testa corrente se lavorazione successiva sopra con testa diversa oppure se punta lunga
local nNextTopHSet = GetNextTopHSet( EMT.MCHID) local nNextTopHSet = GetNextTopHSet( EMT.MCHID)
local bTopGoHome = ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool) -- ricavo prossimo utensile
local sNextTool = GetNextTool( EMT.MCHID)
local bTopGoHome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) or ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome, false) EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome, false)
-- aggiorno quota finale trave dopo Zmax -- aggiorno quota finale trave dopo Zmax
EMT.L1o = EMT.TPOS EMT.L1o = EMT.TPOS
@@ -2551,7 +2553,7 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome, bUsePrev
end end
-- se non sono esattamente in home, devo ruotare in zona sicura -- se non sono esattamente in home, devo ruotare in zona sicura
if abs( dHomeC3 - PrevR1) > 1 or abs( dHomeB3 - PrevR2) > 1 then if abs( dHomeC3 - PrevR1) > 1 or abs( dHomeB3 - PrevR2) > 1 then
EmitMoveDataHead( 3, { X=SafeX3RotAxis, Fmt=1}) EmitMoveDataHead( 3, { X=-SafeX3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, Fmt=1}) EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { B=dHomeB3, C=dHomeC3, Fmt=1}) EmitMoveDataHead( 3, { B=dHomeB3, C=dHomeC3, Fmt=1})
end end
@@ -2840,9 +2842,11 @@ function PreselectNextDiffHead( nMchId, sHead)
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, dNextX), B=ParkCSawB1, C=MyParkCSawC1, TPos=AdjustTcPos( false, sNextTcPos, dPosA), Fmt=2}) EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, dNextX), B=ParkCSawB1, C=MyParkCSawC1, TPos=AdjustTcPos( false, sNextTcPos, dPosA), Fmt=2})
EmitMoveStartHead( 1) EmitMoveStartHead( 1)
end end
else elseif nNextHSet == 2 then
EmitMoveDataHead( 2, { B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, sNextTcPos), Fmt=2}) EmitMoveDataHead( 2, { B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, sNextTcPos), Fmt=2})
EmitMoveStartHead( 2) EmitMoveStartHead( 2)
else
; -- non si preseleziona testa 3
end end
end end
end end
+17 -3
View File
@@ -1251,6 +1251,8 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnSimulMoveEnd() function OnSimulMoveEnd()
-- gruppo della testa
local nHSet = GetHeadSet( EMT.HEAD)
-- rimozione eventuali sfridi -- rimozione eventuali sfridi
if EMT.FLAG == 301 then if EMT.FLAG == 301 then
ExecRemoveScraps() ExecRemoveScraps()
@@ -1295,8 +1297,12 @@ function OnSimulMoveEnd()
if EMT.MOVE == 0 and EMT.FLAG == 3 then if EMT.MOVE == 0 and EMT.FLAG == 3 then
-- eventuale rimozione sfridi -- eventuale rimozione sfridi
ExecRemoveScraps() ExecRemoveScraps()
-- ricavo prossimo utensile
local sNextTool = GetNextTool( EMT.MCHID)
-- vado in home se è ultimo movimento ed è ultima lavorazione
local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3)
-- eseguo -- eseguo
ExecMoveZmax( EMT.MCHSPLIT) ExecMoveZmax( EMT.MCHSPLIT, bToXhome)
EMT.TO_ZMAX = nil EMT.TO_ZMAX = nil
end end
end end
@@ -1474,7 +1480,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function ExecMoveHome( bNearV, bMchSplit) function ExecMoveHome( bNearV, bMchSplit)
-- risalita a Zmax -- risalita a Zmax
ExecMoveZmax( bMchSplit) ExecMoveZmax( bMchSplit, true)
-- se testa sotto e macchian a 3 teste e gruppo truciolatore a 4 assi -- se testa sotto e macchian a 3 teste e gruppo truciolatore a 4 assi
if GetHeadSet( EMT.HEAD) == 2 and IsHeadExisting( 3) then if GetHeadSet( EMT.HEAD) == 2 and IsHeadExisting( 3) then
if not SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID) then if not SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID) then
@@ -1499,7 +1505,7 @@ function ExecMoveHome( bNearV, bMchSplit)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function ExecMoveZmax( bMchSplit) function ExecMoveZmax( bMchSplit, bGoToHome)
-- set della testa -- set della testa
local nSetHead = GetHeadSet( EMT.HEAD) local nSetHead = GetHeadSet( EMT.HEAD)
-- posizioni correnti degli assi testa -- posizioni correnti degli assi testa
@@ -1586,6 +1592,9 @@ function ExecMoveZmax( bMchSplit)
SimulMoveAxes( 'C3', HomeC, MCH_SIM_STEP.COLLROT, 'B3', HomeB, MCH_SIM_STEP.COLLROT) SimulMoveAxes( 'C3', HomeC, MCH_SIM_STEP.COLLROT, 'B3', HomeB, MCH_SIM_STEP.COLLROT)
end end
SimulMoveAxis( 'Z3', MyMaxZ3, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'Z3', MyMaxZ3, MCH_SIM_STEP.RAPID)
if bGoToHome then
SimulMoveAxis( 'X3', ParkX3, MCH_SIM_STEP.RAPID)
end
else else
EmtSetLastError( 1212, "HEAD not managed") EmtSetLastError( 1212, "HEAD not managed")
end end
@@ -2645,6 +2654,11 @@ function GetStartMachiningXaxis( nMchId)
end end
end end
---------------------------------------------------------------------
function IsLastPath( nPathId)
return not EgtGetNext( nPathId)
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2) function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
+2 -2
View File
@@ -5,7 +5,7 @@
require( 'EmtGenerator') require( 'EmtGenerator')
EgtEnableDebug( false) EgtEnableDebug( false)
PP_VER = '2.6k2_DEV8' PP_VER = '2.6k2_DEV9'
PP_NVER = '2.6.11.2' PP_NVER = '2.6.11.2'
MIN_MACH_VER = '2.5k1' MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF1500MAXrl-3T' MACH_NAME = 'Essetre-PF1500MAXrl-3T'
@@ -130,7 +130,7 @@ ParkZ3 = -200
ParkC3 = -90 ParkC3 = -90
ParkB3 = -75 ParkB3 = -75
SafeX3RotAxis = 1600 SafeX3RotAxis = 1600
SafeZ3RotAxis = -620 SafeZ3RotAxis = -655
MinX2 = -3060 MinX2 = -3060
MaxX2 = 0 MaxX2 = 0
MinZ2 = 0 MinZ2 = 0
Binary file not shown.
Binary file not shown.
Binary file not shown.