Compare commits

..

101 Commits

Author SHA1 Message Date
andrea.villa c77b337f80 - Prima versione New Link
- Allineamento con common ver. 3.1g2
2026-07-08 15:51:58 +02:00
andrea.villa d624434c2e Allineamento con common ver. 3.1f5 2026-06-26 12:59:15 +02:00
andrea.villa a43c46ded2 Allineamento con comon ver. 3.1f4 2026-06-17 09:05:56 +02:00
andrea.villa 2bda916a16 Allineamento a common ver. 3.1f3 2026-06-08 14:44:51 +02:00
andrea.villa 42752eefcd Cambio versione 2026-06-08 10:15:20 +02:00
andrea.villa 86c030f38e Allineamento con common vr.3.1f2 2026-06-05 12:10:44 +02:00
andrea.villa 7d8bb8f03e Tolto debug 2026-06-03 13:08:13 +02:00
andrea.villa 016122276d Cambio versione 2026-06-03 12:23:50 +02:00
andrea.villa 0e78fe9c40 HOTFIX problema simulazione 2026-06-03 11:51:06 +02:00
andrea.villa 6b81b0b686 Merge remote-tracking branch 'origin/develop' 2026-06-03 10:04:29 +02:00
andrea.villa 3c6ed86e75 Allineamento a common ver. 3.1f1 2026-06-03 10:04:16 +02:00
andrea.villa 8984f91cbc Merge branch 'ProbingWithTool' into develop 2026-06-03 10:03:14 +02:00
andrea.villa 2a93cace52 Piccola modifica GetSetHead 2026-06-03 10:02:58 +02:00
andrea.villa 7fd266f3dd Merge remote-tracking branch 'origin/develop' into ProbingWithTool 2026-05-29 13:16:22 +02:00
daniele.nicoli 64d0a46970 Aggiunto Clamp di sicurezza per lettura dei parametri MinJoin da Ts3Data 2026-04-23 12:22:39 +02:00
daniele.nicoli 58db14bc02 Merge remote-tracking branch 'origin/master' into develop 2026-04-23 12:21:55 +02:00
andrea.villa 1ee22cf974 - Merge branch 'master' into ProbingWithTool
- Prima versione installata in macchina da cliente
2026-04-23 10:55:41 +02:00
andrea.villa 87d240b49f Merge remote-tracking branch 'origin/develop' 2026-03-17 15:22:53 +01:00
andrea.villa 14b225a4b0 Allineamento a common ver. 3.1c2 2026-03-17 15:22:40 +01:00
daniele.nicoli d7aa89fad5 Aggiunto info "PreviewShow" per anteprima utensile/testa nel MACH 2026-03-09 09:16:54 +01:00
daniele.nicoli 11459ac20b Aggiunto info "PreviewShow" per anteprima utensile/testa nel MACH 2026-03-09 08:45:06 +01:00
daniele.nicoli ecfae285f3 Aggiunti parametri letti da TS3Data.lua: MIN_JOIN_S, MIN_JOIN_L e MAX_ANGLE_DRILL_CUT 2026-03-05 14:58:47 +01:00
daniele.nicoli db78493a2a Merge remote-tracking branch 'origin/master' into develop 2026-03-05 14:55:54 +01:00
andrea.villa 88d53d6195 Merge remote-tracking branch 'origin/develop' 2026-02-20 09:16:45 +01:00
andrea.villa 81ee9426c1 Allineamento con common ver. 3.1b1 2026-02-20 09:16:32 +01:00
daniele.nicoli c578b2c03d Aggiunta la lettura da TS3Data.lua delle corse dell'asse W (MIN_W e MAX_W) 2026-02-03 11:10:19 +01:00
daniele.nicoli 8ccbe8263e Merge branch 'master' into develop 2026-02-03 11:09:54 +01:00
andrea.villa 1f9a271e7b Allineamento con common ver. 3.1a1 2026-01-16 15:49:36 +01:00
andrea.villa 72cf8717b2 Merge branch 'develop' 2025-12-18 16:17:03 +01:00
andrea.villa af58e92003 - Allineamento a common ver. 2.7l1
- Aggiunto parametro MAX_ANGLE_DRILL_CUT a BeamData
- Recupero nome macchina da funzione EGT
2025-12-18 16:16:47 +01:00
daniele.nicoli 232d5a36c7 Aggiornati mlde e nge in attesa di aggiornamento Common per Controllo Pinzaggio VMILL 2025-12-15 11:39:19 +01:00
daniele.nicoli 957942b623 Merge branch 'master' into develop 2025-12-15 10:57:37 +01:00
andrea.villa 5970cd61c1 Corretto disegno porta utensile 2025-12-11 09:29:16 +01:00
andrea.villa e6a6169f45 - Nuovo ToolHolder
- Allineamento con common ver. 2.7k3
2025-11-28 15:45:30 +01:00
andrea.villa 860e1fc5c1 Merge branch 'develop' 2025-11-20 17:01:24 +01:00
andrea.villa b4b11607e4 - Allineamento a common ver. 2.7k2
- Cambio versione per rilascio a cliente
2025-11-20 17:01:15 +01:00
daniele.nicoli eef2c16193 Aggiunta gestione CUT_SIC impostabile da TS3Data.lua 2025-11-13 12:39:22 +01:00
daniele.nicoli ce72052463 Merge branch 'master' into develop 2025-11-13 12:38:46 +01:00
andrea.villa f9b4eab0c9 Allineamento con common ver. 2.7k1 2025-11-05 13:27:09 +01:00
andrea.villa 7b4293688d Allineamento con common ver. 2.7j3 2025-10-23 07:54:10 +02:00
andrea.villa a2c3e80b5b Merge remote-tracking branch 'origin/master' into ProbingWithTool 2025-10-21 10:52:35 +02:00
andrea.villa 09baa44e02 #critical# Allineamento con common ver. 2.7j2 2025-10-21 10:51:45 +02:00
andrea.villa a280c0ea3d Merge branch 'master' into ProbingWithTool 2025-10-08 13:18:56 +02:00
andrea.villa 0dea456d13 Allineamento con common ver. 2.7j1 2025-10-08 13:17:42 +02:00
andrea.villa 9f3fbfe597 Merge branch 'master' into ProbingWithTool 2025-09-10 12:13:38 +02:00
andrea.villa 24d88cde41 Allineamento con common ver. 2.7i1, HOTFIX 2025-09-10 12:13:11 +02:00
andrea.villa eeb9a93132 Aggiornato NGE con Aggregato BH 2025-09-10 11:21:07 +02:00
andrea.villa 76c52eecce Merge branch 'master' into ProbingWithTool 2025-09-10 11:13:07 +02:00
andrea.villa e5ee956c8e Merge remote-tracking branch 'origin/develop' 2025-09-10 10:40:42 +02:00
andrea.villa 5e1c975ef7 - Allineamento common ver. 2.7i1
- Aggiunto solido collisione per tappeto
2025-09-10 10:40:28 +02:00
andrea.villa 842c491713 Merge branch 'NewAggregateBH' into develop 2025-09-10 10:38:33 +02:00
andrea.villa 09aacf8327 - Prima versione funzionante gestione motosega da sotto diretta verso l'alto
- Aggiunto solido collisione a NGE
2025-08-29 15:58:05 +02:00
andrea.villa 9c7e546e47 Merge branch 'develop' into ProbingWithTool 2025-08-28 15:26:00 +02:00
andrea.villa d49127232e Merge branch 'develop' into NewAggregateBH 2025-08-28 15:21:27 +02:00
andrea.villa 6627aae2de Merge branch 'master' into develop 2025-08-28 15:20:55 +02:00
andrea.villa 1b613a97a4 Allineamento con common ver. 2.7h2 2025-08-28 15:20:17 +02:00
andrea.villa 53e583b9d2 Merge branch 'master' into NewAggregateBH 2025-08-20 14:41:31 +02:00
andrea.villa 12e7ee1e0e Allineamento con common ver. 2.7h1 2025-08-20 14:40:41 +02:00
andrea.villa 8c31dbcf51 Prima versione funzionante aggregato BH. Da testare in macchina! 2025-07-24 08:55:08 +02:00
andrea.villa 321a91ae5e Merge remote-tracking branch 'origin/master' into ProbingWithTool 2025-07-23 12:29:53 +02:00
andrea.villa 4cc33e3b95 - Allineamento con common ver. 2.7g4
- Aggiunto parametro MaxBackClamp5
2025-07-23 12:25:52 +02:00
andrea.villa a4b6a9c93f Allineamento con common ver. 2.7g3 2025-07-22 11:22:06 +02:00
andrea.villa dc4bf6f405 Aggiunta nuovo tipo di lavorazione 2025-07-21 09:00:48 +02:00
andrea.villa fbea0da2dd Allineamento con common ver. 2.7g2 2025-07-08 10:39:13 +02:00
andrea.villa 7284b417a9 Allineamento con common ver. 2.7g1 2025-07-01 10:41:34 +02:00
andrea.villa 449f03fb09 - IsToolCompatibleWithProbe spostata in MLDE
- in OnPostApplyMachining si salta risalita se tastatura e utensile già precaricato. NB: serve CAM5 2.7f3
2025-06-30 16:02:09 +02:00
andrea.villa 7c91df35fc - Spostate funzioni da MLPE a MLDE perchè servono anche a MLSE
- In MLSE su lavorazione tastatura, si seleziona utensile di default sul mandrino per calcoli ingombri per paratie
2025-06-27 16:38:57 +02:00
andrea.villa 0d99310258 Cambiati limiti feed massima pinze 2025-06-25 09:58:27 +02:00
andrea.villa 0b49335c8e Corretto calcolo accelerazioni massima/minima 2025-06-25 08:39:01 +02:00
andrea.villa 0d87a703ce Corretto nome file 2025-06-23 17:58:31 +02:00
andrea.villa 475b0a7ebf - Se si mantiene utensile vecchio, allora si ribadiscono i dati vecchi
- Aggiunta lista lavorazioni probing
2025-06-23 15:06:38 +02:00
luca.mazzoleni 28c911ebe1 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-PFrl 2025-06-23 15:03:33 +02:00
luca.mazzoleni a613078e3f update BeamData.GetSetupInfo per nuovo automatismo 2025-06-23 15:03:25 +02:00
andrea.villa c54ddd02e9 Disattivazione tastatura spostata prima della risalita a Z massima 2025-06-20 11:39:26 +02:00
andrea.villa fd9314ea5a Aggiunto aggregato BIG per motosega 2025-06-20 10:27:07 +02:00
andrea.villa d075af1a91 Corretta lettura posizione home testa 1 2025-06-18 18:20:59 +02:00
andrea.villa f229fae4d3 Corretto segni movimento pre e post tastatura 2025-06-18 16:58:20 +02:00
andrea.villa 5219330a4d Cambio versione per rilascio a Essetre 2025-06-18 15:26:14 +02:00
andrea.villa fd85570cfd Corretta disattivazione tastatura 2025-06-18 15:21:59 +02:00
andrea.villa 2adb157b28 - Corretto ingombro lavorazione in caso di tastatura
- Migliorie generazione
2025-06-17 18:20:13 +02:00
andrea.villa 5e6121703c - Se tastatura orizzontale, ci si alza sopra pezzo in sicurezza
- Prima versione scrittura macro tastatura
2025-06-17 12:14:34 +02:00
andrea.villa 5316abecf4 In generazione, si seleziona utensile compatibile per tastatura 2025-06-17 10:34:02 +02:00
andrea.villa f958dc8a0a Simulazione con movimenti corretti. 2025-06-16 10:45:48 +02:00
andrea.villa 4989ae5d99 Prima versione funzionante in simulazione 2025-06-13 16:50:55 +02:00
andrea.villa 9ac0aafea0 Aggiunta lavorazione e primi test 2025-06-11 17:30:59 +02:00
andrea.villa 1c047b1890 Aggiunto testa in TC e varie info 2025-06-11 12:37:59 +02:00
andrea.villa 7eea1439c4 Prima versione gestione Probe con utensile dedicato 2025-06-11 11:00:25 +02:00
andrea.villa 7b35cccaf5 Corretto indice faccia e legato al tipo di macchina, carico desto o sinistro. 2025-06-11 10:02:37 +02:00
andrea.villa da6d0bed2a Movimento tastatura aumentato a 20mm. Poi bisognerà metterlo a configurazione 2025-06-11 09:29:08 +02:00
andrea.villa 75ff61f3dc Cambio versione 2025-06-10 10:01:47 +02:00
andrea.villa dba8997045 Quando fa tastatura, si scrivono comandi di start del movimento 2025-06-10 10:01:06 +02:00
andrea.villa 263758a422 Dopo tastatura ci si sposta nel punto delle lavorazione o in Z sopra al pezzo 2025-06-06 12:36:14 +02:00
andrea.villa 1e6bc44019 Tastatore portato a 170 2025-06-06 10:25:09 +02:00
andrea.villa 0909656a6c Azzeramento tastatura con EF0 2025-06-06 10:23:08 +02:00
andrea.villa 23e17d9623 Prima della macro tastatura, si manda la testa nel punto dal quale azionare il tastatore. Per il momento si tasta sempre al centro della trave in altezza se facce verticali, o al centro in larghezza se faccia sopra. La posizione della trave invece è quella di lavorazione. 2025-06-06 09:17:32 +02:00
andrea.villa 7ba04b6e17 - Migliorata gestione presenza Probe
- Probe settato false per default
2025-06-04 15:55:16 +02:00
andrea.villa 67401b8799 Piccola correzione calcolo accelerazioni 2025-06-04 15:46:54 +02:00
andrea.villa 8b9a77cdaf - Allineamento con common ver. 2.7f1
- Gestione parametri accelerazioni pinze
2025-06-04 15:43:07 +02:00
andrea.villa 9662b22f03 Proma versione gestione PROBE 2025-06-04 11:48:35 +02:00
andrea.villa 9bbc62bea8 Allineamento con common ver.2.7e1 2025-05-28 15:24:17 +02:00
andrea.villa 20fd75ba0b - Allineamento con common ver. 2.7d1
- Aggiornamento MachNotes
- Lettura PRECUT per automatismo
2025-04-28 13:36:12 +02:00
18 changed files with 2469 additions and 2155 deletions
+28
View File
@@ -42,6 +42,7 @@ local BeamData = {
DRILL_TOL = 0.2, -- tolleranza tra diametro foro e diametro punta
DRILL_VZ_MIN = - 0.51, -- componente limite in Z del versore di un foro
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
MAX_ANGLE_DRILL_CUT = 15, -- delta angolo massimo tra foro e taglio che lo attraversa
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
MAX_DIST_HTFEA = 50.0, -- massima distanza di feature da testa o coda per essere considerata tale
@@ -68,11 +69,16 @@ local BeamData = {
KIOTP = 5, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
MAXDIAM_POCK_CORNER = 31, -- diametro massimo utensile ammesso per tasche con angoli interni
USE_LONGCUT = true, -- per i tagli longitudinali usare solo la lavorazione di lama LongCut
HEAD_DIM_FOR_BH = 125, -- dimensione di ingombro della testa per block haus
MAX_LEN_BH_FROM_BOTTOM = 210, -- massima lunghezza lavorabile da un lato di block haus da sotto
MAX_DIST_BH_FROM_BOTTOM = 600, -- massima distanza tra naso mandrino e sopra della trave senza collisione
ADVANCE_TAIL_CUT = true, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con robabile caduta
ADVANCE_TAIL_OFFS = 10, -- accorciamento taglio di coda avanzato (minimo 1)
DOUBLE_HEAD_DOVETAIL = false, -- flag abilitazione lavorazione mortase a coda di rondine in doppio
DOUBLE_HEAD_MORTISE = false, -- flag abilitazione lavorazione mortase in doppio
DOUBLE_HEAD_DRILLING = false, -- flag abilitazione forature in doppio
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda
CLAMP5 = false -- presenza pinza speciale per pezzi piccoli
}
@@ -97,6 +103,8 @@ if EgtExistsFile( sData) then
if Machine.Offsets.DOUBLE_HEAD_DOVETAIL then BeamData.DOUBLE_HEAD_DOVETAIL = ( Machine.Offsets.DOUBLE_HEAD_DOVETAIL == 1) end
if Machine.Offsets.DOUBLE_HEAD_MORTISE then BeamData.DOUBLE_HEAD_MORTISE = ( Machine.Offsets.DOUBLE_HEAD_MORTISE == 1) end
if Machine.Offsets.DOUBLE_HEAD_DRILLING then BeamData.DOUBLE_HEAD_DRILLING = ( Machine.Offsets.DOUBLE_HEAD_DRILLING == 1) end
if Machine.Offsets.PRECUT_HEAD_DISABLE then BeamData.PRECUT_HEAD = ( Machine.Offsets.PRECUT_HEAD_DISABLE == 0) end
if Machine.Offsets.PRECUT_TAIL_DISABLE then BeamData.PRECUT_TAIL = ( Machine.Offsets.PRECUT_TAIL_DISABLE == 0) end
BeamData.MINRAW_S = max( BeamData.MINRAW_S, Machine.Offsets.MINRAW_S or BeamData.MINRAW_S)
BeamData.MINRAW_L = max( BeamData.MINRAW_L, Machine.Offsets.MINRAW_L or BeamData.MINRAW_L)
BeamData.CUT_EXTRA = Machine.Offsets.CUT_EXTRA or BeamData.CUT_EXTRA
@@ -104,6 +112,17 @@ if EgtExistsFile( sData) then
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER
BeamData.LONGCUT_ENDLEN = Machine.Offsets.LONGCUT_ENDLEN or BeamData.LONGCUT_ENDLEN
BeamData.LONGCUT_MAXLEN = Machine.Offsets.LONGCUT_MAXLEN or BeamData.LONGCUT_MAXLEN
BeamData.ADVANCE_TAIL_OFFS = Machine.Offsets.ADVANCE_TAIL_OFFS or BeamData.ADVANCE_TAIL_OFFS
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
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
@@ -215,6 +234,7 @@ local function GetSetupInfo( sHead)
SetupInfo.bIsCSymmetrical = true
SetupInfo.dCAxisEncumbrance = 180
SetupInfo.bToolOnAggregate = false
SetupInfo.Head = {}
-- testa 5 assi da sopra, dietro
if sHead == 'H11' then
@@ -231,11 +251,19 @@ local function GetSetupInfo( sHead)
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = false, bBack = true}
SetupInfo.dMinNz = sin( -45)
-- se con aggregato si considera non simmetrico
SetupInfo.bIsCSymmetrical = false
-- riduzione massimo materiale se usato in tagli orizzontali con affondamento verticale
SetupInfo.dMaxMatDecrease = 20
-- lama su testa 5 assi da sopra, davanti
elseif sHead == 'H22' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = { bFront = true, bBack = false}
SetupInfo.dMinNz = sin( -45)
-- se con aggregato si considera non simmetrico
SetupInfo.bIsCSymmetrical = false
-- riduzione massimo materiale se usato in tagli orizzontali con affondamento verticale
SetupInfo.dMaxMatDecrease = 20
-- motosega 1
elseif sHead == 'H13' or sHead == 'H23' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
+5
View File
@@ -36,6 +36,8 @@
22=Long2CutSide
23=SmallToolContour
24=AntiSplintMillCut
25=Prof_end
26=SideMillAsBlade
[Pocketing]
1=Pocket
@@ -47,3 +49,6 @@
[Sawing]
1=Sawing
[Probing]
1=DTMortise
+11
View File
@@ -0,0 +1,11 @@
-- Probingata.lua by Egaltech s.r.l. 20/06/2025
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local ProbingData = {
{ On = true, Name = 'Probing_H1', Type = 'DTMortise'},
{ On = true, Name = 'Probing_H2', Type = 'DTMortise'}
}
---------------------------------------------------------------------
return ProbingData
+714 -1140
View File
File diff suppressed because it is too large Load Diff
+713 -761
View File
File diff suppressed because it is too large Load Diff
+619 -202
View File
@@ -7,211 +7,485 @@ EgtEnableDebug( false)
-- Carico libreria
local BD = require( 'BeamData')
---------------------- OnSpecialGetMaxZ -----------------------------
---------------------------------------------------------------------
local function CalcExtraZ( vtTp, vtT, vMZ)
-- la tabella deve esistere ed essere non vuota
if not vMZ or #vMZ == 0 then return 0 end
-- componente Z di riferimento è la minima
local vtTz = min( vtTp:getZ(), vtT:getZ())
-- se oltre il massimo
if vtTz > vMZ[1].Tz then return vMZ[1].Ez end
-- interpolo
for i = 2, #vMZ do
if vtTz > vMZ[i].Tz then
local dCoeff = ( vtTz - vMZ[i-1].Tz) / ( vMZ[i].Tz - vMZ[i-1].Tz)
return (( 1 - dCoeff) * vMZ[i-1].Ez + dCoeff * vMZ[i].Ez)
-- *** Generic Machinings ***
---------------------------------------------------------------------
require( 'EmtGenMachining')
---------------------------------------------------------------------
-- *** Special GetPrevMachiningOffset ***
---------------------------------------------------------------------
-----------------------------------------------------------------------------------------
function OnSpecialGetPrevMachiningOffset()
-- Aggiorno posizione della testa della trave a seguito di movimenti delle pinze non previsti tra le fasi
local function TPosUpdate()
local nClId = EgtGetFirstNameInGroup( EMC.CURRMCHID, 'CL') -- recupero Id del gruppo CL della lavorazione corrente
local nPathId = EgtGetFirstInGroup( nClId or GDB_ID.NULL) -- Id del primo gruppo nella lavorazione (P1)
if not nPathId then
EMC.ERR = 12
EMC.MSG = ' Error : CL group path not found'
return
end
local dAuxMoveCount = EgtGetInfo( nPathId, 'AS#', 'd') or 0 -- numero di movimenti ausiliari
local dTRepos = nil
-- controlla ogni gruppo di movimenti ausiliari
for i = 1, dAuxMoveCount do
local aAuxMove = EgtGetInfo( nPathId, 'AS' .. tostring( i), 'vs') or {} -- array contenete i parametri di ogni gruppo
-- controlla solo i movimenti della testa trave e salva l'ultimo
if aAuxMove[1] == '2' or aAuxMove[1] == '3' then
for j = 2, #aAuxMove do
if aAuxMove[j] == 'T' then
dTRepos = aAuxMove[j+1]
break
end
end
end
end
return dTRepos
end
-- default
EMC.ERR = 0
EMC.PREVOFFSX = 0
-- se c'è cambio di fase tra le lavorazioni (quindi la precedente è l'ultima della sua fase e la corrente la prima)
if EMC.PREVPHASE ~= EMC.CURRPHASE then
-- se la fase corrente è di inizio lavorazione di nuova trave
if IsStartOrRestPhase( EMC.CURRPHASE) then
-- recupero la posizione finale della lavorazione precedente
local vPrevAx = EmtGetFinalAxesPos( EMC.PREVMCHID)
-- ricava se e quanto la trave viene spostata tra le due fasi dai movimenti ausiliari e corregge l'offset di fine fase
local dNewTPos = TPosUpdate()
-- se ci sono dei movimenti della testa trave tra le due fasi ricava il delta tra la vecchia e la nuova posizione
if dNewTPos then
EMC.PREVOFFSX = dNewTPos - vPrevAx[1]
-- oppure la X (L1) di questa corrisponde alla posizione iniziale della nuova trave, se ne deduce l'offset
else
EMC.PREVOFFSX = ParkV1 - vPrevAx[1]
end
end
end
-- sotto il minimo
return 0
end
---------------------------------------------------------------------
function OnSpecialGetMaxZ()
-- Inizializzazioni
EMC.ERR = 0
-- Gestione speciale per sega a catena su utesta 1
if EMC.HEAD == 'H13' or EMC.HEAD == 'H15' then
EMC.MAXZ = EgtGetAxisHomePos( 'Z1')
return
-- Gestione speciale per sega a catena su testa 2
elseif EMC.HEAD == 'H23' then
EMC.MAXZ = EgtGetAxisHomePos( 'Z2')
return
-- *** Special Link moves ***
---------------------------------------------------------------------
-----------------------------------------------------------------------------------------
local function IsPrevSplit()
local sPrevUserNotes = ''
if EMC.LINKTYPE == 2 then
sPrevUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
elseif EMC.LINKTYPE == 3 then
EgtSetCurrMachining( EMC.PREVMCHID)
sPrevUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
EgtSetCurrMachining( EMC.NEXTMCHID)
end
return ( sPrevUserNotes:find( 'Split;', 1, true) ~= nil)
end
-- Sistemazione dati di input
local vtTp = Vector3d( EMC.TDIRp)
local sHead_TC = GetHeadTCSet( EMC.HEAD, EMC.TCPOS)
local bFromZmax = false
if vtTp:isSmall() then
vtTp = X_AX()
bFromZmax = true
if sHead_TC == 'Head1_TC1' then
EMC.R1p = ParkC1
EMC.R2p = ParkB1
elseif sHead_TC == 'Head2_TC2' then
EMC.R1p = ParkC2
EMC.R2p = ParkB2
elseif sHead_TC == 'Head1_TC2' then
EMC.R1p = ParkFrnC1
EMC.R2p = ParkFrnB1
-----------------------------------------------------------------------------------------
local function IsLinkSafe( vPrec, vNext)
local bSafeMove = true
local DirectionsToTest = { { Z=vPrec[3], C=vPrec[4], B=vPrec[5]}, { Z=vNext[3], C=vNext[4], B=vNext[5]}}
-- aggiungo anche il punto medio
table.insert( DirectionsToTest, { Z=( vNext[3] + vPrec[3]) / 2, C=( vNext[4] + vPrec[4]) / 2, B=( vNext[5] + vPrec[5]) / 2})
for t=1, #DirectionsToTest do
local vtToolDir = EgtGetCalcToolDirFromAngles( DirectionsToTest[t].C, DirectionsToTest[t].B)
-- se testa standard
if EMC.HEAD == 'H11' then
-- TODO considerare caso sotto la traversa
-- se sotto la traversa
if vtToolDir:getX() > -0.1 then
bSafeMove = true
end
-- se lama su aggregato
elseif EMC.HEAD == 'H12' then
-- se sotto la traversa
if vtToolDir:getX() < 0.342 then
local dLen = SawOffsZ - MillOffs
local dToolRadius = 275 -- leggere dall'utensile!!
local dNewOffZ = ( dLen * cos( DirectionsToTest[t].B) + dToolRadius * abs( sin( DirectionsToTest[t].B))) - dToolRadius
local dMaxZ = ParkZ1 - dNewOffZ
if dMaxZ < DirectionsToTest[t].Z then
bSafeMove = false
break
end
end
end
end
local vtT = Vector3d( EMC.TDIR)
local vtTpZm = EgtIf( bFromZmax, vtT, vtTp)
local bBSameSign = (( EMC.R2p < 10 and EMC.R2 < 10) or ( EMC.R2p > -10 and EMC.R2 > -10))
-- Calcolo in funzione della testa e dei parametri
return bSafeMove
end
-----------------------------------------------------------------------------------------
function OnSpecialLink()
-- se fresa su testa 1
if EMC.HEAD == 'H11' then
if bBSameSign and vtTp:getX() > -0.1 and vtT:getX() > -0.1 then
EMC.MAXZ = MaxZ1
else
local vMZ = {{ Tz=0.85, Ez=390}, { Tz=0.5, Ez=280}, { Tz=-0.01, Ez=160}, { Tz=-0.5, Ez=1}, { Tz=-0.61, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H12' and sHead_TC == 'Head1_TC1' then
if vtTp:getX() > 0.4 and vtT:getX() > 0.4 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
EMC.MAXZ = ParkZ1 + 200
else
EMC.MAXZ = ParkZ1 + 1
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
-- se lavorazione in doppio e altra ha collegamento diretto, si muove prima l'altra
local sHeadToMoveFirst = ''
if EMC.OTHERLINKTYPE == 3 then
sHeadToMoveFirst = 'HeadToMoveFirst=H2;'
end
elseif bBSameSign and
(( EMC.R1p > 29.9 and EMC.R1p < 180.1 and EMC.R1 > 29.9 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10) or
( EMC.R1p > 179.9 and EMC.R1p < 330.1 and EMC.R1 > 179.9 and EMC.R1 < 330.1 and EMC.R2p < 10 and EMC.R2 < 10)) then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif bBSameSign and
(( EMC.R1p > -0.1 and EMC.R1p < 180.1 and EMC.R1 > -0.1 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10) or
( EMC.R1p > 179.9 and EMC.R1p < 360.1 and EMC.R1 > 179.9 and EMC.R1 < 360.1 and EMC.R2p < 10 and EMC.R2 < 10)) then
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
else
local vMZ = {{ Tz=0.85, Ez=400}, { Tz=0.7, Ez=300}, { Tz=0.5, Ez=195}, { Tz=0.15, Ez=70}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H12' and sHead_TC == 'Head1_TC2' then
if vtTp:getX() > 0.4 and vtT:getX() > 0.4 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
EMC.MAXZ = ParkZ1 + 200
else
EMC.MAXZ = ParkZ1 + 1
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2, 'FirstClimb=1;'..sHeadToMoveFirst)
-- se asse B resta girato verso home e C resta vicino alla home
if abs( EMC.R2 - EMC.R2p) < 90 and abs( EMC.R1 - EMC.R1p) < 5 then
; -- discesa diretta
elseif abs( EMC.R1 - EMC.R1p) > 1 or abs( EMC.R2 - EMC.R2p) > 1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, 0}, 30, 2, 2)
if abs( EMC.R1 - EMC.R1p) > 1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, 0}, 30, 2, 2)
end
end
elseif bBSameSign and
(( EMC.R1p > -180.1 and EMC.R1p < -29.9 and EMC.R1 > -180.1 and EMC.R1 < -29.9 and EMC.R2p < 10 and EMC.R2 < 10) or
( EMC.R1p > -330.1 and EMC.R1p < -179.9 and EMC.R1 > -330.1 and EMC.R1 < -179.9 and EMC.R2p > -10 and EMC.R2 > -10)) then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif bBSameSign and
(( EMC.R1p > -180.1 and EMC.R1p < 0.1 and EMC.R1 > -180.1 and EMC.R1 < 0.1 and EMC.R2p < 10 and EMC.R2 < 10) or
( EMC.R1p > -360.1 and EMC.R1p < -179.9 and EMC.R1 > -360.1 and EMC.R1 < -179.9 and EMC.R2p > -10 and EMC.R2 > -10)) then
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=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, 'FirstRise=1;')
if abs( EMC.R1 - EMC.R1p) > 1 then
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, 0}, 30, 3, 2)
end
else
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, EMC.R2p}, 30, 3, 2, 'FirstRise=1;')
end
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2)
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
local vMZ = {{ Tz=0.85, Ez=380}, { Tz=0.7, Ez=280}, { Tz=0.5, Ez=180}, { Tz=0.15, Ez=60}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
-- recupero quota massima di collegamento
local vFinalAxLink = EmtGetFinalAxesPos( EMC.PREVMCHID, EMC.PREVMAIN, false)
local vInitAxLink = EmtGetInitialAxesPos( EMC.NEXTMCHID, EMC.NEXTMAIN, false)
local bSafeMove = IsLinkSafe( vFinalAxLink, vInitAxLink)
-- se gli assi rotanti non sono cambiati e il collegamento è come ultimo punto della lavorazione
if abs( EMC.R1 - EMC.R1p) < 1 and abs( EMC.R2 - EMC.R2p) < 1 and abs( EMC.L3p - vFinalAxLink[3]) < 1 and abs( EMC.L3 - vInitAxLink[3]) < 1 then
bSafeMove = true
end
-- se superata quota massima ammessa
if not bSafeMove then
-- retrazione
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, MaxZ1, EMC.R1p, 0}, 30, 3, 2, 'UniqueRise=1;')
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, MaxZ1, EMC.R1, 0}, 30, 2, 2, 'FirstClimb=1;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=1;')
else
-- GESTIONE PER DOPPIO
-- se altra testa arriva da home, devo per forza avere un CLIMB, creo il punto
if EMC.OTHERLINKTYPE == 1 then
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, vInitAxLink, 30, 2, 2, 'FirstClimb=1;HeadToMoveFirst=H1;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=1;')
-- se altra testa deve andare in home, devo per forza avere un RISE, creo il punto
elseif EMC.OTHERLINKTYPE == 2 then
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, vFinalAxLink, 30, 3, 2, 'UniqueRise=1;')
end
end
end
-- se lama su rinvio standard o opposto di testa 1
elseif EMC.HEAD == 'H12' then
-- recupero se split da note utente di lavorazione precedente
local bSplit = IsPrevSplit()
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
-- approccio
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 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
if abs( EMC.R2) > 75 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkZ1, EMC.R1, EgtClamp( EMC.R2, -90, 90)}, 30, 2, 2)
end
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=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;')
-- 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;')
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
local vFinalAxLink = EmtGetFinalAxesPos( EMC.PREVMCHID, EMC.PREVMAIN, false)
local vInitAxLink = EmtGetInitialAxesPos( EMC.NEXTMCHID, EMC.NEXTMAIN, false)
local bSafeMove = IsLinkSafe( vFinalAxLink, vInitAxLink)
-- se gli assi rotanti non sono cambiati e il collegamento è come ultimo punto della lavorazione
if abs( EMC.R1 - EMC.R1p) < 1 and abs( EMC.R2 - EMC.R2p) < 1 and abs( EMC.L3p - vFinalAxLink[3]) < 1 and abs( EMC.L3 - vInitAxLink[3]) < 1 then
bSafeMove = true
end
-- se superata quota massima ammessa
if not bSafeMove then
-- retrazione
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
if abs( EMC.R2) > 91 then
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, ParkZ1, EMC.R1p, EgtClamp( EMC.R2p, -90, 90)}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, MaxZ1Blade, EMC.R1p, 0}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'LastRise=1;')
else
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, MaxZ1Blade, EMC.R1p, 0}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'UniqueRise=1;')
end
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, MaxZ1Blade, EMC.R1, 0}, 30, 2, 2, 'FirstClimb=1;')
if abs( EMC.R2) > 91 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkZ1, EMC.R1, EgtClamp( EMC.R2, -90, 90)}, 30, 2, 2)
end
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 1
elseif EMC.HEAD == 'H13' or EMC.HEAD == 'H15' then
-- recupero se split da note utente di lavorazione precedente
local bSplit = IsPrevSplit()
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
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)
else
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
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
-- retrazione
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, EMC.R2, EMC.R3p}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3p}, 30, 3, 2, 'LastRise=1;')
-- altrimenti collegamento tra due lavorazioni (3)
else
end
-- se aggregato foratore multiplo su testa 1
elseif EMC.HEAD == 'H17' then
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
if abs( EMC.R1 - EMC.R1p) > 1 or abs( EMC.R2 - EMC.R2p) > 1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2, 'FirstClimb=1;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, 0}, 30, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, 0}, 30, 2, 2, 'LastClimb=1;')
else
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2, 'UniqueClimb=1;')
end
-- 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, EMC.R3}, 30, 3, 2, 'FirstRise=1;')
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, 0, EMC.R3}, 30, 3, 2)
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 30, 3, 2, 'LastRise=1;')
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
elseif EMC.HEAD == 'H21' then
if bBSameSign and vtTp:getX() > -0.1 and vtT:getX() > -0.1 then
EMC.MAXZ = MaxZ2
else
local vMZ = {{ Tz=0.85, Ez=390}, { Tz=0.5, Ez=280}, { Tz=-0.01, Ez=160}, { Tz=-0.5, Ez=1}, { Tz=-0.61, Ez=1}}
EMC.MAXZ = ParkZ2 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H22' then
if vtTp:getX() > 0.4 and vtT:getX() > 0.4 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ2 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
EMC.MAXZ = ParkZ2 + 200
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2, 'FirstClimb=1;')
-- se asse B resta girato verso home e C resta vicino alla home
if abs( EMC.R2 - EMC.R2p) < 90 and abs( EMC.R1 - EMC.R1p) < 5 then
; -- discesa diretta
elseif abs( EMC.R1 - EMC.R1p) > 1 or abs( EMC.R2 - EMC.R2p) > 1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, 0}, 30, 2, 2)
if abs( EMC.R1 - EMC.R1p) > 1 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, 0}, 30, 2, 2)
end
end
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=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, 'FirstRise=1;')
if abs( EMC.R1 - EMC.R1p) > 1 then
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, 0}, 30, 3, 2)
end
else
EMC.MAXZ = ParkZ2 + 1
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, EMC.R2p}, 30, 3, 2, 'FirstRise=1;')
end
elseif bBSameSign and
(( EMC.R1p > -180.1 and EMC.R1p < -29.9 and EMC.R1 > -180.1 and EMC.R1 < -29.9 and EMC.R2p < 10 and EMC.R2 < 10) or
( EMC.R1p > -330.1 and EMC.R1p < -179.9 and EMC.R1 > -330.1 and EMC.R1 < -179.9 and EMC.R2p > -10 and EMC.R2 > -10)) then
EMC.MAXZ = MaxZ2 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif bBSameSign and
(( EMC.R1p > -180.1 and EMC.R1p < 0.1 and EMC.R1 > -180.1 and EMC.R1 < 0.1 and EMC.R2p < 10 and EMC.R2 < 10) or
( EMC.R1p > -360.1 and EMC.R1p < -179.9 and EMC.R1 > -360.1 and EMC.R1 < -179.9 and EMC.R2p > -10 and EMC.R2 > -10)) then
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ2 + CalcExtraZ( vtTpZm, vtT, vMZ)
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2)
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
local vFinalAxLink = EmtGetFinalAxesPos( EMC.PREVMCHID, EMC.PREVMAIN, false)
local vInitAxLink = EmtGetInitialAxesPos( EMC.NEXTMCHID, EMC.NEXTMAIN, false)
local bSafeMove = IsLinkSafe( vFinalAxLink, vInitAxLink)
-- se gli assi rotanti non sono cambiati e il collegamento è come ultimo punto della lavorazione
if abs( EMC.R1 - EMC.R1p) < 1 and abs( EMC.R2 - EMC.R2p) < 1 and abs( EMC.L3p - vFinalAxLink[3]) < 1 and abs( EMC.L3 - vInitAxLink[3]) < 1 then
bSafeMove = true
end
-- se superata quota massima ammessa
if not bSafeMove then
-- retrazione
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, MaxZ1, EMC.R1p, 0}, 30, 3, 2, 'UniqueRise=1;')
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, MaxZ1, EMC.R1, 0}, 30, 2, 2, 'FirstClimb=1;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=1;')
else
-- GESTIONE PER DOPPIO
-- se altra testa arriva da home, devo per forza avere un CLIMB, creo il punto
if EMC.OTHERLINKTYPE == 1 then
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, vInitAxLink, 30, 2, 2, 'FirstClimb=1;HeadToMoveFirst=H2;')
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=1;')
end
end
end
-- se lama su testa 2
elseif EMC.HEAD == 'H22' then
-- recupero se split da note utente di lavorazione precedente
local bSplit = IsPrevSplit()
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
-- approccio
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
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, 0}, 30, 2, 2)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, 0}, 30, 2, 2)
end
if abs( EMC.R2) > 75 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkZ1, EMC.R1, EgtClamp( EMC.R2, -90, 90)}, 30, 2, 2)
end
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=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;', '')..'FirstRise=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
local vFinalAxLink = EmtGetFinalAxesPos( EMC.PREVMCHID, EMC.PREVMAIN, false)
local vInitAxLink = EmtGetInitialAxesPos( EMC.NEXTMCHID, EMC.NEXTMAIN, false)
local bSafeMove = IsLinkSafe( vFinalAxLink, vInitAxLink)
-- se gli assi rotanti non sono cambiati e il collegamento è come ultimo punto della lavorazione
if abs( EMC.R1 - EMC.R1p) < 1 and abs( EMC.R2 - EMC.R2p) < 1 and abs( EMC.L3p - vFinalAxLink[3]) < 1 and abs( EMC.L3 - vInitAxLink[3]) < 1 then
bSafeMove = true
end
-- se superata quota massima ammessa
if not bSafeMove then
-- retrazione
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
if abs( EMC.R2) > 91 then
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, ParkZ1, EMC.R1p, EgtClamp( EMC.R2p, -90, 90)}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, MaxZ1Blade, EMC.R1p, 0}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'LastRise=1;')
else
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, MaxZ1Blade, EMC.R1p, 0}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'UniqueRise=1;')
end
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, MaxZ1Blade, EMC.R1, 0}, 30, 2, 2, 'FirstClimb=1;')
if abs( EMC.R2) > 91 then
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkZ1, EMC.R1, EgtClamp( EMC.R2, -90, 90)}, 30, 2, 2)
end
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
local bSplit = IsPrevSplit()
-- se inizio lavorazione con prelievo utensile
if EMC.LINKTYPE == 1 then
-- approccio
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
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)
else
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
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
-- retrazione
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, EMC.R2, EMC.R3p}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3p}, 30, 3, 2, 'LastRise=1;')
-- altrimenti collegamento tra due lavorazioni (3)
else
local vMZ = {{ Tz=0.85, Ez=400}, { Tz=0.7, Ez=300}, { Tz=0.5, Ez=195}, { Tz=0.15, Ez=70}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ2 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
end
end
---------------------- OnSpecialMoveZup -----------------------------
---------------------------------------------------------------------
function OnSpecialMoveZup()
--EgtOutLog( 'OnSpecialMoveZup : ' .. EMC.HEAD .. '.' .. tostring( EMC.EXIT))
-- Inizializzazioni
EMC.ERR = 0
EMC.MODIF = false
-- Direzione utensile
local vtT = Vector3d( EMC.TDIR)
-- Posizione nel TC
local sHead_TC = GetHeadTCSet( EMC.HEAD, EMC.TCPOS)
-- recupero Z1 home
local nHeadSet = GetHeadSet( EMC.HEAD)
local dZmax = EgtGetAxisHomePos( EgtIf( nHeadSet ~= 2, 'Z1', 'Z2'))
-- se fresa su testa1 o su testa 2
if EMC.HEAD == 'H11' or EMC.HEAD == 'H21' then
;
-- se lama posizionata su CU prossimo a testa 1
elseif EMC.HEAD == 'H12' and sHead_TC == 'Head1_TC1' then
-- se inclinata oltre 90 gradi e interferisce con la trave
if ( EMC.R2 > 87.9 and ( EMC.R1 < 15.0 or EMC.R1 > 180.0)) or ( EMC.R2 < -87.9 and ( EMC.R1 > -15.0 and EMC.R1 < 180.0)) then
local dZref = dZmax + min( 330 * vtT:getZ(), 0) + 260 * ( 1 - sqrt( 1- vtT:getZ() * vtT:getZ()))
-- se troppo in alto
if EMC.L3 > dZref + 1 then
---- sistemo asse rotante
--EMC.R2 = EgtIf( ( EMC.R2 > 0), 90, -90)
---- ricalcolo versore utensile
--EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2)
---- porto alla giusta quota
--EMC.L3 = dZmax
EMC.L3 = dZref
-- dichiaro modificato
EMC.MODIF = true
end
end
-- se lama posizionata su CU prossimo a testa 2
elseif ( EMC.HEAD == 'H12' and sHead_TC == 'Head1_TC2') or ( EMC.HEAD == 'H22' and sHead_TC == 'Head2_TC2') then
-- se inclinata oltre 90 gradi e interferisce con la trave
if ( EMC.R2 < -87.9 and ( EMC.R1 < -180.0 or EMC.R1 > -15.0)) or ( EMC.R2 > 87.9 and ( EMC.R1 < 15.0 and EMC.R1 > 180.0)) then
local dZref = dZmax + min( 330 * vtT:getZ(), 0) + 260 * ( 1 - sqrt( 1- vtT:getZ() * vtT:getZ()))
-- se troppo in alto
if EMC.L3 > dZref + 1 then
---- sistemo asse rotante
--EMC.R2 = EgtIf( ( EMC.R2 > 0), 90, -90)
---- ricalcolo versore utensile
--EMC.TDIR = EgtGetCalcToolDirFromAngles( EMC.R1, EMC.R2)
---- porto alla giusta quota
--EMC.L3 = dZmax
EMC.L3 = dZref
-- dichiaro modificato
EMC.MODIF = true
end
end
end
end
---------- OnSpecialApplyDisposition & OnPostApplyMachining ---------
----------------------- Costanti ------------------------------------
local DELTA_SIC = 1
@@ -223,7 +497,7 @@ local MIN_BACK_ENG_V = 115 -- ingombro asse Z a sinistra
local AGG_V = MinDeltaYV -- ingombro rulli pressori + sicurezza
local MIN_CLAMP_5 = 150 -- minima presa con la pinza speciale (pinza 5)
local SIC_CLAMP_5 = 50 -- sicurezza testa da pinza speciale
local MAX_BACK_CLAMP_5 = 320 -- massima sporgenza posteriore del pezzo da pinza speciale
local MAX_BACK_CLAMP_5 = EgtClamp( MaxBackClamp5 or 320, 200, 380) -- massima sporgenza posteriore del pezzo da pinza speciale
----------------------- Variabili -----------------------------------
local Test = false
@@ -654,11 +928,43 @@ 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)
-- Inizializzo codice di errore
EMC.ERR = 0
EMC.ZMAX = false
EMC.ENDZMAX = false
-- Verifico flag di separazione e fase di scarico
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
local bZMaxForced = false
if EgtGetValInNotes( sNotes, 'StartZmax', 's') == 'FORCED' then
bZMaxForced = true
end
-- si cancella eventuale flag per risalita in ZMAX
sNotes = EgtSetValInNotes( sNotes, 'StartZmax')
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
local sPrevTool, dPrevValR3
-- Recupero la posizione della trave e dei carrelli al termine della precedente operazione
local nPrevOpeId = EgtGetPrevActiveOperation( EMC.MCHID)
@@ -734,6 +1040,18 @@ function OnPostApplyMachining()
EMC.V1POS = EgtIf( bAtZMax, ParkV1, EgtGetInfo( nLastPathId, 'V1POS', 'd') or ParkV1)
EMC.V2POS = EgtIf( bAtZMax, ParkV2, EgtGetInfo( nLastPathId, 'V2POS', 'd') or ParkV2)
EMC.CNT = SpecGetCNT( EMC.MCHID)
if vAxes[6] then
-- imposto lavorazione e utensile correnti
EgtSetCurrMachining( nPrevOpeId)
dPrevValR3 = vAxes[6]
local sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if not sTool then
local sTuuid = EgtGetMachiningParam( MCH_MP.TUUID)
sTool = EgtTdbGetToolFromUUID( sTuuid) or ''
end
sPrevTool = sTool
EgtSetCurrMachining( EMC.MCHID)
end
end
-- Verifico se ultima lavorazione della fase
@@ -744,7 +1062,6 @@ function OnPostApplyMachining()
local bPreRotMch = IsLastOperationBeforeRotation( EMC.MCHID)
-- Verifico flag di separazione e fase di scarico
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
local bPreSplit = ( false and sNotes:find( 'Presplit', 1, true) ~= nil)
local bSplitting = ( sNotes:find( 'Split', 1, true) ~= nil)
local bPreCut = ( sNotes:find( 'Precut', 1, true) ~= nil)
@@ -761,7 +1078,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
@@ -818,8 +1135,30 @@ function OnPostApplyMachining()
local nLastEntId = EgtGetLastInGroup( EMC.PATHID)
local vAxes = EmtGetAxesPos( nLastEntId)
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
-- controllo se serve cambiare la presa
if vAxes[6] and dPrevValR3 then
local sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if not sTool then
local sTuuid = EgtGetMachiningParam( MCH_MP.TUUID)
sTool = EgtTdbGetToolFromUUID( sTuuid) or ''
end
-- se stesso utensile ma cambia la presa dell'aggregato
if sTool == sPrevTool and abs( dPrevValR3 - vAxes[6]) > 10 * GEO.EPS_SMALL then
EMC.CHANGETAKE = true
end
end
end
-- Se richiesto movimento preliminare della testa a Zmax perchè c'è stato un riposizionamento delle pinze
if EMC.ZMAX or bZMaxForced then
sNotes = EgtSetValInNotes( sNotes, 'StartZmax', 11)
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
end
if EMC.CHANGETAKE then
sNotes = EgtSetValInNotes( sNotes, 'StartZmax', 12)
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
end
end
---------------------------------------------------------------------
@@ -942,8 +1281,17 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
-- Se altrimenti carri entrambi diponibili, eseguo calcoli per carrelli
elseif not IsEndPhase( EMC.PHASE) then
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
-- se fase iniziale e ci sono stati movimenti di carrelli
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
-- si sposta testa in posizione carico
table.insert( vCmd, { 24, 'T', ParkV1, 'Y1', ParkV1 + dLastY1Delta})
end
-- Se non ci sono spostamenti, confermo i parametri di aggancio e di posizione roller
if SpecTestOnlyRemarkInCmds( vCmd) then
elseif SpecTestOnlyRemarkInCmds( vCmd) then
table.insert( vCmd, { 21, EgtIf( EMC.Y1DELTA, EMC.Y1DELTA, 0), EgtIf( EMC.Y2DELTA, EMC.Y2DELTA, 0)})
table.insert( vCmd, { 22, dRollBack, -dRollFront})
end
@@ -1097,29 +1445,33 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
end
-- Recupero testa
local sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
-- Recupero valore assi macchina
local nSecId = EgtGetNext( EgtGetFirstInGroup( nPathId))
local vAxes = EmtGetAxesPos( nSecId)
if not vAxes or #vAxes < 5 or (( sHead == 'H13' or sHead == 'H15' or sHead == 'H23') and #vAxes < 6) then
-- Recupero minimi e massimi degli assi macchina della lavorazione
local vAxMin = EgtGetInfo( nClId, 'MAXMIN', 'vd')
local vAxMax = EgtGetInfo( nClId, 'MAXMAX', 'vd')
if not vAxMin or not vAxMax or #vAxMin < 5 or ( ( sHead == 'H13' or sHead == 'H15' or sHead == 'H23') and #vAxMin < 6) then
EMC.ERR = 15
EMC.MSG = ' Error : machine axes values not found'
EMC.MSG = ' Error : machine axes Min or Max not found'
return
end
local vAxMid = {}
for i = 1, #vAxMin do
vAxMid[i] = ( vAxMin[i] + vAxMax[i]) / 2
end
-- Calcolo dell'ingombro della testa rispetto allo Zero Macchina
local b3Enc
if sHead ~= 'H21' and sHead ~= 'H22' and sHead ~= 'H23' then
EgtSetAxisPos( 'C1', vAxes[4])
EgtSetAxisPos( 'B1', vAxes[5])
EgtSetAxisPos( 'C1', vAxMid[4])
EgtSetAxisPos( 'B1', vAxMid[5])
if sHead == 'H13' or sHead == 'H15' then
EgtSetAxisPos( 'A', vAxes[6])
EgtSetAxisPos( 'A', vAxMid[6])
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C1'), GDB_BB.ONLY_VISIBLE)
else
EgtSetAxisPos( 'C2', vAxes[4])
EgtSetAxisPos( 'B2', vAxes[5])
EgtSetAxisPos( 'C2', vAxMid[4])
EgtSetAxisPos( 'B2', vAxMid[5])
if sHead == 'H23' then
EgtSetAxisPos( 'A', vAxes[6])
EgtSetAxisPos( 'A', vAxMid[6])
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C2'), GDB_BB.ONLY_VISIBLE)
end
@@ -1132,7 +1484,7 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
EgtOutLog( ' RollFront = ' .. EgtNumToString( dRollFront, 1) .. ' RollBack = ' .. EgtNumToString( dRollBack, 1), 3)
-- Calcolo della posizione della Punta Utensile rispetto allo Zero Macchina
local ptTip
ptTip = EgtGetCalcTipFromPositions( 0, 0, 0, vAxes[4], vAxes[5], vAxes[6] or 0, false)
ptTip = EgtGetCalcTipFromPositions( 0, 0, 0, vAxMid[4], vAxMid[5], vAxMid[6] or 0, false)
EgtOutLog( ' ToolTip = ' .. tostring( ptTip), 5)
-- Calcolo dell'ingombro della testa rispetto alla Punta Utensile
local dHeadFront = dRollFront + AGG_V - ptTip:getX()
@@ -1218,6 +1570,34 @@ function VerifyPartLength()
return true
end
---------------------------------------------------------------------
function GetLastTPos( vCmd)
-- se esiste tabella comandi, si cerca l'ultima posizione della trave
if vCmd and #vCmd > 0 then
local dTRepos = nil
local dLastY1Delta = nil
-- controlla ogni gruppo di movimenti ausiliari
for i = 1, #vCmd do
local Command = vCmd[i]
-- controlla solo i movimenti della testa trave e salva l'ultimo
if Command[1] == 2 or Command[1] == 3 then
for j = 2, #Command-1 do
if Command[j] == 'T' then
dTRepos = Command[j+1]
break
end
end
elseif Command[1] == 21 then
dLastY1Delta = Command[2]
end
end
return dTRepos, dLastY1Delta
else
return nil, nil
end
end
---------------------------------------------------------------------
function SpecCalcLoad( dPosT, dDistFront, dDistBack)
--[L]
@@ -1553,8 +1933,11 @@ function SpecCalcUnload()
EgtOutLog( ' *[U1]', 1)
end
local vCmd = {}
-- Tipo di scarico
local bStdUl = ( not MaxUnloadLen or MaxUnloadLen < 1 or EMC.LB - EMC.HOVM < MaxUnloadLen + 1)
-- Commento
table.insert( vCmd, { 0, 'Unloading'})
table.insert( vCmd, { 0, 'Unloading', EgtIf( bStdUl, 'Unloading', 'Manual Unloading')})
-- posizionamento sicuro teste e rulli (non serve ?)
--table.insert( vCmd, { 4, 0})
-- Se pinza Y chiusa, la apro
@@ -1562,11 +1945,15 @@ function SpecCalcUnload()
table.insert( vCmd, { 11, 0})
EMC.CNT = nil
end
-- Sposto il pezzo in posizione di scarico
local dFinT = UnloadT - EMC.LB
local dFinY2 = dFinT + EMC.Y2DELTA
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dFinY2), 1)
-- Se non supero la lunghezza massima di scarico, sposto il pezzo in posizione di scarico
if bStdUl then
local dFinT = UnloadT - EMC.LB
local dFinY2 = dFinT + EMC.Y2DELTA
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dFinY2), 1)
else
table.insert( vCmd, { 1, 'Y2', MaxY2})
end
-- apro la morsa
table.insert( vCmd, { 12, 0})
-- riporto il carrello in home
@@ -2753,6 +3140,14 @@ function SpecOutputCmds( vCmd, bEnd)
elseif Cmd[1] == 4 then
local sInfo = '4,'..EgtNumToString( Cmd[2],0)
EgtSetInfo( EMC.PATHID, sKey, sInfo)
-- se chiusura rulli
if Cmd[2] == 1 then
if bEnd then
EMC.ENDZMAX = true
else
EMC.ZMAX = true
end
end
-- apertura/chiusura morsa Y
elseif Cmd[1] == 11 then
local sInfo = '11,'..EgtNumToString( Cmd[2],0)
@@ -2789,6 +3184,10 @@ function SpecOutputCmds( vCmd, bEnd)
local sInfo = '23,'..EgtNumToString( Cmd[2],3)
EgtSetInfo( EMC.PATHID, sKey, sInfo)
EMC.W2DELTA = Cmd[2]
-- riporta trave in zona carico dopo una fase start partita con un riposizionamento
elseif Cmd[1] == 24 then
local sInfo = '24,'..Cmd[2]..','..EgtNumToString( Cmd[3],3)..','..Cmd[4]..','..EgtNumToString( Cmd[5],3)..EgtIf( Cmd[6], ',*', '')
EgtSetInfo( EMC.PATHID, sKey, sInfo)
-- aggancio grezzo a carrello
elseif Cmd[1] == 31 then
local sInfo = '31,'..EgtNumToString( Cmd[2],0)..','..Cmd[3]
@@ -2828,8 +3227,26 @@ function SpecOutputCmds( vCmd, bEnd)
EgtSetInfo( NextDispId, 'V1POS', EMC.V1POS)
EgtSetInfo( NextDispId, 'V2POS', EMC.V2POS)
end
-- se bisogna andare a ZMAX alla fine, si setta il parametro sulla lavorazione successiva in modo che la corrente vada in home
if EMC.ENDZMAX and EMC.MCHID then
-- recupero lavorazione successiva
local nNextMchId = EgtGetNextActiveOperation( EMC.MCHID, true)
while nNextMchId do
if EgtGetOperationType( nNextMchId) ~= MCH_OY.DISP then
if EgtSetCurrMachining( nNextMchId) then
-- Verifico flag di separazione e fase di scarico
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
-- si cancella eventuale flag per risalita in ZMAX
sNotes = EgtSetValInNotes( sNotes, 'StartZmax', 'FORCED')
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
EgtSetCurrMachining( EMC.MCHID)
break
end
end
nNextMchId = EgtGetNextActiveOperation( nNextMchId, true)
end
end
end
end
---------------------------------------------------------------------
BIN
View File
Binary file not shown.
+16
View File
@@ -91,11 +91,13 @@ Language1=Italiano,Ita.txt
Language2=English,Eng.txt
[Tools]
Probe=1
Drillbit=1
Sawblade=1
Mill=1
Mortise=1
Chisel=0
ProbeMaker=MakeProbe.lua
DrillMaker=MakeWoodDrill.lua
SawbladeMaker=MakeSawblade.lua
MillMaker=MakeWoodCylMill.lua
@@ -108,11 +110,13 @@ H11.1=Standard.nge
H11.1:MILL_NOTIP=MillNoTip.nge
H12.1=Saw.nge
H13.1=ChainSaw.nge
H17.1=AngTransmBH.nge
H21.1=Standard.nge
H21.1:MILL_NOTIP=MillNoTip.nge
H22.1=Saw.nge
[Machinings]
Probing=1
Drilling=1
Sawing=1
Milling=1
@@ -121,10 +125,14 @@ Mortising=1
Chiseling=0
SawRoughing=0
SawFinishing=0
DrillingDoubleNT=1
PocketingDoubleNT=1
[Machining]
InitScript=InitMach.lua
ExitScript=ExitMach.lua
[Probing]
PrbScript1=StdProbe
[Disposition]
;InitScript=InitDisp.lua
@@ -136,10 +144,16 @@ H11=6608
H12=6615
; Chainsaw
H13=6616
; Angular transmission
H17=6617
; Probe
H19=6618
; Second 5 axis head
H21=6620
; Second 5 axis saw
H22=6623
; Probe
H29=6618
[SetUp]
Default=Standard
@@ -152,3 +166,5 @@ WinPlace=0,514,138,628,810
Enable=1
Save=0
[ToolTrace]
Enable=1
+202 -26
View File
@@ -44,10 +44,10 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.7c3'
PP_NVER = '2.7.3.3'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PFrl'
PP_VER = '3.1g1'
PP_NVER = '3.1.7.1'
MIN_MACH_VER = '3.1f1'
MACH_NAME = EgtGetCurrMachineName()
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
@@ -116,8 +116,10 @@ SawC2Offs = 0
SawB2Offs = 0
MinX1 = 700
MaxX1 = 2735
Limit_T1_Presel_T2 = MinX1
MinZ1 = -1550
MaxZ1 = 0
MaxZ1Blade = 0
MinC1 = -275
MaxC1 = 275
MinB1 = -127
@@ -140,8 +142,10 @@ ParkCSaw0C1 = 0
ParkCSawB1 = 0
MinX2 = 0
MaxX2 = 2035
Limit_T2_Presel_T1 = MaxX2
MinZ2 = -1550
MaxZ2 = 0
MaxZ2Blade = 0
MinC2 = -275
MaxC2 = 275
MinB2 = -127
@@ -153,8 +157,10 @@ ParkZ2 = -535
ParkC2 = -90
ParkB2 = -90
MinDeltaX1X2 = 650
MinDistToolX1X2 = 40
MinDistToolX1X2 = 20
LimX2RotSaw = 800
AngTrBHOffs = 154.5
AngTrBHLen = 90
TurnerOffs = 120.0
AggLoad = 50
DeltaTabY = 1170.0
@@ -172,9 +178,15 @@ DefTcPos1 = 'T3'
DefTcPos2 = 'T13'
SecondSaw = false
AutomaticRotation = true
OptimizedLoadBeam = true
AutoRotMinLen = 0
CoeffVM = 0.5
EstimationRapidMultiplier = 1
ForceToCloseRollersGate = false
Probe = nil
AggreBlockHaus = false
DistZClampToTable = 5 -- distanza tra la tavola e il punto più basso della morsa
ClampingCoeffMin = nil -- coefficiente di fissaggio, se 0 o nil non fa controllo, per il momento da inizializzare da Ts3Data
MaxFeedPinze = 102000
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PFrl.data"
@@ -201,6 +213,7 @@ if EgtExistsFile( sData) then
if Machine.Offsets.PARK_X1 then ParkX1 = -Machine.Offsets.PARK_X1 end
if Machine.Offsets.Z1_NEG then MinZ1 = Machine.Offsets.Z1_NEG end
if Machine.Offsets.Z1_POS then MaxZ1 = min( MaxZ1, Machine.Offsets.Z1_POS) end
if Machine.Offsets.Z1_POS_LAMA then MaxZ1Blade = min( MaxZ1Blade, Machine.Offsets.Z1_POS_LAMA) end
if Machine.Offsets.PARK_Z1 then ParkZ1 = Machine.Offsets.PARK_Z1 end
if Machine.Offsets.C1_NEG then MinC1 = Machine.Offsets.C1_NEG end
if Machine.Offsets.C1_POS then MaxC1 = Machine.Offsets.C1_POS end
@@ -213,6 +226,7 @@ if EgtExistsFile( sData) then
if Machine.Offsets.PARK_X2 then ParkX2 = -Machine.Offsets.PARK_X2 end
if Machine.Offsets.Z2_NEG then MinZ2 = Machine.Offsets.Z2_NEG end
if Machine.Offsets.Z2_POS then MaxZ2 = Machine.Offsets.Z2_POS end
if Machine.Offsets.Z2_POS_LAMA then MaxZ2Blade = min( MaxZ2Blade, Machine.Offsets.Z2_POS_LAMA) end
if Machine.Offsets.PARK_Z2 then ParkZ2 = Machine.Offsets.PARK_Z2 end
if Machine.Offsets.C2_NEG then MinC2 = Machine.Offsets.C2_NEG end
if Machine.Offsets.C2_POS then MaxC2 = Machine.Offsets.C2_POS end
@@ -231,6 +245,8 @@ if EgtExistsFile( sData) then
if Machine.Offsets.MIN_V2 then MinV2 = Machine.Offsets.MIN_V2 end
if Machine.Offsets.MAX_V2 then MaxV2 = Machine.Offsets.MAX_V2 end
if Machine.Offsets.CLAMP5 then Clamp5 = ( Machine.Offsets.CLAMP5 == 1) end
if Machine.Offsets.MIN_W then MinW = Machine.Offsets.MIN_W end
if Machine.Offsets.MAX_W then MaxW = Machine.Offsets.MAX_W end
if Machine.Offsets.MINWOPEN then MinWOpen = Machine.Offsets.MINWOPEN end
if Machine.Offsets.MAXWOPEN then MaxWOpen = Machine.Offsets.MAXWOPEN end
if Machine.Offsets.MAXWHEIGHT then MaxWHeight = Machine.Offsets.MAXWHEIGHT end
@@ -258,8 +274,21 @@ if EgtExistsFile( sData) then
if Machine.Offsets.SAW2OFFSZ then Saw2OffsZ = Machine.Offsets.SAW2OFFSZ end
if Machine.Offsets.DEFTCPOS1 then DefTcPos1 = ( 'T' .. Machine.Offsets.DEFTCPOS1) end
if Machine.Offsets.DEFTCPOS2 then DefTcPos2 = ( 'T' .. Machine.Offsets.DEFTCPOS2) end
if Machine.Offsets.LIMIT_T1_PRESEL_T2 then Limit_T1_Presel_T2 = Machine.Offsets.LIMIT_T1_PRESEL_T2 end
if Machine.Offsets.LIMIT_T2_PRESEL_T1 then Limit_T2_Presel_T1 = Machine.Offsets.LIMIT_T2_PRESEL_T1 end
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD end
if Machine.Offsets.MAXFEEDPINZE then MaxFeedPinze = EgtClamp( Machine.Offsets.MAXFEEDPINZE, 20000, 155000) end
if Machine.Offsets.MAXACC then MaxAcc = Machine.Offsets.MAXACC end
if Machine.Offsets.MINACC then MinAcc = Machine.Offsets.MINACC end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.PROBE then Probe = Machine.Offsets.PROBE end -- Tastatore su entrembe le teste. 1 = solo testa 1, 2 = solo testa 2, 3 = entrambe le teste
if Machine.Offsets.AGGRE_BH then AggreBlockHaus = ( Machine.Offsets.AGGRE_BH == 1) end
AngTrBHOffs = Machine.Offsets.OFFSETZ_RINV_BH or AngTrBHOffs
AngTrBHLen = Machine.Offsets.OFFSETX_RINV_BH or AngTrBHLen
if Machine.Offsets.MAX_BACK_CLAMP_5 then MaxBackClamp5 = Machine.Offsets.MAX_BACK_CLAMP_5 end
if Machine.Offsets.COEFF_CLAMP_CHECK then ClampingCoeffMin = Machine.Offsets.COEFF_CLAMP_CHECK end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
@@ -271,14 +300,24 @@ if EgtExistsFile( sData) then
ParkY2 = ParkV2 - MinDeltaYV
ParkX1 = min( ParkX1, MaxX1)
ParkX2 = max( ParkX2, MinX2)
MaxZ1Blade = min( MaxZ1Blade, MaxZ1)
MaxZ2Blade = min( MaxZ2Blade, MaxZ2)
Head2Y = DeltaTabY - Delta2TabY
Head2Z = DeltaTabZ - Delta2TabZ
ParkCSawX1S = ParkX1
ParkCSawZ1 = min( ParkCSawZ1, MaxZ1)
ParkCSaw0Z1 = min( ParkCSaw0Z1, MaxZ1)
end
end
end
-- ***** ***** IMPLEMENTAZIONE DA FARE ***** *****
-- Con nuovi link il tatsatore NON è gestito, viene forzato come non presente.
Probe = nil
-- ***** ***** ***** ***** *****
EmtGeneral {
File='Essetre-PF.nge',
@@ -288,6 +327,8 @@ EmtGeneral {
ExitMaxAdjust = 300,
ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 80,
LinkAxesMoveOrder = MCH_LKAMO.HEAD_BEFORE_IF_SAME_ANG,
NewLinkMgr = 1,
Special = 'Common_ONE-PF.mlse',
Processor = 'Common_ONE-PF.mlpe'}
local sBaseAux = {'BASE/SOLID', 'BASE/SIGN', 'BASE/CONVOYER', 'BASE/BELT', 'BASE/COLLISION', 'BASE/TC1', 'BASE/TC2', 'BASE/TC3'}
@@ -331,6 +372,13 @@ EmtAxis {
Home = ParkC1,
Geo = 'C1_AXIS/GEO',
Aux = {'C1_AXIS/SOLID', 'C1_AXIS/COLLISION'}}
-- se tastatore presente
local sBAxisAuxGeom
if Probe == 1 or Probe == 3 then
sBAxisAuxGeom = {'B1_AXIS/SOLID', 'B1_AXIS/COLLISION', 'PROBE_B1/SOLID_PROBE', 'PROBE_B1/COLLISION_PROBE'}
else
sBAxisAuxGeom = {'B1_AXIS/SOLID', 'B1_AXIS/COLLISION'}
end
EmtAxis {
Name = 'B1',
Parent = 'C1',
@@ -341,7 +389,7 @@ EmtAxis {
Stroke = {MinB1, MaxB1},
Home = ParkB1,
Geo = 'B1_AXIS/GEO',
Aux = {'B1_AXIS/SOLID', 'B1_AXIS/COLLISION'}}
Aux = sBAxisAuxGeom }
-- Frese
local H11Id = EmtHead {
Name = 'H11',
@@ -369,6 +417,22 @@ local H12Id = EmtHead {
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H12_HEAD/GEO'}
--EgtSetInfo( H12Id, 'ZMAXONROT', '1,190')
-- Tastatore su testa 1
local H19Id
if Probe == 1 or Probe == 3 then
H19Id = EmtHead {
Name = 'H19',
Parent = 'B1',
HSet = 'H19',
Type = MCH_HT.STD,
Pos = Point3d( -60, -81, 0),
TDir = Z_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB1, MaxB1},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H19_HEAD/GEO'}
end
-- Sega a catena
EmtAxis {
Name = 'A',
@@ -395,6 +459,24 @@ local H13Id = EmtHead {
Geo = 'H13_HEAD/GEO'}
EgtSetInfo( H13Id, 'ZSAFEDELTA', '60')
EgtSetInfo( H13Id, 'ZMAXONROT', '1,80')
-- Eventuale aggregato per lavorazioni BlockHaus
if AggreBlockHaus then
local H17Id = EmtHead {
Name = 'H17',
Parent = 'B1',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d( -AngTrBHLen, 0, -AngTrBHOffs),
TDir = X_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H17_HEAD/GEO',
Aux = {'H17_HEAD/SOLID', 'H17_HEAD/COLLISION'}}
end
-- *** Testa 2 ***
local X2Id = EmtAxis {
Name = 'X2',
@@ -430,6 +512,12 @@ local C2Id = EmtAxis {
Home = ParkC2,
Geo = 'C2_AXIS/GEO',
Aux = {'C2_AXIS/SOLID', 'C2_AXIS/COLLISION'}}
-- se presente tastatore
if Probe == 2 or Probe == 3 then
sBAxisAuxGeom = {'B2_AXIS/SOLID', 'B2_AXIS/COLLISION', 'PROBE_B2/SOLID_PROBE', 'PROBE_B2/COLLISION_PROBE'}
else
sBAxisAuxGeom = {'B2_AXIS/SOLID', 'B2_AXIS/COLLISION'}
end
local B2Id = EmtAxis {
Name = 'B2',
Parent = 'C2',
@@ -440,7 +528,7 @@ local B2Id = EmtAxis {
Stroke = {MinB2, MaxB2},
Home = ParkB2,
Geo = 'B2_AXIS/GEO',
Aux = {'B2_AXIS/SOLID', 'B2_AXIS/COLLISION'}}
Aux = sBAxisAuxGeom}
local vtMove2 = Vector3d( 0, Head2Y, Head2Z)
EgtMove( EgtGetFirstNameInGroup( X2Id, 'SOLID'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X2Id, 'COLLISION'), vtMove2, GDB_RT.GLOB)
@@ -450,6 +538,10 @@ EgtMove( EgtGetFirstNameInGroup( C2Id, 'SOLID'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( C2Id, 'COLLISION'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B2Id, 'SOLID'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B2Id, 'COLLISION'), vtMove2, GDB_RT.GLOB)
if Probe == 2 or Probe == 3 then
EgtMove( EgtGetFirstNameInGroup( B2Id, 'SOLID_PROBE'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B2Id, 'COLLISION_PROBE'), vtMove2, GDB_RT.GLOB)
end
-- Frese
local H21Id = EmtHead {
Name = 'H21',
@@ -478,6 +570,22 @@ if SecondSaw then
Geo = 'H22_HEAD/GEO'}
--EgtSetInfo( H22Id, 'ZMAXONROT', '1,190')
end
-- Tastatore su testa 2
local H29Id
if Probe == 2 or Probe == 3 then
H29Id = EmtHead {
Name = 'H29',
Parent = 'B2',
HSet = 'H29',
Type = MCH_HT.STD,
Pos = Point3d( Head2X - 60, Head2Y - 81, Head2Z + 0),
TDir = Z_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB2, MaxB2},
OthColl = {'B2/SOLID', 'C2/SOLID'},
Geo = 'H29_HEAD/GEO'}
end
-- *** Carrelli ***
-- Morse
local Y1Id = EmtAxis {
@@ -499,7 +607,7 @@ local PY1Id = EmtAxis {
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PY1_AXIS/GEO',
Aux = 'PY1_AXIS/SOLID'}
Aux = {'PY1_AXIS/SOLID', 'PY1_AXIS/CLAMP_CHECK'}}
local Y2Id = EmtAxis {
Name = 'Y2',
Parent = 'Base',
@@ -519,7 +627,7 @@ local PY2Id = EmtAxis {
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PY2_AXIS/GEO',
Aux = 'PY2_AXIS/SOLID'}
Aux = {'PY2_AXIS/SOLID', 'PY2_AXIS/CLAMP_CHECK'}}
-- Rulli
local V1Id = EmtAxis {
Name = 'V1',
@@ -630,6 +738,7 @@ EmtTable {
Parent = 'T',
Type = MCH_TT.FLAT,
Ref1 = Point3d( -DimTabX, DeltaTabY, DeltaTabZ),
Coll = 'Base/BELT',
Geo = 'TABLE/GEO',
Aux = 'TABLE/SOLID'}
-- *** ToolChanger ***
@@ -684,13 +793,24 @@ EmtTcPos {
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T8'}
EmtTcPos {
if AggreBlockHaus then
local TcpSsId = EmtTcPos {
Name = 'T9',
Parent = 'Base',
Pos = ptTc1 + 8 * vtDt1 + Vector3d( -AngTrBHLen, AngTrBHOffs, 0),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T9_BH',
Aux = 'BASE/T9_HS'}
else
EmtTcPos {
Name = 'T9',
Parent = 'Base',
Pos = ptTc1 + 8 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T9'}
end
EmtTcPos {
Name = 'T10',
Parent = 'Base',
@@ -800,6 +920,10 @@ EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.G
if Mortiser then
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
end
-- sposto geometria aggiuntiva agrgegato BlockHaus
if AggreBlockHaus then
EgtMove( EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( BaseId, 'T9'), 'T9_HS') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
end
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'COLLISION'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X2Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
@@ -810,8 +934,10 @@ local vtMove = Vector3d( 0, ( DeltaTabY - 1170.0), ( DeltaTabZ + 1010.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY1Id, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY2Id, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( V1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PV1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( QV1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
@@ -842,14 +968,14 @@ function OnSetHead()
if EMC.HEAD == 'H11' then
local dRawH = GetRawHeight()
EmtModifyAxisHome( 'X1', ParkX1)
EmtModifyAxisHome( 'Z1', ParkZ1 + EgtIf( dRawH > 650, EgtIf( EMC.TOTDIAM < 61, 235, 165), 0))
EmtModifyAxisHome( 'Z1', MaxZ1)
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyAxisHome( 'B1', ParkB1)
EmtModifyAxisDirection( 'B1', X_AX())
-- se testa H12 (lama)
elseif EMC.HEAD == 'H12' then
elseif EMC.HEAD == 'H12' or EMC.HEAD == 'H17' then
EmtModifyAxisHome( 'X1', ParkX1)
EmtModifyAxisHome( 'Z1', ParkZ1)
EmtModifyAxisHome( 'Z1', MaxZ1Blade)
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyAxisHome( 'B1', ParkB1)
EmtModifyAxisDirection( 'B1', Vector3d( cos( SawC1Offs), -sin( SawC1Offs), 0))
@@ -858,9 +984,6 @@ function OnSetHead()
-- aggiustamenti per distanza
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
-- recupero valore asse A bloccato
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
local CSawPosA = tonumber( sVal:sub( 3) or '')
@@ -873,14 +996,14 @@ function OnSetHead()
elseif EMC.HEAD == 'H21' then
local dRawH = GetRawHeight()
EmtModifyAxisHome( 'X2', ParkX2)
EmtModifyAxisHome( 'Z2', ParkZ2 + EgtIf( dRawH > 650, EgtIf( EMC.TOTDIAM < 61, 235, 165), 0))
EmtModifyAxisHome( 'Z2', MaxZ2)
EmtModifyAxisHome( 'C2', ParkC2)
EmtModifyAxisHome( 'B2', ParkB2)
EmtModifyAxisDirection( 'B2', X_AX())
-- se testa H22 (lama)
elseif EMC.HEAD == 'H22' then
EmtModifyAxisHome( 'X2', ParkX2)
EmtModifyAxisHome( 'Z2', ParkZ2)
EmtModifyAxisHome( 'Z2', MaxZ2Blade)
EmtModifyAxisHome( 'C2', ParkC2)
EmtModifyAxisHome( 'B2', ParkB2)
EmtModifyAxisDirection( 'B2', Vector3d( cos( SawC2Offs), -sin( SawC2Offs), 0))
@@ -888,11 +1011,16 @@ function OnSetHead()
end
---------------------------------------------------------------------
-------------------------- Testa utilizzata -------------------------
function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' then
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H15' or sHead == 'H17' then
return 1
elseif sHead == 'H21' or sHead == 'H22' then
elseif sHead == 'H19' then
return 11
elseif sHead == 'H21' or sHead == 'H22' or sHead == 'H23' then
return 2
elseif sHead == 'H29' then
return 21
else
return 0
end
@@ -903,7 +1031,7 @@ end
function GetHeadTCSet( sHead, sTcPos)
local nPos = tonumber( string.sub( sTcPos, 2)) or 0
-- testa 1
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H15' then
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H15' or sHead == 'H17' then
-- testa 1 su CU prossimo a testa 2
if nPos > 10 then
return 'Head1_TC2'
@@ -914,7 +1042,7 @@ function GetHeadTCSet( sHead, sTcPos)
-- testa 2 su CU prossimo a testa 2
elseif sHead == 'H21' or sHead == 'H22' or sHead == 'H23' then
return 'Head2_TC2'
-- testa 2 su CU prossimo a testa 1 (non esiste una condfigurazione fatta in questo modo)
-- testa 2 su CU prossimo a testa 1 (non esiste una configurazione fatta in questo modo)
elseif nPos < 10 then
return 'Head2_TC1'
else
@@ -940,12 +1068,60 @@ function HeadIsChainSaw( sHead)
return ( sHead == 'H13')
end
---------------------------------------------------------------------
-- Funzione che riconosce testa per tastatore
function HeadIsProbe( sHead)
return ( sHead == 'H19' or sHead == 'H29')
end
---------------------------------------------------------------------
function IsToolCompatibleWithProbe( sToolName, sCurrTool)
local bToolIsCompatible = false
if sToolName then
EgtTdbSetCurrTool( sToolName)
local dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM)
local dToolLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
if dToolDiam < 100 and dToolLen < 160 then
bToolIsCompatible = true
end
EgtTdbSetCurrTool( sCurrTool)
end
return bToolIsCompatible
end
---------------------------------------------------------------------
function GetToolNameFromTcPos( sTcPos)
local sToolName
-- Carico gli utensili sulle barre portautensili
local vTcPos = EgtGetAllTcPosNames()
if vTcPos then
for i = 1, #vTcPos do
if vTcPos[i] == sTcPos then
local sToolsName = EgtGetToolsInCurrSetupPos( vTcPos[i])
sToolName = sToolsName[1]
end
end
end
return sToolName
end
---------------------------------------------------------------------
function GetToolHead( sToolName)
local sHead
local sCurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
EgtTdbSetCurrTool( sToolName)
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
EgtTdbSetCurrTool( sCurrTool)
return sHead, sTcPos
end
---------------------------------------------------------------------
-- Funzione che calcola la posizione Home di Z per la sega a catena dal valore dell'asse virtuale
function GetChainSawZHomeFromVirtualAxis( dPosA)
-- se A=0 -> T101 -> HomeZ = -400
if abs( dPosA) < 0.1 then
return ParkCSaw0Z1
return ParkCSawZ1
-- altrimenti A=-90 -> T102 o A=90 -> T104 -> HomeZ = -100
else
return ParkCSawZ1
@@ -967,7 +1143,7 @@ end
---------------------------------------------------------------------
-- Funzione che ritorna ZExtra partendo dalla testa e dall'angolo verticale
function GetZExtra( sHead, dAngV)
if sHead == 'H11' or sHead == 'H21' then
if sHead == 'H11' or sHead == 'H21' or sHead == 'H17' then
if abs( dAngV) < 30.1 then
return 400
elseif abs( dAngV) < 45.1 then
@@ -994,6 +1170,7 @@ function GetZExtra( sHead, dAngV)
return 0
end
end
return 0
end
---------------------------------------------------------------------
@@ -1034,7 +1211,6 @@ function GetPY2Light()
return ( EgtGetInfo( PY2LightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine()
+34 -19
View File
@@ -2,23 +2,31 @@
;Index = Type, Description, Default Value
; Type : b=boolean, d=double, l=lenght, s=string
[Probing]
0=s,Type,Head
[Drilling]
[Sawing]
[Milling]
0=d,MaxElev,0
0=l,MaxElev,0
1=d,OutRaw,0
2=d,SideElev,0
2=l,SideElev,0
3=d,TrimExt,0
4=sr,VtFaceUse,0,0,0
4=s,VtFaceUse,0,0,0
5=s,EdgesFaceUse,0
6=b,PROBE,0
7=b,START-PROBE,0
8=b,END-PROBE,0
[Pocketing]
0=d,MaxElev,0
0=l,MaxElev,0
1=b,Open,0
2=d,OpenMinSave,0
2=d,OpenMinSafe,0
3=d,OpenOutRaw,0
4=d,MaxOptSize,0
4=l,MaxOptSize,0
5=b,AdjustFeed,1
[Mortising]
0=d,MaxElev,0
@@ -30,21 +38,28 @@
[SawFinishing]
[GenMachining]
0=l,LinTol,0.1
1=l,MaxLen,2
2=s,Type,ZigZag
3=d,SideAng,90
4=l,Step,10
5=l,OffsProj,0
6=l,LiTang,0
7=l,LiOrth,0
8=l,LiElev,0
9=l,LoTang,0
10=l,LoOrth,0
11=l,LoElev,0
12=b,DirFromGuide,1
[SurfRoughing]
0=l,MaxElev,1000
1=b,PlaneZ,0
[SurfFinishing]
0=b,SkipMaxDown,1
[5AxMilling]
0=l,LinTol,0.01
1=l,MaxLen,10
2=s,Type,ZigZag
3=d,SideAng,90
4=l,Step,10
5=d,AngIni,-90
6=d,AngFin,90
7=l,LiTang,0
8=l,LiOrth,0
9=l,LiElev,0
10=l,LoTang,0
11=l,LoOrth,0
12=l,LoElev,0
13=b,DirFromGuide,0
14=b,SurfAvoid,0
+15 -2
View File
@@ -30,6 +30,9 @@ local GS = {}
-- Configurazione posizioni (con o senza TC2)
local PositionTable = {}
local SecondSaw = ( EgtGetHeadId( 'H22') ~= nil)
local AggreBH = ( EgtGetHeadId( 'H17') ~= nil)
local ProbeFirstHead = ( EgtGetHeadId( 'H19') ~= nil)
local ProbeSecondHead = ( EgtGetHeadId( 'H29') ~= nil)
if SecondSaw then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"},
{Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"},
@@ -38,7 +41,7 @@ if SecondSaw then
{Pos = "Pos5", TcPos = "T6", Head = "H11", Group = "G1"},
{Pos = "Pos6", TcPos = "T7", Head = "H11", Group = "G1"},
{Pos = "Pos7", TcPos = "T8", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T9", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T9", Head = EgtIf( AggreBH, "H17", "H11"), Group = "G1"},
{Pos = "Pos9", TcPos = "T10", Head = "H11", Group = "G1"},
{Pos = "Pos10", TcPos = "T11", Head = "H22", Group = "G3"},
{Pos = "Pos11", TcPos = "T13", Head = "H21", Group = "G3"},
@@ -61,7 +64,7 @@ else
{Pos = "Pos5", TcPos = "T6", Head = "H11", Group = "G1"},
{Pos = "Pos6", TcPos = "T7", Head = "H11", Group = "G1"},
{Pos = "Pos7", TcPos = "T8", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T9", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T9", Head = EgtIf( AggreBH, "H17", "H11"), Group = "G1"},
{Pos = "Pos9", TcPos = "T10", Head = "H11", Group = "G1"},
{Pos = "Pos10", TcPos = "T11", Head = "H21", Group = "G3"},
{Pos = "Pos11", TcPos = "T12", Head = "H21", Group = "G3"},
@@ -78,6 +81,16 @@ else
table.insert( PositionTable, {Pos = "Pos21", TcPos = "T201", Head = "H13", Group = "G2"})
end
end
-- aggiunta tastatori
if ProbeFirstHead then
local sIndex = EgtNumToString( #PositionTable + 1)
table.insert( PositionTable, {Pos = "Pos"..sIndex, TcPos = "T501", Head = "H19", Group = "G4"})
end
if ProbeSecondHead then
local sIndex = EgtNumToString( #PositionTable + 1)
table.insert( PositionTable, {Pos = "Pos"..sIndex, TcPos = "T502", Head = "H29", Group = "G4"})
end
local UsePositionHead = true
local function IsInGeomSet( ToolHead, PosHead)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -3
View File
@@ -36,6 +36,7 @@
4=s,DOUBLE
[MORTISE_STD]
0=b,MORTISE
1=d,STEP
2=d,SIDESTEP
0=th,TH,
1=b,MORTISE
2=d,STEP
3=d,SIDESTEP
+106
View File
@@ -1,5 +1,111 @@
==== 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
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
Versione 2.7l1 (18/12/2025)
- (SIM-GEN) Aggiunto controllo post movimenti ausiliari dell' EMC.PREVOFFSX nella funzione OnSpecialGetPrevMachiningOffset(). Ticket#2727
- (SIM-GEN) Divisione movimento B in approccio se > 90°. Ticket#2754
- (SIM) Aggiunta funzione CheckClamping
Versione 2.7k3 (28/11/2025)
- (GEN) Prima di andare allo scarico, si aggiunge movimento intermedio dove si aspetta che rulli scarico siano arrivati in posizione. Ticket#2716
Versione 2.7k2 (20/11/2025)
- (SIM) Aggiornata risoluzione VMillTol in funzione dello spessore lama
Versione 2.7k1 (05/11/2025)
- (SIM-GEN) Corretto calcolo per decidere se serve aprire i rulli
- (GEN) Aggiunta tolleranza in creazione piano di lavoro inclinato
- (SIM) Allo scarico si resetta Y2DELTA. Ticket#2687
Versione 2.7j3 (23/10/2025)
- (SIM) Corretta posizione parcheggio in caso di testa 1 su magazzino 2. Ticket#2660
Versione 2.7j2 (21/10/2025)
- (GEN) Se SPLIT con pinza 5, corretto salvataggio posizione pinza 2. Ticket#2654
Versione 2.7j1 (08/10/2025)
- (GEN) Salvataggio posizione Z su lavorazione precedente, sbagliava in caso di separazione. Ticket#2637
Versione 2.7i1 (10/09/2025)
- (SIM-GEN) Piccole correzioni per gestire secondo TC su ONE. Ticket#2563
- (SIM-GEN) Gestione aggregato BH completato. Ticket#2482
- (EST) Stima tempi considerando accelerazioni
- (SIM-GEN) Se fase start o restart, si aggiorna la posizione in X dell'asse per calcolare il link corretto
- (GEN) Piccola correzione risalita ZMAX dopo RELOAD del pezzo. Generazione allineata a simulazione.
Versione 2.7h2 (28/08/2025)
- (GEN) Migliorata gestione spegnimento utensile e disattivazione piano
- (SIM-GEN) Corretto nome variabile e altre piccole modifiche per Progress
Versione 2.7h1 (20/08/2025)
- (SIM-GEN) Non si chiudono i rulli se tagli o pretagli di testa e coda
- (SIM) Corretto movimento pinza 5 in caso di riposizionamento pinza 1
- (GEN) Corretta quota assoluta posizione testa trave in caso di pinza 5 e testa rimasta bassa
- (GEN) Se ultima lavorazione pezzo precedente ha stesso utensile della prima lavorazione pezzo successivo, la speed resta accesa
Versione 2.7g4 (23/07/2025)
- (SIM-GEN) Aggiunto parametro configurabile da TS3 per massima sporgenza trave in coda per pinza 5. Ticket#2538
Versione 2.7g3 (22/07/2025)
- (SIM) Corretto lettura angolo di presa della motosega
Versione 2.7g2 (08/07/2025)
- (SIM) Corretto movimento a parcheggio sega a catena. Ticket#2517
Versione 2.7g1 (01/07/2025)
- (GEN) Rimossa gestione PROBE inserita per sbaglio
- (GEN) Corretto gestione accelerazioni
- (SIM-GEN) Aggiunta gestione massima lunghezza scarico
Versione 2.7f1 (04/06/2025)
- (SIM) Aggiunta gestione qualità VMILL da impostazioni macchina. Tolto parametro 'CoeffVM'.
- (GEN) Aggiunti parametri FMAXPINZE, MAXACC, MINACC configurabili da TS3. Ticket#2052
Versione 2.7e1 (28/05/2025)
- (SIM-GEN) Alla separazione si spostano i carrelli di 30mm aprendo il taglio. Ticket#2259,Ticket#2328
Versione 2.7d1 (16/04/2025)
- (SIM) Distanza di collisione portata a 3mm, qualità VMILL ridotta a 4mm. Ticket#2395
Versione 2.7c3 (25/03/2025)
- (GEN) Corretto movimento approccio alla lavorazione se utensile lama montata su magazzino 2. Ticket#2361
+2 -2
View File
@@ -3,8 +3,8 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '2.7c3', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
VERSION = '3.1g2', -- versione script
MIN_MACH_VER_PP_COMMON = '3.1f1' -- versione minima kernel
}
return InfoCommon_STD_PP