Compare commits

...

2 Commits

Author SHA1 Message Date
andrea.villa 11dfc9c4b7 - Si resetta piano lavoraizone anche se cambiano solo i rulli
- Piccole modifiche minori
2026-06-12 14:54:18 +02:00
andrea.villa 982fa60005 Lettura posizione parcheggi da Offset TS3 2026-06-08 10:05:30 +02:00
2 changed files with 9 additions and 31 deletions
+4 -28
View File
@@ -326,7 +326,6 @@ function OnDispositionEnd()
if IsRestPhase( EMT.PHASE + 1) then
EmitMoveWaitChars( 2)
else
-- EmitMoveWaitChars( 2, TEST_USE)
-- posticipo attesa fine scarico alla lavorazione successiva
EMT.LASTOPEISUNLOAD = true
end
@@ -697,9 +696,7 @@ end
---------------------------------------------------------------------
function OnPathEnd()
if not EMT.ZMAX then
-- EmitResetMachining( true)
end
-- salvo dati precedenti
EMT.L2pp = EMT.L2o
@@ -865,9 +862,10 @@ function OnRapid()
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
else
-- controllo se ci sono spostamenti dei carrelli programmati
local bChangeCarriageClamping = CheckChangeCarriageClamping()
local bChangeCarriageClamping = GetMovesInAuxCmd( EMT.AUXCMD)
local bRotAxChanged = ( abs( EMT.R1prec - EMT.R1) > GEO.EPS_SMALL or abs( EMT.R2prec - EMT.R2) > GEO.EPS_SMALL)
-- se non ci sono riposizionamenti dei carrelli, se stesso utensile, e c'è ancora piano attivo dalla lavorazione precedente, allora questo è un climb
if not bChangeCarriageClamping and EMT.TOOL == EMT.PREVTOOL and EMT.PLANEACTIVE and ( abs( EMT.R1prec - EMT.R1) < GEO.EPS_SMALL and abs( EMT.R2prec - EMT.R2) < GEO.EPS_SMALL) then
if EMT.PLANEACTIVE and EMT.TOOL == EMT.PREVTOOL and not bChangeCarriageClamping and not bRotAxChanged then
-- dichiaro finita lavorazione precedente
local sOut = 'G157 EA1'
EmtOutput( sOut)
@@ -1380,28 +1378,6 @@ function CalcCharStatusN( sCmd)
end
end
---------------------------------------------------------------------
-- controlla se nella tabella AUX sono presenti dei movimenti dei carrelli
function CheckChangeCarriageClamping()
local ChangeCarriagesParam = {
'1', -- movimento singolo carro
'2', -- movimento carro e trave
'3', -- movimento 2 carri e trave
'4', -- risalita a Z max
'11', -- comando pinza 1
'12' -- comando pinza 2
}
for i=1, #EMT.AUXCMD do
local Cmd = EgtSplitString( EMT.AUXCMD[i])
for j=1, #ChangeCarriagesParam do
if Cmd[1] == ChangeCarriagesParam[j] then
return true
end
end
end
return false
end
---------------------------------------------------------------------
function PrepareLoad( sCmd, nInd, bStart)
local Cmd = EgtSplitString( sCmd)
+5 -3
View File
@@ -32,8 +32,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '3.1e1_NL13'
PP_NVER = '3.1.3.2'
PP_VER = '3.1f1_CR1'
PP_NVER = '3.1.6.1'
MIN_MACH_VER = '2.5k1'
MACH_NAME = EgtGetCurrMachineName()
@@ -165,7 +165,8 @@ if EgtExistsFile( sData) then
end
if Machine.Offsets.X1_POS then MinX1 = -Machine.Offsets.X1_POS end
if Machine.Offsets.X1_NEG then MaxX1 = -Machine.Offsets.X1_NEG end
if Machine.Offsets.PARK_X1 then ParkX1 = -Machine.Offsets.PARK_X1 end
if Machine.Offsets.PARK_X1POS then ParkFrnX1 = -Machine.Offsets.PARK_X1POS end
if Machine.Offsets.PARK_X1NEG then ParkX1 = -Machine.Offsets.PARK_X1NEG end
if Machine.Offsets.Z1_NEG then MinZ1 = Machine.Offsets.Z1_NEG end
if Machine.Offsets.Z1_POS then MaxZ1 = min( MaxZ1, Machine.Offsets.Z1_POS) end
if Machine.Offsets.Z1_POS_LAMA then MaxZ1Blade = min( MaxZ1Blade, Machine.Offsets.Z1_POS_LAMA) end
@@ -230,6 +231,7 @@ if EgtExistsFile( sData) then
ParkV2 = MinV2
ParkY2 = ParkV2 - MinDeltaYV
ParkX1 = min( ParkX1, MaxX1)
ParkFrnX1 = max( ParkFrnX1, MinX1)
MaxZ1Blade = min( MaxZ1Blade, MaxZ1)
ParkCSawZ1 = min( ParkCSawZ1, MaxZ1)
ParkCSaw0Z1 = min( ParkCSaw0Z1, MaxZ1)