Compare commits

...

6 Commits

Author SHA1 Message Date
andrea.villa e1be6d1584 Merge branch 'NewLink' into develop 2026-07-07 09:57:41 +02:00
andrea.villa 703e194ab8 Allineamento a common ver. 3.1g1 2026-07-07 09:52:47 +02:00
andrea.villa a858f6785d Allineamento con common ver. 3.1f1 2026-06-03 09:58:18 +02:00
daniele.nicoli 01435f40ea Aggiunto Clamp di sicurezza per lettura dei parametri MinJoin da Ts3Data 2026-04-23 12:04:42 +02:00
daniele.nicoli 8c19fd7c7f Merge branch 'master' into develop 2026-04-23 12:04:05 +02:00
andrea.villa d75fd52179 Merge branch 'develop' 2026-03-17 15:20:38 +01:00
7 changed files with 87 additions and 33 deletions
-8
View File
@@ -1,8 +0,0 @@
{
"Lua.diagnostics.globals": [
"EmtRemoveClimb",
"EmtAddClimb",
"EmtRemoveRise",
"EmtAddRise"
]
}
+2 -2
View File
@@ -121,8 +121,8 @@ if EgtExistsFile( sData) then
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.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.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.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 = Machine.Offsets.MIN_JOIN_S 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 = Machine.Offsets.MIN_JOIN_L end if Machine.Offsets.MIN_JOIN_L then BeamData.MIN_JOIN_L = EgtClamp( Machine.Offsets.MIN_JOIN_L, 300, 450) end
end end
if Machine.Trave then if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
+9 -4
View File
@@ -96,6 +96,10 @@ function OnSimulStart()
if DefTcPos2 then if DefTcPos2 then
LoadFirstTool( 2, DefTcPos2) LoadFirstTool( 2, DefTcPos2)
end end
-- se presenti, nascondo i tastatori
DeactivateProbeTool()
ExecStartHome() ExecStartHome()
-- Se reset o home, esco -- Se reset o home, esco
if EMT.SIM1ST then return end if EMT.SIM1ST then return end
@@ -130,7 +134,8 @@ function OnSimulStart()
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC1'}, { Grp = 'Base', Sub = 'COLLISION', Name = 'TC1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC2'}, { Grp = 'Base', Sub = 'COLLISION', Name = 'TC2'},
{ Grp = 'Base', Sub = 'BELT', Name = 'COLLISION'}, { Grp = 'Base', Sub = 'BELT', Name = 'COLLISION'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM'}} { Grp = 'X1', Sub = 'COLLISION', Name = 'STM'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM2'}}
if EgtGetHeadId( 'H21') then if EgtGetHeadId( 'H21') then
table.insert( McdData, { Grp = 'X2', Sub = 'COLLISION', Name = 'STM'}) table.insert( McdData, { Grp = 'X2', Sub = 'COLLISION', Name = 'STM'})
@@ -662,7 +667,7 @@ function OnSimulToolDeselect( dPrevA)
end end
-- se utensile non cambia e non è sega a catena, esco -- se utensile non cambia e non è sega a catena, esco
if ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and not HeadIsChainSaw( EMT.NEXTHEAD) then return end if bSkipToolChange or ( ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and not HeadIsChainSaw( EMT.NEXTHEAD)) then return end
-- deposito utensile -- deposito utensile
EgtOutText( 'Tool change in progress...') EgtOutText( 'Tool change in progress...')
-- se prossimo utensile sega a catena, devo mettere in home testa 1 e depositare l'utensile sulla testa 2 o viceversa -- se prossimo utensile sega a catena, devo mettere in home testa 1 e depositare l'utensile sulla testa 2 o viceversa
@@ -2569,7 +2574,7 @@ function GetHeadSetFromTcPos( sTcPos)
local TCPOS_2A = {} local TCPOS_2A = {}
local TCPOS_2B = {} local TCPOS_2B = {}
if EgtGetHeadId( 'H21') then if EgtGetHeadId( 'H21') then
TCPOS_1A = { 'T1', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10'} TCPOS_1A = { 'T1', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10', '501'}
TCPOS_1B = { 'T101'} TCPOS_1B = { 'T101'}
TCPOS_2A = { 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20'} TCPOS_2A = { 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20'}
TCPOS_2B = { 'T111'} TCPOS_2B = { 'T111'}
@@ -2577,7 +2582,7 @@ function GetHeadSetFromTcPos( sTcPos)
TCPOS_1A = { 'T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10'} TCPOS_1A = { 'T1', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7', 'T8', 'T9', 'T10'}
TCPOS_1B = { 'T101', 'T201'} TCPOS_1B = { 'T101', 'T201'}
TCPOS_1C = { 'T301'} TCPOS_1C = { 'T301'}
TCPOS_2A = { 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20'} TCPOS_2A = { 'T11', 'T12', 'T13', 'T14', 'T15', 'T16', 'T17', 'T18', 'T19', 'T20', '502'}
end end
for _, sVal in ipairs( TCPOS_1A) do for _, sVal in ipairs( TCPOS_1A) do
if sVal == sTcPos then return 1, 1 end if sVal == sTcPos then return 1, 1 end
+49 -13
View File
@@ -4,6 +4,12 @@
require( 'EmtGenerator') require( 'EmtGenerator')
EgtEnableDebug( false) EgtEnableDebug( false)
---------------------------------------------------------------------
-- *** Generic Machinings ***
---------------------------------------------------------------------
require( 'EmtGenMachining')
---------------------------------------------------------------------
-- Carico libreria -- Carico libreria
local BD = require( 'BeamData') local BD = require( 'BeamData')
@@ -320,6 +326,8 @@ function OnSpecialLink()
else else
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 30, 3, 2, 'UniqueRise=1;') EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 30, 3, 2, 'UniqueRise=1;')
end end
-- altrimenti collegamento tra due lavorazioni (3)
else
end end
-- se fresa su testa 2 -- se fresa su testa 2
@@ -422,19 +430,6 @@ function OnSpecialLink()
end end
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2, 'LastRise=1;') EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2, 'LastRise=1;')
-- se fine lavorazione con deposito utensile
elseif EMC.LINKTYPE == 2 then
-- retrazione
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)
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;', ''))
end
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2, 'LastRise=1;')
-- altrimenti collegamento tra due lavorazioni (3) -- altrimenti collegamento tra due lavorazioni (3)
else else
-- recupero quota massima di collegamento -- recupero quota massima di collegamento
@@ -979,6 +974,46 @@ function OnSpecialApplyMachining()
-- Recupero la posizione della trave e dei carrelli al termine della precedente operazione -- Recupero la posizione della trave e dei carrelli al termine della precedente operazione
local nPrevOpeId = EgtGetPrevActiveOperation( EMC.MCHID) local nPrevOpeId = EgtGetPrevActiveOperation( EMC.MCHID)
-- Se esiste lavorazione precedente ed è una tastatura
if nPrevOpeId and EgtGetOperationType( nPrevOpeId) == MCH_OY.PROBING then
-- se stessa testa e montato già utensile corretto
-- recupero valori assi alla fine della lavorazione precedente e all'inizio della corrente
local vPrevAxes = EmtGetFinalAxesPos( nPrevOpeId, true)
local vCurrAxes = EmtGetInitialAxesPos( EMC.MCHID, true)
-- info lavorazione precedente
EgtSetCurrMachining( nPrevOpeId)
local sPrevTool = EgtGetMachiningParam( MCH_MP.TOOL)
local sPrevHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local nSetHead = GetHeadSet( sPrevHead)
local bPrevIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
-- info lavorazione corrente
EgtSetCurrMachining( EMC.MCHID)
local sCurrTool = EgtGetMachiningParam( MCH_MP.TOOL)
local sCurrHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
nSetHead = GetHeadSet( sCurrHead)
local bCurrIsFirstHead = ( nSetHead == 1 or nSetHead == 11)
-- se utensile corrente è compatibile (significa che è già stato precaricato) se stessa testa e con stessa configurazioen assi rotanti, annullo risalita
if IsToolCompatibleWithProbe( sCurrTool, sPrevTool) and bPrevIsFirstHead == bCurrIsFirstHead and abs( vCurrAxes[4] - vPrevAxes[4]) < 1 and abs( vCurrAxes[5] - vPrevAxes[5]) < 1 then
-- in lavorazione precedente elimino eventuale retrazione a Zmax
EmtRemoveRise( nPrevOpeId)
-- in lavorazione corrente elimino eventuale approccio da Zmax
EmtRemoveClimb( EMC.MCHID)
-- prendo sempre la Z massima tra le due
local vClimbPoint
if vCurrAxes[3] - 1.0 < vPrevAxes[3] then
vClimbPoint = vCurrAxes
vCurrAxes[3] = vPrevAxes[3]
elseif vPrevAxes[3] - 1.0 < vCurrAxes[3] then
vClimbPoint = vPrevAxes
vPrevAxes[3] = vCurrAxes[3]
end
EmtAddClimb( EMC.MCHID, vClimbPoint, 4, 1, 0)
end
end
-- Recupero la posizione della trave e dei carrelli al termine della precedente operazione
-- se precedente operazione non esiste, errore -- se precedente operazione non esiste, errore
if not nPrevOpeId then if not nPrevOpeId then
EMC.ERR = 1 EMC.ERR = 1
@@ -1505,6 +1540,7 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
local dDistFront = - ptMax:getX() - LoadT - dHeadFront local dDistFront = - ptMax:getX() - LoadT - dHeadFront
local dDistBack = ptMin:getX() + LoadT + EMC.LB - dHeadBack local dDistBack = ptMin:getX() + LoadT + EMC.LB - dHeadBack
EgtOutLog( ' DistFront = ' .. EgtNumToString( dDistFront, 1) .. ' DistBack = ' .. EgtNumToString( dDistBack, 1), 3) EgtOutLog( ' DistFront = ' .. EgtNumToString( dDistFront, 1) .. ' DistBack = ' .. EgtNumToString( dDistBack, 1), 3)
return dDistFront, dDistBack, dRollFront, dRollBack return dDistFront, dDistBack, dRollFront, dRollBack
end end
+4 -3
View File
@@ -32,9 +32,9 @@
require( 'EmtGenerator') require( 'EmtGenerator')
EgtEnableDebug( false) EgtEnableDebug( false)
PP_VER = '3.1f1_RC11' PP_VER = '3.1g1'
PP_NVER = '3.1.6.1' PP_NVER = '3.1.7.1'
MIN_MACH_VER = '2.7a1' MIN_MACH_VER = '3.1f1'
MACH_NAME = EgtGetCurrMachineName() MACH_NAME = EgtGetCurrMachineName()
@@ -950,6 +950,7 @@ function OnSetHead()
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-------------------------- Testa utilizzata -------------------------
function GetHeadSet( sHead) function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H15' or sHead == 'H17' then if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H15' or sHead == 'H17' then
return 1 return 1
+21 -1
View File
@@ -1,10 +1,30 @@
==== Common_ONE-PF Update Log ==== ==== Common_ONE-PF Update Log ====
Versione 3.1g1 (07/07/2026)
- (ALL) Prima versione con gestione nuovi link (no tastatore)
- Gestione lavorazioni in doppio
- Preselezione utensile gestibile da parametri TS3
- Gestione Drilling e Pocketing NT
Versione 3.1f5 (26/06/2026)
- (SIM-GEN) Se tasca con motosega in faccia sopra e pezzo alto, si ruota in sicurezza.
Versione 3.1f4 (17/06/2026)
- (MLDE-GEN) Corretta preselezione in caso di testa in lavoro troppo vicina a quella che sta preselezionando. Da aggiungere in MLDE parametri 'Limit_T1_Presel_T2' e 'Limit_T2_Presel_T1'
Versione 3.1f3 (08/06/2026)
- (GEN) M77 viene ora eseguita, prima era commentata.
Versione 3.1f2 (05/06/2026)
- (MLDE-GEN) Aggiunti parametri di limite asse X per decidere se fare preselezione su altra testa. Serve modifica MLDE
Versione 3.1f1 (03/06/2026)
- (NGE-MLDE-GEN-SIM) Versione unificata con predisposizione per gestione tastatori. Serve modificare anche la macchina, per ora gestione completa solo su PFrl.
Versione 3.1c2 (17/03/2026) Versione 3.1c2 (17/03/2026)
- (SIM-GEN) Aggiunta OnSpecialApplyMachining per calcolare i carrelli da subito - (SIM-GEN) Aggiunta OnSpecialApplyMachining per calcolare i carrelli da subito
- Aggiungendo OnSpecialApplyMachining, ora la OnSpecialGetPrevMachiningOffset lavora correttamente. ATT: MIN_MACH -> 3.1b2 - Aggiungendo OnSpecialApplyMachining, ora la OnSpecialGetPrevMachiningOffset lavora correttamente. ATT: MIN_MACH -> 3.1b2
Versione 3.1c1 (04/03/2026) Versione 3.1c1 (04/03/2026)
- (GEN) Corretta chiamata di una variabile insesistente in caso di ONE - (GEN) Corretta chiamata di una variabile insesistente in caso di ONE
- (SIM) Allineata simulazione a generazione - (SIM) Allineata simulazione a generazione
+2 -2
View File
@@ -3,8 +3,8 @@
local InfoCommon_STD_PP = { local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '3.1c2', -- versione script VERSION = '3.1g1', -- versione script
MIN_MACH_VER_PP_COMMON = '3.1b2' -- versione minima kernel MIN_MACH_VER_PP_COMMON = '3.1f1' -- versione minima kernel
} }
return InfoCommon_STD_PP return InfoCommon_STD_PP