Compare commits

...

10 Commits

Author SHA1 Message Date
daniele.nicoli 306cf1715b Aggiunto Clamp di sicurezza per lettura dei parametri MinJoin da Ts3Data 2026-04-23 12:28:34 +02:00
daniele.nicoli 8f387d99a6 Merge remote-tracking branch 'origin/main' into develop 2026-04-23 12:28:01 +02:00
andrea.villa d4f0842845 Merge branch 'develop' 2026-03-17 15:18:13 +01:00
andrea.villa 412cd2c8f3 Allineamento a common ver. 3.1c2 2026-03-17 15:18:01 +01:00
daniele.nicoli 0e1b202e68 Aggiunto info "PreviewShow" per anteprima utensile/testa nel MACH 2026-03-09 08:37:05 +01:00
daniele.nicoli 5a43e3263c Aggiunti parametri letti da TS3Data.lua: MIN_JOIN_S, MIN_JOIN_L e MAX_ANGLE_DRILL_CUT 2026-03-05 14:49:49 +01:00
daniele.nicoli 54e4c885f0 Merge branch 'main' into develop 2026-03-05 14:49:08 +01:00
andrea.villa b95d7bbb55 Allineamento con common ver. 3.1c1 2026-03-04 10:34:34 +01:00
andrea.villa be793b7914 Merge remote-tracking branch 'origin/develop' 2026-02-20 09:10:19 +01:00
andrea.villa dc83f4c5e5 Allineamento con common ver. 3.1b1 2026-02-20 09:10:04 +01:00
9 changed files with 94 additions and 8 deletions
+3 -1
View File
@@ -107,9 +107,11 @@ 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.MAX_ANGLE_DRILL_CUT then BeamData.MAX_ANGLE_DRILL_CUT = EgtClamp( Machine.Offsets.MAX_ANGLE_DRILL_CUT, 1, 89) end
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
if Machine.Offsets.MIN_JOIN_S then BeamData.MIN_JOIN_S = EgtClamp( Machine.Offsets.MIN_JOIN_S, 80, 150) end
if Machine.Offsets.MIN_JOIN_L then BeamData.MIN_JOIN_L = EgtClamp( Machine.Offsets.MIN_JOIN_L, 300, 450) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
+53 -1
View File
@@ -981,7 +981,7 @@ function OnRapid()
local dTRad, dTLen = GetToolRadLen()
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
EmitMoveDataHead( 1, { X=-ParkX2, Z=MyMaxZ1, B=HomeB1, C=HomeC1, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveDataHead( 1, { X=-ParkFrnX1, Z=MyMaxZ1, B=HomeB1, C=HomeC1, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
@@ -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
+1 -1
View File
@@ -1112,7 +1112,7 @@ function OnSimulMoveStart()
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( -EMT.L2 < -LimX1RotSaw or EMT.R2 > 91) then
if EMT.HEAD == 'H12' and ( EgtIf( BD.RIGHT_LOAD, -EMT.L2 < -LimX1RotSaw, -EMT.L2 > -LimX1RotSaw) or EMT.R2 > 91) then
dZref = Z1Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
+19 -1
View File
@@ -713,6 +713,24 @@ end
---------------------------------------------------------------------
function OnPostApplyMachining()
-- Inizializzo codice di errore
EMC.ERR = 0
-- Verifico se ultima lavorazione della fase
local nNextOpeId = EgtGetNextActiveOperation( EMC.MCHID)
local bMchLast = ( not nNextOpeId or EgtGetOperationPhase( nNextOpeId) ~= EMC.PHASE) -- Agisco sui diversi percorsi della lavorazione
local nPathId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( EMC.MCHID, 'CL') or GDB_ID.NULL)
while nPathId do
-- recupero id del successivo
nPathId = EgtGetNext( nPathId)
-- verifico se ultimo percorso di ultima lavorazione della fase
local bLast = ( bMchLast and ( not nPathId))
-- se ultimo, elimino ritorno in home
if bLast then EgtRemoveOperationHome( EMC.MCHID) end
end
end
---------------------------------------------------------------------
function OnSpecialApplyMachining()
EgtOutLog( ' Lavorazione : ' .. EgtGetName( EMC.MCHID), 1)
@@ -820,7 +838,7 @@ function OnPostApplyMachining()
-- verifico se ultimo percorso di ultima lavorazione della fase
local bLast = ( bMchLast and ( not nPathId))
-- se ultimo, elimino ritorno in home
if bLast then EgtRemoveOperationHome( EMC.MCHID) end
-- if bLast then EgtRemoveOperationHome( EMC.MCHID) end
-- salvo lo stato dei carrelli
local OriTPos = EMC.TPOS
local OriY1Delta = EMC.Y1DELTA
BIN
View File
Binary file not shown.
+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.1c2'
PP_NVER = '3.1.3.2'
MIN_MACH_VER = '2.5k1'
MACH_NAME = EgtGetCurrMachineName()
+1
View File
@@ -20,6 +20,7 @@
2=d,OpenMinSafe,0
3=d,OpenOutRaw,0
4=l,MaxOptSize,0
5=b,AdjustFeed,1
[Mortising]
0=d,MaxElev,0
+13
View File
@@ -1,5 +1,18 @@
==== Common_ONE-PF Update Log ====
Versione 3.1c2 (17/03/2026)
- (SIM-GEN) Aggiunta OnSpecialApplyMachining per calcolare i carrelli da subito
- Aggiungendo OnSpecialApplyMachining, ora la OnSpecialGetPrevMachiningOffset lavora correttamente. ATT: MIN_MACH -> 3.1b2
Versione 3.1c1 (04/03/2026)
- (GEN) Corretta chiamata di una variabile insesistente in caso di ONE
- (SIM) Allineata simulazione a generazione
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
- (SIM-GEN) Piccola correzione modifiche fatte in precedenza
+2 -2
View File
@@ -3,8 +3,8 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '3.1a1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
VERSION = '3.1c2', -- versione script
MIN_MACH_VER_PP_COMMON = '3.1b2' -- versione minima kernel
}
return InfoCommon_STD_PP