Compare commits

..

4 Commits

Author SHA1 Message Date
daniele.nicoli 9724d936f3 Allineamento a develop dei common per rilascio versione 3.1g3_DEV1. 2026-07-30 11:49:57 +02:00
daniele.nicoli 639ea41eff Merge branch 'master' into develop 2026-07-30 11:14:08 +02:00
andrea.villa 806fd7eb2a Cambio numero versione macchina 2026-07-24 16:26:48 +02:00
andrea.villa 41974c81b5 Allineamento con comon ver. 3.1g3 2026-07-24 16:24:18 +02:00
6 changed files with 49 additions and 23 deletions
+8 -4
View File
@@ -1229,6 +1229,14 @@ function OnRapid()
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = true
-- salvo posizione attuale
local OldL1 = EMT.L1
local OldL2 = EMT.L2
local OldL3 = EMT.L3
-- imposto posizione precedente (non contiene l'offset in X per sovramateriale di testa EMT.X_OFF)
EMT.L1 = EMT.L1o
EMT.L2 = EMT.L2o
EMT.L3 = EMT.L3o
-- trasformo i punti nel piano
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
@@ -1241,10 +1249,6 @@ function OnRapid()
EMT.PLANEACTIVE = true
-- annullo precedenti per forzare scrittura
EMT.R1p = nil
EMT.R2p = nil
-- emissione movimento
local sAxes = EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
+12 -5
View File
@@ -608,7 +608,7 @@ function OnSimulToolSelect( dPosA)
end
---------------------------------------------------------------------
function OnSimulToolDeselect( dPrevA)
function OnSimulToolDeselect( dPrevA, bLastRise)
-- se ToolDeselect chiamata da MLPE, bisogna scaricare perchè è ultimo movimento di rise e poi si cambia utensile
if dPrevA then
@@ -627,7 +627,7 @@ function OnSimulToolDeselect( dPrevA)
OnSetHead()
EMC = OrigEMC
-- se c'è prossimo utensile, oppure se non c'è e c'è un movimento carrelli
if sTool or ( not sTool and bCarrMove) then
if sTool or ( not sTool and bCarrMove) or not bLastRise then
local dHomeX1 = EgtGetAxisHomePos( 'X1')
local dHomeC1 = EgtGetAxisHomePos( 'C1')
@@ -654,7 +654,7 @@ function OnSimulToolDeselect( dPrevA)
OnSetHead()
EMC = OrigEMC
-- se c'è prossimo utensile, oppure se non c'è e c'è un movimento carrelli
if sTool or ( not sTool and bCarrMove) then
if sTool or ( not sTool and bCarrMove) or not bLastRise then
local dHomeX2 = EgtGetAxisHomePos( 'X2')
local dHomeC2 = EgtGetAxisHomePos( 'C2')
@@ -1233,7 +1233,7 @@ function OnSimulMoveEnd()
local bLastRise = EgtGetInfo( EMT.MOVEID, 'LastRise', 'b')
-- se ultimo rapido e motosega, si va in home
if bLastRise and HeadIsChainSaw( EMT.HEAD) then
OnSimulToolDeselect( EMT.R3)
OnSimulToolDeselect( EMT.R3, true)
EMT.CHSAW_OUT = true
end
end
@@ -1442,6 +1442,13 @@ end
function ExecMoveHome( bNearV)
-- se richiesto, avvicino i rulli
if bNearV then
-- se ho motosega, devo scaricare
if HeadIsChainSaw( EMT.HEAD) then
-- recupero il valore dell'asse virtuale bloccato A
local dPosA = GetCurrChainSawingVirtualAxis()
OnSimulToolDeselect( dPosA)
EMT.CHSAW_OUT = true
end
-- sistemo i rulli
ExecOpenRoller( 1)
ExecOpenRoller( 2)
@@ -2650,7 +2657,7 @@ function FindNextToolOnHeadSet( nHSet, bFirst)
end
local sNextHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
if GetHeadSet( sNextHead) == nHSet then
if EMT.TOOL ~= sNextTool then
if CurrTool ~= sNextTool then
if not HeadIsChainSaw( sNextHead) then
sHead = sNextHead
sTool = sNextTool
+17 -11
View File
@@ -279,11 +279,10 @@ function OnSpecialLink()
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3}, 30, 2, 2, 'FirstClimb=1;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2p, EMC.R3}, 30, 2, 2)
if abs( EMC.R3) < 0.1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z1, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z1, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
else
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
end
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
-- se fine lavorazione con deposito utensile
elseif EMC.LINKTYPE == 2 then
@@ -400,9 +399,12 @@ function OnSpecialLink()
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2, 'FirstClimb=1;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2)
-- se assi cambiano di molto
if abs( EMC.R1 - EMC.R1p) > 10 or abs( EMC.R2 - EMC.R2p) > 90 then
-- se asse B cambia di molto
if abs( 0 - EMC.R2p) > 1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, 0}, 30, 2, 2)
end
-- se assi cambiano di molto
if abs( EMC.R1 - EMC.R1p) > 10 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, 0}, 30, 2, 2)
end
@@ -417,7 +419,10 @@ function OnSpecialLink()
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
if abs( EMC.R1 - EMC.R1p) > 1 or abs( EMC.R2 - EMC.R2p) > 1 then
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, 0}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, 0}, 30, 3, 2)
-- se assi cambiano di molto
if abs( EMC.R1 - EMC.R1p) > 10 then
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, 0}, 30, 3, 2)
end
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2)
else
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, EMC.R2p}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
@@ -455,6 +460,7 @@ function OnSpecialLink()
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=1;')
end
end
-- se sega a catena su testa 2
elseif EMC.HEAD == 'H23' then
-- recupero se split da note utente di lavorazione precedente
@@ -466,11 +472,10 @@ function OnSpecialLink()
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3}, 30, 2, 2, 'FirstClimb=1;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2p, EMC.R3}, 30, 2, 2)
if abs( EMC.R3) < 0.1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z2, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z2, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
else
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
end
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
-- se fine lavorazione con deposito utensile
elseif EMC.LINKTYPE == 2 then
@@ -1285,8 +1290,9 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
if IsStartPhase( EMC.PHASE) and #vCmd > 0 and IsFirstMachiningOfStart( EMC.MCHID) and
not bPreSplit and not bSplitting and not bPreCut and not bCutting then
local dLastTPos, dLastY1Delta = GetLastTPos( vCmd)
-- se testa oltre lo zero
if dLastTPos and dLastTPos < 0 then
-- TODO : individuare condizione più corretta nella quale arretrare la testa della trave
-- se testa oltre lo zero e entro le corse assi con 5 mm di sicurezza
if dLastTPos and dLastTPos < 0 and ParkV1 + dLastY1Delta < MaxY1 - 5 then
-- si sposta testa in posizione carico
table.insert( vCmd, { 24, 'T', ParkV1, 'Y1', ParkV1 + dLastY1Delta})
end
+2 -2
View File
@@ -32,8 +32,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '3.1g2'
PP_NVER = '3.1.7.2'
PP_VER = '3.1g3_DEV1'
PP_NVER = '3.1.7.3'
MIN_MACH_VER = '3.1f4'
MACH_NAME = EgtGetCurrMachineName()
+9
View File
@@ -1,5 +1,14 @@
==== Common_ONE-PF Update Log ====
Versione 3.1-- (--/--/2026)
- (SIM-GEN) Arretra trave al parcheggio rulli dopo Unload solo se il pinzaggio consente il movimento completo. Altrimenti non fa nulla. Ticket#3102
Versione 3.1g3 (24/07/2026)
- (SIM) Non si legge il nome utensile da tabella EMT, ma si utilizza quello corrente salvato in precedenza
- (SIM) Corretta gestione scarico motosega in caso di cambio pinze dopo che utensile già caricato. In generazione era corretto perchè selezione utensile avviene già dopo posizionamento carrelli
- (SIM-GEN) Migliorati movimenti lama e motosega. Ultimo punto climb motosega è in alto in quota parcheggio.
- (GEN) Corretta scrittura piano lavorazione in caso di rotazione con pezzo con sovramateriale in testa. Ticket#3092
Versione 3.1g2 (07/07/2026)
- (SIM) Corretta gestione cambio utensile con motosega
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '3.1g2', -- versione script
VERSION = '3.1--', -- versione script
MIN_MACH_VER_PP_COMMON = '3.1f1' -- versione minima kernel
}