Compare commits
13 Commits
3.1f1_RC10
..
3.1g2
| Author | SHA1 | Date | |
|---|---|---|---|
| 2eeb5f2e43 | |||
| 578848df0b | |||
| 4846e95a47 | |||
| 666b075c2c | |||
| 32af3789a2 | |||
| 9e00046400 | |||
| 9e8c67fcb8 | |||
| 3c8ef31433 | |||
| b89e384dbc | |||
| d3aac014b7 | |||
| 87ebd3a20d | |||
| 8e46749ecd | |||
| c083e04e59 |
@@ -599,7 +599,7 @@ function OnMachiningEnd()
|
||||
local sOut = 'G156 EA'..tostring( EMT.PRODID)..' EB'..tostring( EMT.PATTID)..' EC'..tostring( EMT.CUTID)..' ED2'
|
||||
EmtOutput( sOut)
|
||||
end
|
||||
elseif not EMT.PREROT then
|
||||
elseif not EMT.PREROT and not EMT.SPECSPLIT then
|
||||
EmtOutput( 'M77')
|
||||
end
|
||||
end
|
||||
|
||||
+75
-48
@@ -609,63 +609,76 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnSimulToolDeselect( dPrevA)
|
||||
-- se utensile corrente è sega a catena, devo depositarla
|
||||
if HeadIsChainSaw( EMT.PREVHEAD_H1) then
|
||||
-- visualizzo utensile su TcPos
|
||||
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
|
||||
-- nascondo l'utensile sulla testa
|
||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||
-- se non è chiamata per cambio angolo di presa della sega a catena
|
||||
local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 1, false)
|
||||
if not dPrevA or not sTool then
|
||||
|
||||
-- se ToolDeselect chiamata da MLPE, bisogna scaricare perchè è ultimo movimento di rise e poi si cambia utensile
|
||||
if dPrevA then
|
||||
local dHeadSet = GetHeadSet( EMT.HEAD)
|
||||
-- se utensile corrente è sega a catena, devo depositarla
|
||||
if dHeadSet == 1 and HeadIsChainSaw( EMT.HEAD) then
|
||||
-- visualizzo utensile su TcPos
|
||||
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
|
||||
-- nascondo l'utensile sulla testa
|
||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||
-- si cerca prossimo utensile
|
||||
local sTool, sHead, sTcPos, bCarrMove = FindNextToolOnHeadSet( 1, false)
|
||||
-- imposto correttamente i dati di testa
|
||||
local OrigEMC = EMC
|
||||
EMC = { HEAD = sHead, TOOL = sTool, TCPOS = sTcPos, TOTDIAM = 0}
|
||||
EMC = { HEAD = sHead or 'H11', TOOL = sTool, TCPOS = sTcPos, TOTDIAM = 0}
|
||||
OnSetHead()
|
||||
EMC = OrigEMC
|
||||
local dHomeX1 = EgtGetAxisHomePos( 'X1')
|
||||
local dHomeC1 = EgtGetAxisHomePos( 'C1')
|
||||
local dHomeB1 = EgtGetAxisHomePos( 'B1')
|
||||
-- se c'è prossimo utensile, oppure se non c'è e c'è un movimento carrelli
|
||||
if sTool or ( not sTool and bCarrMove) then
|
||||
|
||||
-- cambio utensile
|
||||
EgtSetAxisPos( 'C1', dHomeC1)
|
||||
EgtSetAxisPos( 'B1', dHomeB1)
|
||||
EgtSetAxisPos( 'Z1', MaxZ1)
|
||||
SimulMoveAxis( 'X1', dHomeX1, MCH_SIM_STEP.RAPID)
|
||||
if sTcPos then
|
||||
LoadNextTool( 1, DefTcPos1)
|
||||
local dHomeX1 = EgtGetAxisHomePos( 'X1')
|
||||
local dHomeC1 = EgtGetAxisHomePos( 'C1')
|
||||
local dHomeB1 = EgtGetAxisHomePos( 'B1')
|
||||
|
||||
-- cambio utensile
|
||||
EgtSetAxisPos( 'C1', dHomeC1)
|
||||
EgtSetAxisPos( 'B1', dHomeB1)
|
||||
EgtSetAxisPos( 'Z1', MaxZ1)
|
||||
SimulMoveAxis( 'X1', dHomeX1, MCH_SIM_STEP.RAPID)
|
||||
if sTcPos then
|
||||
LoadNextTool( 1, sTcPos)
|
||||
end
|
||||
end
|
||||
EMT.CHSAW_OUT = nil
|
||||
end
|
||||
elseif HeadIsChainSaw( EMT.PREVHEAD_H2) then
|
||||
-- visualizzo utensile su TcPos
|
||||
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
|
||||
-- nascondo l'utensile sulla testa
|
||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||
-- se non è chiamata per cambio angolo di presa della sega a catena
|
||||
local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 2, false)
|
||||
if not dPrevA or not sTool then
|
||||
-- cambio utensile
|
||||
EgtSetAxisPos( 'C2', ParkC2)
|
||||
EgtSetAxisPos( 'B2', ParkB2)
|
||||
EgtSetAxisPos( 'Z2', MaxZ2)
|
||||
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
|
||||
elseif dHeadSet == 2 and HeadIsChainSaw( EMT.HEAD) then
|
||||
-- visualizzo utensile su TcPos
|
||||
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
|
||||
-- nascondo l'utensile sulla testa
|
||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||
-- imposto correttamente i dati di testa
|
||||
local sTool, sHead, sTcPos, bCarrMove = FindNextToolOnHeadSet( 2, false)
|
||||
local OrigEMC = EMC
|
||||
EMC = { HEAD = sHead or 'H21', TOOL = sTool, TCPOS = sTcPos, TOTDIAM = 0}
|
||||
OnSetHead()
|
||||
EMC = OrigEMC
|
||||
if sTcPos then
|
||||
LoadNextTool( 2, DefTcPos2)
|
||||
-- se c'è prossimo utensile, oppure se non c'è e c'è un movimento carrelli
|
||||
if sTool or ( not sTool and bCarrMove) then
|
||||
|
||||
local dHomeX2 = EgtGetAxisHomePos( 'X2')
|
||||
local dHomeC2 = EgtGetAxisHomePos( 'C2')
|
||||
local dHomeB2 = EgtGetAxisHomePos( 'B2')
|
||||
|
||||
-- cambio utensile
|
||||
EgtSetAxisPos( 'C2', dHomeC2)
|
||||
EgtSetAxisPos( 'B2', dHomeB2)
|
||||
EgtSetAxisPos( 'Z2', MaxZ2)
|
||||
SimulMoveAxis( 'X2', dHomeX2, MCH_SIM_STEP.RAPID)
|
||||
if sTcPos then
|
||||
LoadNextTool( 2, sTcPos)
|
||||
end
|
||||
end
|
||||
EMT.CHSAW_OUT = nil
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
EMT.CHSAW_OUT = nil
|
||||
|
||||
-- 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
|
||||
-- deposito utensile
|
||||
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
|
||||
|
||||
local dHeadSet = GetHeadSet( EMT.PREVHEAD)
|
||||
|
||||
@@ -678,12 +691,14 @@ function OnSimulToolDeselect( dPrevA)
|
||||
'B2', EgtGetAxisHomePos( 'B2'), MCH_SIM_STEP.COLLROT, 'C2', EgtGetAxisHomePos( 'C2'), MCH_SIM_STEP.COLLROT)
|
||||
end
|
||||
|
||||
if dHeadSet == 1 then
|
||||
local dNextHeadSet = GetHeadSet( EMT.NEXTHEAD)
|
||||
|
||||
if dNextHeadSet == 1 then
|
||||
-- visualizzo utensile su TcPos
|
||||
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
|
||||
-- nascondo l'utensile sulla testa
|
||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||
else
|
||||
elseif dNextHeadSet == 2 then
|
||||
-- visualizzo utensile su TcPos
|
||||
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
|
||||
-- nascondo l'utensile sulla testa
|
||||
@@ -2614,7 +2629,7 @@ function FindNextToolOnHeadSet( nHSet, bFirst)
|
||||
local CurrMachId = EgtGetCurrMachining()
|
||||
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||
-- cerco lavorazione con utensile su gruppo testa indicato
|
||||
local sTool, sHead, sTcPos
|
||||
local sTool, sHead, sTcPos, bCarrMove
|
||||
local OpId
|
||||
if bFirst then
|
||||
OpId = EgtGetFirstActiveOperation()
|
||||
@@ -2627,12 +2642,20 @@ function FindNextToolOnHeadSet( nHSet, bFirst)
|
||||
if EgtSetCurrMachining( OpId) then
|
||||
local sNextTool = EgtGetMachiningParam( MCH_MP.TOOL)
|
||||
if EgtTdbSetCurrTool( sNextTool) then
|
||||
local nClId = EgtGetFirstNameInGroup( OpId, 'CL') -- recupero Id del gruppo CL della lavorazione corrente
|
||||
local nPathId = EgtGetFirstInGroup( nClId or GDB_ID.NULL) -- Id del primo gruppo nella lavorazione (P1)
|
||||
local dAuxMoveCount = EgtGetInfo( nPathId, 'AS#', 'd') or 0 -- numero di movimenti ausiliari
|
||||
if dAuxMoveCount > 3 then
|
||||
bCarrMove = true
|
||||
end
|
||||
local sNextHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||
if GetHeadSet( sNextHead) == nHSet and EMT.TOOL ~= sNextTool then
|
||||
if not HeadIsChainSaw( sNextHead) then
|
||||
sHead = sNextHead
|
||||
sTool = sNextTool
|
||||
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
|
||||
if GetHeadSet( sNextHead) == nHSet then
|
||||
if EMT.TOOL ~= sNextTool then
|
||||
if not HeadIsChainSaw( sNextHead) then
|
||||
sHead = sNextHead
|
||||
sTool = sNextTool
|
||||
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
|
||||
end
|
||||
end
|
||||
break
|
||||
end
|
||||
@@ -2641,11 +2664,15 @@ function FindNextToolOnHeadSet( nHSet, bFirst)
|
||||
end
|
||||
OpId = EgtGetNextActiveOperation( OpId)
|
||||
end
|
||||
-- se non c'è un operazione, significa che è fine pezzo, quindi si forza movimento carrelli perchè avverrà uno scarico
|
||||
if not OpId then
|
||||
bCarrMove = true
|
||||
end
|
||||
-- ripristino stato iniziale
|
||||
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
|
||||
EgtTdbSetCurrTool( CurrTool or '')
|
||||
-- restituisco risultato
|
||||
return sTool, sHead, sTcPos
|
||||
return sTool, sHead, sTcPos, bCarrMove
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
+2
-13
@@ -320,6 +320,8 @@ function OnSpecialLink()
|
||||
else
|
||||
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 30, 3, 2, 'UniqueRise=1;')
|
||||
end
|
||||
-- altrimenti collegamento tra due lavorazioni (3)
|
||||
else
|
||||
end
|
||||
|
||||
-- se fresa su testa 2
|
||||
@@ -422,19 +424,6 @@ function OnSpecialLink()
|
||||
end
|
||||
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)
|
||||
else
|
||||
-- recupero quota massima di collegamento
|
||||
|
||||
+6
-5
@@ -32,9 +32,9 @@
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '3.1f1_RC10'
|
||||
PP_NVER = '3.1.6.1'
|
||||
MIN_MACH_VER = '2.5k1'
|
||||
PP_VER = '3.1g2'
|
||||
PP_NVER = '3.1.7.2'
|
||||
MIN_MACH_VER = '3.1f4'
|
||||
MACH_NAME = EgtGetCurrMachineName()
|
||||
|
||||
-- Carico i dati globali
|
||||
@@ -224,7 +224,7 @@ if EgtExistsFile( sData) then
|
||||
-- aggiustamenti
|
||||
MinY1 = MinV1 + MinDeltaYV
|
||||
MaxY1 = MaxMchY1
|
||||
ParkV1 = MaxV1
|
||||
ParkV1 = MaxV1
|
||||
ParkY1 = ParkV1 + MinDeltaYV
|
||||
MinY2 = MinMchY2
|
||||
MaxY2 = MaxV2 - MinDeltaYV
|
||||
@@ -890,6 +890,7 @@ function GetHeadTCSet( sHead, sTcPos)
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- Funzione che restituisce l'altezza del pezzo in lavorazione
|
||||
function GetRawHeight()
|
||||
@@ -978,7 +979,7 @@ end
|
||||
-- Funzione per impostare spia stato morsa carrello Y1
|
||||
function SetPY1Light( bClosed)
|
||||
if not PY1LightId then return end
|
||||
EgtSetColor( PY1LightId, EgtIf( bClosed, 'RED', 'LIME'))
|
||||
EgtSetColor( PY1LightId, EgtIf( bClosed, 'RED', 'LIME'))
|
||||
if bClosed then
|
||||
EgtSetInfo( PY1LightId, 'On', '1')
|
||||
else
|
||||
|
||||
Binary file not shown.
+24
-1
@@ -1,10 +1,33 @@
|
||||
==== Common_ONE-PF Update Log ====
|
||||
|
||||
Versione 3.1g2 (07/07/2026)
|
||||
- (SIM) Corretta gestione cambio utensile con motosega
|
||||
|
||||
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)
|
||||
- (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
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_ONE-PF', -- nome script PP standard
|
||||
VERSION = '3.1c2', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '3.1b2' -- versione minima kernel
|
||||
VERSION = '3.1g2', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '3.1f1' -- versione minima kernel
|
||||
}
|
||||
|
||||
return InfoCommon_STD_PP
|
||||
|
||||
Reference in New Issue
Block a user