Allineamento con common ver. 3.1b1

This commit is contained in:
andrea.villa
2026-02-20 09:10:04 +01:00
parent e7dd38942a
commit dc83f4c5e5
4 changed files with 58 additions and 3 deletions
+52
View File
@@ -1674,6 +1674,7 @@ function OnRapid()
-- aggiorno quota finale trave dopo Zmax
EMT.L1o = EMT.TPOS
EMT.ZMAX = true
ToolPreSelectionSingleHead( EMT.MCHID)
-- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then
-- non previsto
@@ -3155,6 +3156,57 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta)
EMT.TPOS = dPosT
end
---------------------------------------------------------------------
-- Se la lavorazione segue una disposizione ha un utensile diverso da quello attuale lo cambia durante la disposizione
function ToolPreSelectionSingleHead( nMchId)
-- Se non sono nell'ultima lavorazione della fase o se è una macchina a doppia testa ritorna senza fare nulla
local bIsPhaseEnd = ( EgtGetNextActiveOperation( nMchId) and EgtGetInfo( EgtGetNextActiveOperation( nMchId), 'TYPE') == 'END')
if not bIsPhaseEnd or EgtGetHeadId( 'H21') then
return
end
-- nome utensile
local sToolChange
local sToolChangePos
local sToolChangeHead
-- recupero lavorazione successiva e se contiene un utensile diverso salva utensile e posizione utensile
local nNextMchId = EgtGetNextActiveOperation( nMchId)
while nNextMchId do
if EgtGetOperationType( nNextMchId) ~= MCH_OY.DISP then
if EgtSetCurrMachining( nNextMchId) then
local sNextTool = EgtGetMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sNextTool) then
if EMT.TOOL ~= sNextTool then
local sNextHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
if not HeadIsChainSaw( sNextHead) then
sToolChange = sNextTool
sToolChangePos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
sToolChangeHead = sNextHead
end
end
break
end
end
end
nNextMchId = EgtGetNextActiveOperation( nNextMchId)
end
-- ripristino stato corrente
EgtSetCurrMachining( EMT.MCHID)
EgtTdbSetCurrTool( EMT.TOOL)
-- controlla se l'operazione successiva e quella ancora dopo esistono e sono disposizioni
local bNextOpIsDisp = ( EgtGetNextActiveOperation( nMchId)
and ( EgtGetOperationType( EgtGetNextActiveOperation( nMchId)) == MCH_OY.DISP)
and ( EgtGetNextActiveOperation( EgtGetNextActiveOperation( nMchId)))
and ( EgtGetOperationType( EgtGetNextActiveOperation( EgtGetNextActiveOperation( nMchId))) == MCH_OY.DISP))
-- emetto preselezione utensile
if bIsPhaseEnd and bNextOpIsDisp then
if ( EMT.TOOL and sToolChangePos and sToolChange and sToolChangeHead) and EMT.TOOL ~= sToolChangePos and not HeadIsChainSaw( sToolChangeHead) then
local MyParkX1 = EgtIf( GetHeadTCSet( sToolChangeHead, sToolChangePos) == 'Head1_TC2', ParkFrnX1, ParkX1)
EmitMoveDataHead( 1, { X=-MyParkX1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, sToolChangePos)})
EmitMoveStartHead( 1)
end
end
end
---------------------------------------------------------------------
function PreselectNextDiffHead( nMchId, sHead)
-- se non ho due teste, esco subito
+2 -2
View File
@@ -8,8 +8,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '3.1a1'
PP_NVER = '3.1.1.1'
PP_VER = '3.1b1'
PP_NVER = '3.1.2.1'
MIN_MACH_VER = '2.5k1'
MACH_NAME = EgtGetCurrMachineName()
+3
View File
@@ -1,4 +1,7 @@
==== Common_ONE-PF Update Log ====
Versione 3.1b1 (20/02/2026)
- (GEN) Aggiunta funzione ToolPreSelection() per la preselezione utensile. Ticket#2789
- (GEN) Funzione rinominata in ToolPreSelectionSingleHead(), ora utilizza funzione in MLDE per capire se è motosega
Versione 3.1a1 (16/01/2026)
- (SIM-GEN) Aggiunto controllo che evita collisioni durante lo svincolo in Z della sega a catena nelle funzioni ExecMoveZMax() e EmitZMax(). Ticket#2767
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '3.1a1', -- versione script
VERSION = '3.1b1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}