Soluzione Ticket#2754
Divisione movimento B in approccio se > 90°
This commit is contained in:
+55
-6
@@ -911,7 +911,16 @@ function OnRapid()
|
||||
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
|
||||
EmitMoveDataHead( 1, { B=0, S=Speed})
|
||||
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=dBref, S=Speed})
|
||||
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
|
||||
else
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
end
|
||||
|
||||
if bMoveZbeforeX then
|
||||
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
|
||||
end
|
||||
@@ -995,7 +1004,15 @@ function OnRapid()
|
||||
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
|
||||
EmitMoveDataHead( 1, { B=0, S=Speed})
|
||||
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=dBref, S=Speed})
|
||||
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
|
||||
else
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
|
||||
end
|
||||
@@ -1065,7 +1082,15 @@ function OnRapid()
|
||||
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})
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
EmitMoveDataHead( 2, { Z=dZref, B=dBref, S=Speed})
|
||||
EmitMoveDataHead( 2, { B=EMT.R2, S=Speed})
|
||||
else
|
||||
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
|
||||
end
|
||||
@@ -1285,7 +1310,15 @@ function OnRapid()
|
||||
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
|
||||
EmitMoveDataHead( 1, { B=0, S=Speed})
|
||||
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=dBref, S=Speed})
|
||||
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
|
||||
else
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
|
||||
end
|
||||
@@ -1374,7 +1407,15 @@ function OnRapid()
|
||||
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
|
||||
EmitMoveDataHead( 1, { B=0, S=Speed})
|
||||
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=dBref, S=Speed})
|
||||
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
|
||||
else
|
||||
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
|
||||
end
|
||||
@@ -1439,7 +1480,15 @@ function OnRapid()
|
||||
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})
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
EmitMoveDataHead( 2, { Z=dZref, B=dBref, S=Speed})
|
||||
EmitMoveDataHead( 2, { B=EMT.R2, S=Speed})
|
||||
else
|
||||
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
|
||||
end
|
||||
|
||||
+27
-3
@@ -1051,7 +1051,15 @@ function OnSimulMoveStart()
|
||||
if EMT.HEAD == 'H12' and abs( C1Pos - EMT.R1) > 1 and ( abs( C1Home - EMT.R1) > 30.1 or abs(B1Home - EMT.R2) > 30.1) then
|
||||
SimulMoveAxis( 'B1', 0, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', dBref, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
else
|
||||
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
|
||||
end
|
||||
@@ -1120,7 +1128,15 @@ function OnSimulMoveStart()
|
||||
if EMT.HEAD == 'H12' and abs( C1Pos - EMT.R1) > 1 and ( abs( C1Home - EMT.R1) > 30.1 or abs(B1Home - EMT.R2) > 30.1) then
|
||||
SimulMoveAxis( 'B1', 0, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', dBref, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
else
|
||||
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
|
||||
end
|
||||
@@ -1192,7 +1208,15 @@ function OnSimulMoveStart()
|
||||
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)
|
||||
-- se movimento di B > di 90°, spezza il movimento in 2 arrivando alla quota Z con B+-90 e poi muove l'ultimo segmento
|
||||
-- evita collisione con carro X
|
||||
if EMT.R2 > 90 or EMT.R2 < -90 then
|
||||
local dBref = EgtClamp( EMT.R2, -90, 90)
|
||||
SimulMoveAxes( 'Z2', dZref, MCH_SIM_STEP.RAPID, 'B2', dBref, MCH_SIM_STEP.COLLROT)
|
||||
SimulMoveAxis( 'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
else
|
||||
SimulMoveAxes( 'Z2', dZref, MCH_SIM_STEP.RAPID, 'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
end
|
||||
if bMoveZbeforeX then
|
||||
SimulMoveAxis( 'Z2', EMT.L3, MCH_SIM_STEP.RAPID)
|
||||
end
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
Versione 2.7-- (--/--/2025)
|
||||
-(SIM-GEN) Aggiunto controllo post movimenti ausiliari dell' EMC.PREVOFFSX nella funzione OnSpecialGetPrevMachiningOffset(). Ticket#2727
|
||||
-(SIM-GEN) Divisione movimento B in approccio se > 90°. Ticket#2754
|
||||
|
||||
Versione 2.7k3 (28/11/2025)
|
||||
- (GEN) Prima di andare allo scarico, si aggiunge movimento intermedio dove si aspetta che rulli scarico siano arrivati in posizione. Ticket#2716
|
||||
|
||||
Reference in New Issue
Block a user