Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2ce5e69a0 | |||
| 6a9b2b5f58 | |||
| ed4a3db13b |
@@ -42,6 +42,7 @@ local BeamData = {
|
||||
DRILL_TOL = 0.2, -- tolleranza tra diametro foro e diametro punta
|
||||
DRILL_VZ_MIN = - 0.51, -- componente limite in Z del versore di un foro
|
||||
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
|
||||
MAX_ANGLE_DRILL_CUT = 15, -- delta angolo massimo tra foro e taglio che lo attraversa
|
||||
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
|
||||
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
|
||||
MAX_DIST_HTFEA = 50.0, -- massima distanza di feature da testa o coda per essere considerata tale
|
||||
@@ -106,6 +107,7 @@ if EgtExistsFile( sData) then
|
||||
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
|
||||
BeamData.MAX_ANGLE_DRILL_CUT = Machine.Offsets.MAX_ANGLE_DRILL_CUT or BeamData.MAX_ANGLE_DRILL_CUT
|
||||
if Machine.Offsets.ROT90 ~= nil then BeamData.ROT90 = ( Machine.Offsets.ROT90 == 1) end
|
||||
if Machine.Offsets.CUT_SIC then BeamData.CUT_SIC = EgtClamp( Machine.Offsets.CUT_SIC, 15, 50) end
|
||||
end
|
||||
|
||||
+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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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 > 91 or EMT.R2 < -91 then
|
||||
local dBref = EgtClamp( EMT.R2, -91, 91)
|
||||
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
|
||||
|
||||
+36
-2
@@ -17,6 +17,33 @@ require( 'EmtGenMachining')
|
||||
---------------------------------------------------------------------
|
||||
-----------------------------------------------------------------------------------------
|
||||
function OnSpecialGetPrevMachiningOffset()
|
||||
-- Aggiorno posizione della testa della trave a seguito di movimenti delle pinze non previsti tra le fasi
|
||||
local function TPosUpdate()
|
||||
local nClId = EgtGetFirstNameInGroup( EMC.CURRMCHID, 'CL') -- recupero Id del gruppo CL della lavorazione corrente
|
||||
local nPathId = EgtGetFirstInGroup( nClId or GDB_ID.NULL) -- Id del primo gruppo nella lavorazione (P1)
|
||||
if not nPathId then
|
||||
EMC.ERR = 12
|
||||
EMC.MSG = ' Error : CL group path not found'
|
||||
return
|
||||
end
|
||||
local dAuxMoveCount = EgtGetInfo( nPathId, 'AS#', 'd') or 0 -- numero di movimenti ausiliari
|
||||
local dTRepos = nil
|
||||
-- controlla ogni gruppo di movimenti ausiliari
|
||||
for i = 1, dAuxMoveCount do
|
||||
local aAuxMove = EgtGetInfo( nPathId, 'AS' .. tostring( i), 'vs') or {} -- array contenete i parametri di ogni gruppo
|
||||
-- controlla solo i movimenti della testa trave e salva l'ultimo
|
||||
if aAuxMove[1] == '2' or aAuxMove[1] == '3' then
|
||||
for j = 2, #aAuxMove do
|
||||
if aAuxMove[j] == 'T' then
|
||||
dTRepos = aAuxMove[j+1]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return dTRepos
|
||||
end
|
||||
|
||||
-- default
|
||||
EMC.ERR = 0
|
||||
EMC.PREVOFFSX = 0
|
||||
@@ -26,8 +53,15 @@ function OnSpecialGetPrevMachiningOffset()
|
||||
if IsStartOrRestPhase( EMC.CURRPHASE) then
|
||||
-- recupero la posizione finale della lavorazione precedente
|
||||
local vPrevAx = EmtGetFinalAxesPos( EMC.PREVMCHID)
|
||||
-- la X (L1) di questa corrisponde alla posizione iniziale della nuova trave, se ne deduce l'offset
|
||||
EMC.PREVOFFSX = ParkV1 - vPrevAx[1]
|
||||
-- ricava se e quanto la trave viene spostata tra le due fasi dai movimenti ausiliari e corregge l'offset di fine fase
|
||||
local dNewTPos = TPosUpdate()
|
||||
-- se ci sono dei movimenti della testa trave tra le due fasi ricava il delta tra la vecchia e la nuova posizione
|
||||
if dNewTPos then
|
||||
EMC.PREVOFFSX = dNewTPos - vPrevAx[1]
|
||||
-- oppure la X (L1) di questa corrisponde alla posizione iniziale della nuova trave, se ne deduce l'offset
|
||||
else
|
||||
EMC.PREVOFFSX = ParkV1 - vPrevAx[1]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+3
-3
@@ -32,10 +32,10 @@
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '2.7l1_DEV1'
|
||||
PP_NVER = '2.7.12.1'
|
||||
PP_VER = '2.7l2'
|
||||
PP_NVER = '2.7.12.2'
|
||||
MIN_MACH_VER = '2.5k1'
|
||||
MACH_NAME = string.match( EgtGetCurrMachineDir(), "[^\\]+$") -- si ricava il nome della macchina dal direttorio
|
||||
MACH_NAME = EgtGetCurrMachineName()
|
||||
|
||||
-- Carico i dati globali
|
||||
local sMachDir = EgtGetCurrMachineDir()
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
==== Common_ONE-PF Update Log ====
|
||||
|
||||
Versione 2.7l1 (18/12/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
|
||||
-(SIM) Aggiunta funzione CheckClamping
|
||||
|
||||
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
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_ONE-PF', -- nome script PP standard
|
||||
VERSION = '2.7k3', -- versione script
|
||||
VERSION = '2.7l1', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user