2.6a1 Piccole correzioni dopo test con PFrl

This commit is contained in:
andrea.villa
2023-12-05 15:25:33 +01:00
parent cd3c23f7eb
commit 7cc59a2a33
2 changed files with 6 additions and 14 deletions
+3 -5
View File
@@ -465,6 +465,7 @@ function OnMachiningEnd()
EMT.LB = EMT.LT
elseif EMT.AUXTYPE == 'U' then
EmtOutput( '(PART UNLOAD)')
-- movimento intermedio di apertura pinza-rulli per evitare di trovare delle collisioni
EmitParkRoller( EMT.TPOS, false, false)
EMT.V1POS = EMT.V1NEXTPOS
EMT.V2POS = EMT.V2NEXTPOS
@@ -2442,8 +2443,8 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
-- 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( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, -EMT.L2o < -LimX1RotSaw, -EMT.L2o > -LimX1RotSaw) then
dZref = dZref - EgtIf( not Mortiser, 100, 370)
if EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, -EMT.L2o < -LimX1RotSaw, -EMT.L2o > -LimX1RotSaw) then
dZref = dZref - EgtIf( not Mortiser, 100, 370)
end
dZref = min( dZref, dMaxZ1)
local MovH = { Z = EgtIf( dZref > EMT.L3o, dZref, EMT.L3o)}
@@ -2541,9 +2542,6 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
-- eseguo la salita a Z2max (oriento solo se assi rotanti non già a posto)
if abs( dSafeC2 - PrevR1) > 0.1 or abs( dSafeB2 - PrevR2) > 0.1 then
local dZref = dSafeZ2 + GetZExtra( EMT.HEAD, PrevR2)
if -EMT.L2o > -LimX2RotSaw then
dZref = dZref - 100
end
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 ;
+3 -9
View File
@@ -905,7 +905,7 @@ function OnSimulMoveStart()
end
SimulMoveAxis( 'X1', dXref, MCH_SIM_STEP.RAPID)
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( -EMT.L2 > -LimX1RotSaw or EMT.R2 < -91) then
if EMT.HEAD == 'H12' and ( EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
dZref = Z1Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
@@ -1017,7 +1017,7 @@ function OnSimulMoveStart()
--EgtOutBox( 'Flag 2,1', 'Info Rapid')
SimulMoveAxis( 'X2', EMT.L2, MCH_SIM_STEP.RAPID)
local dZref = EMT.L3
if EMT.HEAD == 'H22' and ( -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 = Z2Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
@@ -1441,7 +1441,7 @@ function ExecMoveZmax( bMchSplit)
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)
if -CurrX > -LimX1RotSaw then
if EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, -CurrX < -LimX1RotSaw, -CurrX > -LimX1RotSaw) then
dZref = dZref - EgtIf( not Mortiser, 100, 370)
end
SimulMoveAxes( 'Z1', EgtIf( dZref > CurrZ, dZref, CurrZ), MCH_SIM_STEP.RAPID, 'B1', EgtClamp( CurrB, -90, 90), MCH_SIM_STEP.COLLROT)
@@ -1473,9 +1473,6 @@ function ExecMoveZmax( bMchSplit)
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)
if -CurrX < -LimX1RotSaw then
dZref = dZref - 100
end
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
SimulMoveAxes( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID, 'B1', 0, MCH_SIM_STEP.COLLROT)
@@ -1497,9 +1494,6 @@ function ExecMoveZmax( bMchSplit)
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)
if -CurrX > -LimX2RotSaw then
dZref = dZref - 100
end
SimulMoveAxes( 'Z2', EgtIf( dZref > CurrZ, dZref, CurrZ), MCH_SIM_STEP.RAPID, 'B2', EgtClamp( CurrB, -90, 90), MCH_SIM_STEP.COLLROT)
if EMT.HEAD == 'H22' and ( abs( HomeC - CurrC) > 30.1 or abs( HomeB - CurrB) > 30.1) then
SimulMoveAxes( 'Z2', MaxZ2, MCH_SIM_STEP.RAPID, 'B2', 0, MCH_SIM_STEP.COLLROT)