Compare commits

...

45 Commits

Author SHA1 Message Date
andrea.villa 4673b56853 Cambio versione 2026-03-16 12:37:01 +01:00
andrea.villa d32cfe3026 Merge commit 'cae777df35a834a49c27a87f857e6eb4a893938a' 2026-03-16 12:36:28 +01:00
andrea.villa cae777df35 - Cambio versione per rilascio a cliente
- Cambio nome per distanza di collisione con paratie cabina
2026-03-16 12:36:10 +01:00
daniele.nicoli c6b3b4a050 Aggiunto info "PreviewShow" per anteprima utensile/testa nel MACH 2026-03-09 08:21:11 +01:00
daniele.nicoli 7b69180336 Merge branch 'master' into develop 2026-03-09 08:17:05 +01:00
andrea.villa e8f756c18d Aggiunto in BeamData il parametro MAX_ANGLE_DRILL_CUT 2026-03-05 08:46:18 +01:00
andrea.villa 27cc0b1eee - Nuova strategia di pinzaggio attivo di default
- modificato distanza per collisione carro C a 403mm
- Lunghezza utensile lungo impostata a 218.5
2026-02-23 08:21:30 +01:00
andrea.villa f0ac13dbda Merge remote-tracking branch 'origin/develop' 2026-02-06 13:43:41 +01:00
andrea.villa adc7b49891 - Aggiornamento MAchNotes per lavorazioni a 5 assi
- Cambio versione per rilascio a cliente
2026-02-06 13:43:29 +01:00
daniele.nicoli 4b193c2d8d - Mosso nell' .nge il solido di collisione tra utensile e asse C superiore per essere portato al livello del solido reale.
- Implementati nell' .mlde un nuovo parametro (DistRotCenterBToTopC), reso impostabile LONG_TOOL_MINLEN e il movimento del solido di collisione sopracitato e della faccia della flangia dell'asse C superiore per regolare l'ingombro per ogni macchina. I parametri sono impostabili da Ts3Data.lua.
2026-01-28 10:39:54 +01:00
daniele.nicoli 70234649b5 Merge remote-tracking branch 'origin/master' into develop 2026-01-28 08:53:59 +01:00
andrea.villa 8a47ffd80e Allineamento a common ver. 3.1a2 2026-01-26 15:58:04 +01:00
andrea.villa 87961afc05 - Nome macchina ricavato con funzione EGT dedicata
- HOTFIX: DeltaTol spostato in MLDE
2026-01-08 12:37:31 +01:00
andrea.villa 2c7c8ff64e Allineamento a common ver. 3.1a1 2026-01-08 08:49:14 +01:00
andrea.villa 0fe47c1068 Merge branch 'develop' 2025-12-23 08:35:33 +01:00
andrea.villa e576a07385 - Allineamento con common ver. 2.7l3
- UpdateMinJoinDeltaTol spostato in MLDE
- Rimosso da BeamData funzioni riportate inizialmente da PF1250
2025-12-23 08:35:21 +01:00
daniele.nicoli ed13855a87 Aggiornati mlde, nge e BeamData in attesa di aggiornamento Common per Controllo Pinzaggio VMILL 2025-12-15 08:54:27 +01:00
daniele.nicoli 94ec3b6fad Merge remote-tracking branch 'origin/master' into develop 2025-12-15 08:17:48 +01:00
andrea.villa 34ced69228 Corretto disegno porta utensile 2025-12-11 09:05:59 +01:00
andrea.villa b7f18cf0c0 Aggiunto tipo di lavorazione con aggregato flottante 2025-12-10 12:18:36 +01:00
andrea.villa 11f452bac8 - Allineamento con common ver. 2.7l1
- Nuovo porta-utensile
2025-12-10 10:09:04 +01:00
andrea.villa 5069b4fc4c Solido di collisione asse C spostato 3mm più in alto perchè con lama diametro 621mm ci passava talmente vicino che dava errore. 2025-11-20 14:54:44 +01:00
andrea.villa f1e3ff79b4 In NGE mancava manina portautensile in posizione T11 quando c'era aggregato BH 2025-11-18 16:06:34 +01:00
andrea.villa d6b602a59d Merge branch 'develop' 2025-11-18 15:57:56 +01:00
andrea.villa 0493ddfa66 Cambio versione per rilascio a Essetre dopo aggiunta gestione aggregato a T 2025-11-18 15:57:20 +01:00
andrea.villa 22ef746a36 Merge branch 'AggreT_TC2' into develop 2025-11-18 15:56:29 +01:00
andrea.villa d3ddf9f9c7 - Corretto tipo dato in MachNotes e ToolNotes
- Aggiunti tipi di lavorazione anche per aggregato
2025-11-14 12:08:21 +01:00
daniele.nicoli 97dcda8917 Aggiunta gestione CUT_SIC impostabile da TS3Data.lua 2025-11-13 10:42:08 +01:00
andrea.villa 0236d466b3 Merge branch 'master' into develop 2025-11-13 09:33:08 +01:00
andrea.villa 52e305aa48 Aggiunto caricamento Aggregato a T in caso di presenza secondo magazzino verticale. 2025-11-12 10:58:13 +01:00
andrea.villa e3c1ab71fe Merge branch 'NewTopColl' 2025-11-12 09:47:10 +01:00
andrea.villa 32e5f54761 Allineamento a common ver. 2.7k1 2025-11-10 16:19:30 +01:00
andrea.villa 04a7f180e8 Aggiornato .gitignore 2025-10-14 11:52:51 +02:00
andrea.villa fc8b39d260 Allineamento con common ver. 2.7j2 2025-10-08 16:13:35 +02:00
andrea.villa 0563e0c8ca Allineamento con common ver. 2.7j1 2025-10-06 16:00:02 +02:00
andrea.villa f8983fa6b4 Controllo collisione tra utensile e TOP testa C. Rilasciare dopo che è stata pubblicata nuova versioen CAM5 27j1 2025-09-25 12:41:02 +02:00
andrea.villa 726f04fabd Aggiunta lettura parametro MAX_HEIGHT_ROT_B_ABOVE da TS3 2025-09-23 14:39:42 +02:00
andrea.villa 6423ccf1b7 Allineamento con common ver.2.7i3 2025-09-23 11:40:54 +02:00
andrea.villa 6c3de96111 Allineamento con common ver. 2.7i2 2025-09-17 09:24:30 +02:00
andrea.villa 87438322e9 - Allineamento con common ver. 2.7i1
- Aggiunto tipo di lavorazione per automatismo
2025-09-08 08:49:53 +02:00
andrea.villa 64ef5eaa83 Cambiato accelerazioni di default 2025-07-01 08:46:41 +02:00
andrea.villa 95e7746eb6 Aggiunto lettura variabili accelerazioni pinze 2025-07-01 08:40:40 +02:00
andrea.villa 3de0fec055 Allineamento con common ver. 2.7g1 2025-07-01 08:18:12 +02:00
andrea.villa 6bd8510157 Allineamento con common ver. 2.7f3 2025-06-26 08:51:06 +02:00
andrea.villa 5c4fb776a1 Allineamento con common ver. 2.7f2 2025-06-19 16:51:57 +02:00
16 changed files with 844 additions and 361 deletions
+1
View File
@@ -1,6 +1,7 @@
/Tools
/Machinings
/SetUp
/Beam/AISetup
/Beam/Ts3Data.bak
/Beam/CutData.lua
/Beam/DrillData.lua
+9 -3
View File
@@ -6,13 +6,13 @@ EgtOutLog( ' FAST-BeamData started', 1)
-- Tabella per definizione modulo
local BeamData = {
RIGHT_LOAD = true, -- flag carico da destra
SIMUL_VIEW_DIR = 1, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
GO_FAST = 0, -- flag abilitazione modalità veloce (0=no, 1=carrelli, 2=anche cambio utensili)
RIGHT_LOAD = true, -- flag carico da destra
ROT90 = false, -- flag abilitazione rotazione 90 gradi
ROT180 = true, -- flag abilitazione rotazione 180 gradi
NEWCLAMPING = false, -- flag abilitazione nuovo metodo riposizionamento carrelli
FASTCLAMPING= true, -- flag abilitazione riduzione numero riposizionamenti al carico e durante grande trascinamento
NEWCLAMPING = true, -- flag abilitazione nuovo metodo riposizionamento carrelli
FASTCLAMPING= false, -- flag abilitazione riduzione numero riposizionamenti al carico e durante grande trascinamento
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 240, -- larghezza massima del grezzo
@@ -44,6 +44,7 @@ local BeamData = {
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
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
MAX_ANGLE_DRILL_CUT = 10, -- angolo massimo tra la foratura e il taglio che la attraversa
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
MAX_LEN_HTFEA = 2000.0, -- massima lunghezza di feature di testa o coda
@@ -104,10 +105,13 @@ if EgtExistsFile( sData) then
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
if Machine.Offsets.MAX_ANGLE_DRILL_CUT then BeamData.MAX_ANGLE_DRILL_CUT = EgtClamp( Machine.Offsets.MAX_ANGLE_DRILL_CUT, 1, 89) end
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.MAX_DIM_HTCUT_HBEAM = Machine.Offsets.MAX_DIM_HTCUT_HBEAM or BeamData.MAX_DIM_HTCUT_HBEAM
BeamData.MAX_HEIGHT2 = Machine.Offsets.MAX_HEIGHT2 or BeamData.MAX_HEIGHT2
BeamData.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
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
if Machine.Offsets.MIN_HEIGHT_ADDED_CUTS then BeamData.MIN_HEIGHT_ADDED_CUTS = min( Machine.Offsets.MIN_HEIGHT_ADDED_CUTS, BeamData.MIN_HEIGHT_ADDED_CUTS) end
@@ -115,6 +119,8 @@ if EgtExistsFile( sData) then
if Machine.Offsets.FASTCLAMPING ~= nil then BeamData.FASTCLAMPING = ( Machine.Offsets.FASTCLAMPING == 1) end
if Machine.Offsets.ROT90 ~= nil then BeamData.ROT90 = ( Machine.Offsets.ROT90 == 1) end
if Machine.Offsets.ROT180 ~= nil then BeamData.ROT180 = ( Machine.Offsets.ROT180 == 1) end
if Machine.Offsets.CUT_SIC then BeamData.CUT_SIC = EgtClamp( Machine.Offsets.CUT_SIC, 15, 50) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
+29 -19
View File
@@ -4,9 +4,11 @@
[Drill]
1=Drill
2=Pocket
3=AngleDrill
4=Predrill
2=Drill_AT
3=Pocket
4=Pocket_AT
5=AngleDrill
6=Predrill
[Milling]
1=Prof
@@ -14,25 +16,33 @@
3=Tenon
4=DtTenon
5=DtMortise
6=BirdsMouth
7=Chamfer
8=Mark
9=Text
10=Decor01
11=Long2Cut
12=Long2CutDown
13=LongSmallCut
14=BHSideMill
15=CleanCorner
16=ProfTCone
17=Long2CutSide
18=SmallToolContour
19=AntiSplintMillCut
6=DtMortise_AT
7=BirdsMouth
8=Chamfer
9=Mark
10=Text
11=Text_AT
12=Decor01
13=Long2Cut
14=Long2CutDown
15=LongSmallCut
16=BHSideMill
17=CleanCorner
18=ProfTCone
19=Long2CutSide
20=SmallToolContour
21=AntiSplintMillCut
22=Prof_end
23=SideMillAsBlade
24=FloatingAggregate
[Pocketing]
1=Pocket
2=OpenPocket
3=Mortise
2=Pocket_AT
3=OpenPocket
4=OpenPocket_AT
5=Mortise
6=Mortise_AT
[Sawing]
1=Sawing
+45 -27
View File
@@ -27,7 +27,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 154000 -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
end
---------------------------------------------------------------------
@@ -183,16 +185,12 @@ function OnDispositionEnd()
local STrave = EMT.ST
local HOverM = EMT.HOVM
-- calcolo dati pinze
local MinAccPinze = 0.3
local MaxAccPinze = 4
local KgMtCubo= WoodDensity or 550 -- densità legno in Kg / metro cubo
local Massa = ( HTrave * STrave * LBarra * KgMtCubo ) / 1000000000
local FMaxPinze = EMT.FMAXPINZE
local ForzaAtrito = 700 / 2 -- Serve per regolare P32 (700 valore reale pistone)
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAtrito) / 1000)
if ( TempoAcc < MinAccPinze) then TempoAcc = MinAccPinze end
if ( TempoAcc > MaxAccPinze) then TempoAcc = MaxAccPinze end
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
local RidFeed = 100 / Massa * 100
if ( RidFeed > 100) then RidFeed = 100 end
if IdTrave >= 0 then
@@ -252,9 +250,9 @@ function OnDispositionEnd()
EmtOutput( sOut)
-- altrimenti recupero rimanenza
else
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( LoadT, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( EMT.TPOS, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
-- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT
EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil
end
-- eventuale preparazione per rotazione immediata
@@ -498,6 +496,7 @@ function OnMachiningEnd()
EMT.U_STD = nil
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
end
---------------------------------------------------------------------
@@ -610,6 +609,9 @@ function OnRapid()
MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- decido se muovere prima testa o carrelli (standard prima testa)
local bHeadFirst = true
local sLateG101
@@ -628,15 +630,29 @@ function OnRapid()
end
end
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and sET == EMT.PREVET and ( abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
-- ricavo i dati per la lavorazione
local sEE = ' EE' .. EgtIf( bZmax, '3', '4')
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1pp, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
@@ -646,19 +662,21 @@ function OnRapid()
EmtOutput( '( *** ' .. sOut .. ' *** )')
end
-- ricavo i dati per la lavorazione
local sEE = ' EE' .. EgtIf( bZmax, '3', '4')
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350)) and EMT.FLAG2 == 1 then
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1pp, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
end
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
@@ -848,13 +866,13 @@ function OnRapid()
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
+51 -51
View File
@@ -27,7 +27,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 154000 -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
end
---------------------------------------------------------------------
@@ -205,9 +207,9 @@ function OnDispositionEnd()
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or EgtGetCurrMachGroup() or GDB_ID.NULL
local nLoad90 = EgtGetInfo( BtlInfoId, 'LOAD90', 'i') or 0
-- calcolo dati pinze
local AccPinze, AccMaxPinze, RidFeed, TempoAcc = CalcDinamicaPinze( HTrave, STrave, LBarra)
local AccPinz1, AccMaxPinz1, RidFeed1, TempoAcc1 = CalcDinamicaPinze( HTrave, STrave, LBarra - LTrave)
local AccPinz2, AccMaxPinz2, RidFeed2, TempoAcc2 = CalcDinamicaPinze( HTrave, STrave, LTrave)
local AccPinze, AccMaxPinze, RidFeed, TempoAcc = CalcDinamicaPinze_NUM( HTrave, STrave, LBarra)
local AccPinz1, AccMaxPinz1, RidFeed1, TempoAcc1 = CalcDinamicaPinze_NUM( HTrave, STrave, LBarra - LTrave)
local AccPinz2, AccMaxPinz2, RidFeed2, TempoAcc2 = CalcDinamicaPinze_NUM( HTrave, STrave, LTrave)
if IdTrave >= 0 then
local sOut = '( SN='..IdTrave..' LBarra='..EmtLenToString( LBarra, 3)..' L='..EmtLenToString( LTrave, 3)..
' H='..EmtLenToString( HTrave, 3)..' S='..EmtLenToString( STrave, 3)..' Acc='..EgtNumToString( TempoAcc, 1)..
@@ -271,9 +273,9 @@ function OnDispositionEnd()
EmtOutput( sOut)
-- altrimenti recupero rimanenza
else
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( LoadT, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( EMT.TPOS, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
-- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT
EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil
end
-- eventuale preparazione per rotazione immediata
@@ -542,6 +544,7 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVR3 = EMT.R3
EMT.PREVET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
end
---------------------------------------------------------------------
@@ -654,6 +657,9 @@ function OnRapid()
MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- decido se muovere prima testa o carrelli (standard prima testa)
local bHeadFirst = true
local sLateG101
@@ -673,22 +679,12 @@ function OnRapid()
end
end
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
if not EMT.LOAD then
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '-'), '%)', '-')
EmtOutput( '( *** ' .. sOut .. ' *** )')
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and sET == EMT.PREVET and ( abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
-- ricavo i dati per la lavorazione
@@ -718,15 +714,41 @@ function OnRapid()
sER = sER..EmtLenToString( EMT.TDIAM / 2, 3)
end
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
if not EMT.LOAD then
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '-'), '%)', '-')
EmtOutput( '( *** ' .. sOut .. ' *** )')
end
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350)) and EMT.FLAG2 == 1 then
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1pp, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
end
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
@@ -926,13 +948,13 @@ function OnRapid()
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
@@ -1094,28 +1116,6 @@ function FindNextTool()
return sTool, sHead, sTcPos
end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s]
local MaxTempoAcc = 4.0 -- [s]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
local AccMaxPinze = FMaxPinze / ( 60 * MinTempoAcc)
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return AccPinze, AccMaxPinze, RidFeed, TempoAcc
end
---------------------------------------------------------------------
function CalcCharStatus( sCmd, bSkipPress)
-- aperto
+36 -31
View File
@@ -31,7 +31,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 154000 -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or 4000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
EMT.MINACC = MinAcc or 300 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
end
---------------------------------------------------------------------
@@ -223,9 +225,9 @@ function OnDispositionEnd()
local HOverM = EMT.HOVM
-- calcolo dati pinze
local TempAccPinze, TempMinAccPinze, RidFeed = CalcDinamicaPinze( HTrave, STrave, LBarra)
local TempAccPinz1, TempMinAccPinz1, RidFeed1 = CalcDinamicaPinze( HTrave, STrave, LBarra - LTrave)
local TempAccPinz2, TempMinAccPinz2, RidFeed2 = CalcDinamicaPinze( HTrave, STrave, LTrave)
local TempAccPinze, TempMinAccPinze, RidFeed = CalcDinamicaPinze_TPA( HTrave, STrave, LBarra)
local TempAccPinz1, TempMinAccPinz1, RidFeed1 = CalcDinamicaPinze_TPA( HTrave, STrave, LBarra - LTrave)
local TempAccPinz2, TempMinAccPinz2, RidFeed2 = CalcDinamicaPinze_TPA( HTrave, STrave, LTrave)
if IdTrave >= 0 then
local sPrt = '( *** Part '.. EgtNumToString( IdTrave, 0) ..' ***)'
@@ -273,9 +275,9 @@ function OnDispositionEnd()
' P4=' .. EmtLenToString( HOverM, 2) .. ' P5=' .. tostring( nLoad90) .. ' P6=' .. EmtLenToString( EgtIf( IdTrave >= 0, LTrave, LBarra), 2) ..
' P7=' .. EgtNumToString( TempAccPinze, 2) .. ' P8=' .. EgtNumToString( TempAccPinz2, 2) .. ' P9=' .. EgtNumToString( TempAccPinz1, 2)
EmtOutput( sOut)
EmtOutput( 'M112'..' P1='..EmtLenToString( LoadT, 3).. ' P5=1 P6='..EmtLenToString( EMT.YPOS, 3)..' P7='..EmtLenToString( ParkV, 3) ..' P9='..GetFmaxClamp())
EmtOutput( 'M112'..' P1='..EmtLenToString( EMT.TPOS, 3).. ' P5=1 P6='..EmtLenToString( EMT.YPOS, 3)..' P7='..EmtLenToString( ParkV, 3) ..' P9='..GetFmaxClamp())
-- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT
EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil
end
-- eventuale preparazione per rotazione immediata
@@ -656,16 +658,28 @@ function OnRapid()
bHeadFirst = false
end
end
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and EMT.TCPOS == EMT.PREVTCPOS and ( abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2pp, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
' P6=' .. EgtNumToString( EMT.PREVTCPOS, EMT.DECMACRO) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
end
@@ -677,8 +691,21 @@ function OnRapid()
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350)) and EMT.FLAG2 == 1 then
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
end
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
@@ -1054,28 +1081,6 @@ function FindNextTool()
return sTool, sHead, sTcPos
end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s]
local MaxTempoAcc = 4.0 -- [s]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
local AccMaxPinze = FMaxPinze / ( 60 * MinTempoAcc)
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return TempoAcc * 1000, MinTempoAcc * 1000, RidFeed
end
---------------------------------------------------------------------
function CalcCharStatus( sCmd, bSkipPress)
-- aperto
+372 -49
View File
@@ -7,9 +7,6 @@ EgtEnableDebug( false)
-- carico librerie
local BD = require( 'BeamData')
LONG_TOOL_MINLEN = 221
BIG_TOOL_DIAM = 300
---------------------------------------------------------------------
-- *** GENERATION ***
---------------------------------------------------------------------
@@ -82,6 +79,14 @@ function OnSimulStart()
for j = 1, #( vTools or {}) do
if vTools[j] ~= '' then
EgtLoadTool( vTcPos[i], j, vTools[j])
-- Aggiunto controllo lunghezza lama minima * 0.9 per ricavare la tolleranza del VMILL
if EgtTdbSetCurrTool(vTools[j]) then -- set utensile corrente
if EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_STD or EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_FLAT then -- controllo tipo utensile sega
local dCurrSawLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) * 0.9
-- se non definito o minore del valore precedente aggiorna la tolleranza
EMT.VMILLTOL = EgtIf( not EMT.VMILLTOL or dCurrSawLen < EMT.VMILLTOL, dCurrSawLen, EMT.VMILLTOL)
end
end
end
end
ShowToolInTcPos( vTcPos[i], true)
@@ -118,7 +123,8 @@ function OnSimulStart()
{ Grp = 'V', Sub = 'COLLISION', Name = 'VOL2'},
{ Grp = 'PV', Sub = 'COLLISION', Name = 'VOL'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'SIDE1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'SIDE2'}}
{ Grp = 'Base', Sub = 'COLLISION', Name = 'SIDE2'},
{ Grp = 'C', Sub = 'COLLISION2', Name = 'C_TOP'}}
EgtOutLog( 'MCODET Objects :', 4)
local nMcdNullCnt = 0
for i = 1, #McdData do
@@ -142,6 +148,30 @@ function OnSimulStart()
end
-- Preparo lista collisioni vuota
EMT.COLLIDE = {}
-- si crea gruppo temporaneo appoggio controllo clamping
CLAMP_CHECK_GROUP = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'CLAMP_CHECK')
CLAMP_CHECK_INTERS = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'CLAMP_INTERS')
if CLAMP_CHECK_GROUP then
EgtEmptyGroup( CLAMP_CHECK_GROUP)
else
local frClampCheckGroup = Frame3d( ORIG(), GDB_FR.FRONT)
CLAMP_CHECK_GROUP = EgtGroup( GDB_ID.ROOT, frClampCheckGroup)
EgtSetName( CLAMP_CHECK_GROUP, 'CLAMP_CHECK')
EgtSetLevel( CLAMP_CHECK_GROUP, GDB_LV.TEMP)
EgtSetStatus( CLAMP_CHECK_GROUP, GDB_ST.OFF)
end
if CLAMP_CHECK_INTERS then
EgtEmptyGroup( CLAMP_CHECK_INTERS)
else
CLAMP_CHECK_INTERS = EgtGroup( GDB_ID.ROOT)
EgtSetName( CLAMP_CHECK_INTERS, 'CLAMP_INTERS')
EgtSetLevel( CLAMP_CHECK_INTERS, GDB_LV.TEMP)
EgtSetStatus( CLAMP_CHECK_INTERS, GDB_ST.OFF)
end
end
---------------------------------------------------------------------
@@ -168,13 +198,13 @@ function OnSimulDispositionStart()
-- Determino dimensioni del grezzo
local nSolId = EgtGetFirstNameInGroup( EgtGetFirstRawPart() or GDB_ID.NULL, 'RawSolid') or GDB_ID.NULL
local b3Sol = EgtGetBBoxGlob( nSolId, GDB_BB.STANDARD)
EMT.LB = 0
EMT.SB = 0
EMT.HB = 0
EMT.LT = 0
EMT.ST = 0
EMT.HT = 0
if b3Sol then
EMT.LB = b3Sol:getDimX()
EMT.SB = b3Sol:getDimY()
EMT.HB = b3Sol:getDimZ()
EMT.LT = b3Sol:getDimX()
EMT.ST = b3Sol:getDimY()
EMT.HT = b3Sol:getDimZ()
end
-- Carico primo utensile sulla testa 1
local sTool, nTlen = FindFirstToolOnHead( 'H1')
@@ -215,7 +245,7 @@ function OnSimulDispositionStart()
-- determino la risoluzione dello Zmap
local dTol = 4.71
if EmtGetVMillStep then
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71)
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol)
else
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
if dArea < 0.075e6 then
@@ -232,6 +262,7 @@ function OnSimulDispositionStart()
dTol = 3.77
end
end
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
-- creo lo Zmap
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
if VMillId then
@@ -289,18 +320,24 @@ function OnSimulDispositionStart()
local nOrd = GetPhaseOrd( EMT.PHASE)
local nScrapOrd = GetPhaseOrd( EgtGetPhaseCount()) + 1
local b3Raw = BBox3d()
local b3Bar = BBox3d()
local b3Part = BBox3d()
local nPartRawId, nScrapRawId
local nRawId = EgtGetFirstRawPart()
while nRawId do
local nNextRawId = EgtGetNextRawPart( nRawId)
if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then
EmtLinkRawPartToGroup( nRawId, 'Tab')
local b3Tmp = EgtGetRawPartBBox( nRawId)
b3Bar:Add( b3Tmp)
local nRawOrd = EgtGetInfo( nRawId, 'ORD', 'i')
if nRawOrd == nOrd then
b3Raw = EgtGetRawPartBBox( nRawId)
--b3Raw = EgtGetRawPartBBox( nRawId)
b3Raw:Add( b3Tmp)
b3Part:Add( b3Tmp)
nPartRawId = nRawId
elseif nRawOrd == nOrd + 1 and nRawOrd == nScrapOrd then
local b3Tmp = EgtGetRawPartBBox( nRawId) or BBox3d()
--local b3Tmp = EgtGetRawPartBBox( nRawId) or BBox3d()
b3Raw:Add( b3Tmp)
nScrapRawId = nRawId
end
@@ -314,6 +351,9 @@ function OnSimulDispositionStart()
else
EMT.SCRAP = nil
end
EMT.LB = b3Bar:getDimX()
EMT.LR = b3Raw:getDimX()
EMT.LT = b3Part:getDimX()
-- recupero CutId del pezzo in lavorazione
EMT.CUTID = EgtGetInfo( EgtGetFirstPartInRawPart( nPartRawId or GDB_ID.NULL) or GDB_ID.NULL, 'CUTID', 'i') or 0
EMT.YSPEC = nil
@@ -385,6 +425,7 @@ function OnSimulDispositionStart()
if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd then
EmtLinkRawPartToGroup( nRawId, 'Tab')
b3Bar = EgtGetRawPartBBox( nRawId)
else
EgtMove( nRawId, vtMove, GDB_RT.GLOB)
EgtSetStatus( nRawId, GDB_ST.OFF)
@@ -392,6 +433,8 @@ function OnSimulDispositionStart()
end
nRawId = nNextRawId
end
EMT.LB = b3Bar:getDimX()
-- altrimenti fase finale, aggancio primo grezzo alla tavola e gli altri in posizione carico al carro Y
else
-- verifico posizione di carico
@@ -409,12 +452,14 @@ function OnSimulDispositionStart()
nRawId = EgtGetNextRawPart( nRawId)
end
-- eseguo
local b3Bar = BBox3d()
nRawId = EgtGetFirstRawPart()
while nRawId do
local nNextRawId = EgtGetNextRawPart( nRawId)
if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd then
EmtLinkRawPartToGroup( nRawId, 'Tab')
b3Bar = EgtGetRawPartBBox( nRawId)
else
EgtMove( nRawId, vtMove, GDB_RT.GLOB)
EmtLinkRawPartToGroup( nRawId, 'Y')
@@ -422,6 +467,7 @@ function OnSimulDispositionStart()
end
nRawId = nNextRawId
end
EMT.LB = b3Bar:getDimX()
end
-- Indicazione angolo rotazione pezzo
EMT.ROT = EgtGetInfo( EMT.DISPID, 'ROT', 'i') or 0
@@ -453,6 +499,7 @@ function OnSimulDispositionEnd()
EMT.POSTROT = true
end
end
EMT.SPLIT = false
EMT.OPEISDISP = false
end
@@ -558,24 +605,24 @@ function OnSimulToolDeselect()
-- movimento scarico sega a catena
if EMT.HEAD == 'H3' then
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if EMT.HB > BeamHeightForFixRot then
SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
-- raddrizzo asse B prima di ruotare il C
SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
local dPosA = EgtGetAxisPos( 'A')
if abs( dPosA) < 0.1 then
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 180, 0), MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, -180, 0), MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, 270), MCH_SIM_STEP.COLLROT)
end
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico rinvio
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico aggregato BlockHaus
elseif EMT.HEAD == 'H7' then
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
-- movimento scarico punta lunga su T111
elseif EMT.TOTLEN > LONG_TOOL_MINLEN then
-- se su cambio utensile T111
@@ -586,9 +633,9 @@ function OnSimulToolDeselect()
else
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
if GetTCSet( EMT.TCPOS) == 1 then
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'B', -90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'B', -90, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
end
end
-- movimento scarico utensile di grosso diametro (su T111)
@@ -608,7 +655,16 @@ function OnSimulToolDeselect()
if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' and EMT.NEXTHEAD ~= 'H6' then
SimulMoveAxes( 'B', EgtIf( GetTCSet( EMT.TCPOS) == 1, 90, -90), MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
if EMT.NEXTHEAD == 'H3' then
local dPosA = EgtGetAxisPos( 'A')
if abs( dPosA) < 0.1 then
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, 270), MCH_SIM_STEP.RAPROT)
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, -180, 0), MCH_SIM_STEP.COLLROT)
end
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
end
end
-- se segue lama, carico utensile di default
if EMT.NEXTHEAD == 'H2' then
@@ -698,6 +754,7 @@ function OnSimulMachiningEnd()
EMT.UNLOADING = false
EMT.FALL = false
end
EMT.SPLIT = nil
EMT.PREVHEAD = EMT.HEAD
EMT.PREVTOOL = EMT.TOOL
EMT.PREVEXIT = EMT.EXIT
@@ -785,13 +842,26 @@ function OnSimulMoveStart()
VerifyVStroke( EMT.A2)
-- se inizio lavorazione
if EMT.MCHFIRST then
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and EMT.TOOL == EMT.PREVTOOL and abs( EMT.R3p - EMT.R3) < 100 * GEO.EPS_SMALL and ( abs( EMT.R2p - EMT.R2) > 25 or abs( EMT.R1p - EMT.R1) > 25) then
bGoToHome = true
end
EgtOutText( '')
EMT.MCHFIRST = false
local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo
if not EMT.LOAD and EMT.MOVE == 0 and ( EMT.HB > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TOTLEN > 350)) and EMT.FLAG2 == 1 then
-- se motosega mi muovo a X di sicurezza per ruotare
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) then
if not EMT.LOAD and EMT.MOVE == 0 and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) and
( EMT.HT > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
-- se motosega mi muovo a X di sicurezza per ruotare, prima si raddrizza B e poi C in posizione
if EMT.HEAD == 'H3' or bGoToHome then
SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
elseif ( bZmax and EMT.TOTLEN > 200) then
SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
end
end
@@ -873,6 +943,8 @@ function ExecAuxCmd( sCmd)
if Cmd[1] == '0' then
if Cmd[2] == 'Unloading' then
EMT.UNLOADING = true
elseif Cmd[2] == 'Split' then
EMT.SPLIT = true
elseif Cmd[2] == 'Fall' then
EMT.FALL = true
end
@@ -914,19 +986,9 @@ function ExecAuxCmd( sCmd)
end
end
elseif Cmd[1] == '11' then
local dPY = MaxOpen
if Cmd[2] ~= '0' then
dPY = EgtIf( EMT.ROT == -1, EMT.HB, EMT.SB)
end
SimulMoveAxis( 'PY', dPY, MCH_SIM_STEP.RAPID)
SetPYLight( Cmd[2] ~= '0')
ExecMovePY( Cmd[2] ~= '0')
elseif Cmd[1] == '12' then
local dPV = MaxOpen
if Cmd[2] ~= '0' then
dPV = EgtIf( EMT.ROT == -1, EMT.HB, EMT.SB)
end
SimulMoveAxis( 'PV', dPV, MCH_SIM_STEP.RAPID)
SetPVLight( Cmd[2] ~= '0')
ExecMovePV( Cmd[2] ~= '0')
elseif Cmd[1] == '21' then
local nYDelta = tonumber( Cmd[2])
local nVDelta = tonumber( Cmd[3])
@@ -990,7 +1052,7 @@ function ExecUnloading()
-- li sposto per lasciare spazio al nuovo pezzo
local nId = EgtGetFirstInGroup( nVmGrpId)
while nId do
EgtMove( nId, Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.SB + 50.0), -( EMT.SB + 50.0)), 0), GDB_RT.GLOB)
EgtMove( nId, Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.ST + 50.0), -( EMT.ST + 50.0)), 0), GDB_RT.GLOB)
nId = EgtGetNext( nId)
end
-- creo un nuovo layer e vi inserisco il nuovo pezzo
@@ -1035,6 +1097,176 @@ function ExecUnloading()
end
end
---------------------------------------------------------------------
function CheckClamping( sClampName)
local nClampId = EgtGetAxisId( sClampName) or GDB_ID.NULL
local nClampPathId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nClampId, 'CLAMP_CHECK') or GDB_ID.NULL)
local b3ClampingArea = EgtGetBBoxGlob( nClampPathId or GDB_ID.NULL, GDB_BB.STANDARD)
-- se non trovo percorso area di clamping, esco subito
if not nClampPathId or not EMT.VMILL or not ClampingCoeffMin then
return
end
local function GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
local vCurveListId = {}
local vtIntersPlane
-- piano di interpolazione
if sIntersPlane == 'X' then
vtIntersPlane = X_AX()
elseif sIntersPlane == 'Y' then
vtIntersPlane = Y_AX()
elseif sIntersPlane == 'Z' then
vtIntersPlane = Z_AX()
end
for i = 1, #EMT.VMILL do
local b3VMill = EgtGetBBoxGlob( EMT.VMILL[i], GDB_BB.EXACT)
local ptPosIntersPlane
if sPosIntersPlane == 'MIN' then
ptPosIntersPlane = b3VMill:getMin() + dDepth * vtIntersPlane
elseif sPosIntersPlane == 'MAX' then
ptPosIntersPlane = b3VMill:getMax() - dDepth * vtIntersPlane
end
local nLoopId, nLoopCnt = EgtPlaneVolZmapInters( ptPosIntersPlane, vtIntersPlane, EMT.VMILL[i], CLAMP_CHECK_INTERS, GDB_RT.GLOB)
vCurveListId = EgtTableAdd( vCurveListId, nLoopId, nLoopCnt)
end
return vCurveListId
end
local function CalculateIntersectionArea( sPosIntersPlane, sIntersPlane, dDepth)
-- test piano frontale
local vCurveListId = GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
-- si copia curva intersezione e curva pinza in gruppo di confronto
local nFlatSurfId, nFlatSurfCnt = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, vCurveListId)
local vFlatSurfId = EgtTableFill( nFlatSurfId, nFlatSurfCnt) or {}
local nClampSurfId = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, nClampPathId)
local dTotalArea = 0
local dTotalXLenght = 0
for i = 1, #vFlatSurfId do
local nTempSurfId = vFlatSurfId[i]
EgtSurfFrIntersect( nTempSurfId, nClampSurfId)
if nTempSurfId then
dTotalArea = dTotalArea + ceil( EgtSurfArea( nTempSurfId) or 0)
local b3BoxIntersectionBox = EgtGetBBoxGlob( nTempSurfId, GDB_BB.STANDARD)
if b3BoxIntersectionBox then
dTotalXLenght = dTotalXLenght + ceil( b3BoxIntersectionBox:getDimX()) -- somma lunghezze (x) delle aree pinzate
end
end
end
return dTotalArea, dTotalXLenght
end
-- minima area considerata per un corretto pinzaggio
DistZClampToTable = DistZClampToTable or 0
--local MinJoin = BD.GetMinJoin( EMT.ST, EMT.HT, EgtIf( EMT.SPLIT, EMT.LT, EMT.LB))
UpdateMinJoinDeltaTol( EMT.ST, EMT.HT, EgtIf( EMT.SPLIT, EMT.LT, EMT.LB))
local MinZClamping = min( b3ClampingArea:getDimZ() + DistZClampToTable, EMT.HT) - DistZClampToTable
local dMinClamping = ( MinJoin * MinZClamping)
-- si moltiplica per un coefficiente minimo sotto al quale si da l'errore di pinzaggio
ClampingCoeffMin = EgtClamp( ClampingCoeffMin, 0.01, 1)
if MinZClamping > 116 then
dMinClamping = MinJoin * 116 + ( pow( MinJoin, 2) / 2)
if MinJoin > 280 then
dMinClamping = MinJoin * 116 + ( pow( 280, 2) / 2) + ( pow( MinJoin - 280, 2))
end
end
local dMinClampingAreaWarn = dMinClamping * ClampingCoeffMin
local dMinClampingAreaErr = dMinClamping * ( ClampingCoeffMin / 3)
local bError = true
local sWrn, sErr
local bWriteWarnMessage = false
local bWriteErrMessage = false
-- controllo faccia frontale
local dArea, dXClampedLenght = CalculateIntersectionArea( 'MIN', 'Y', 3)
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
if dArea and dArea < dMinClampingAreaErr then
-- solo se pinza almeno 1cm2, e la somma della lunghezza pinzata è maggiore della lunghezza minima pinzabile da Warning e non errore
if dXClampedLenght >= MinJoin * ClampingCoeffMin and dArea > 1000 then
bError = false
end
-- pinzaggio non fattibile, errore
if bError then
sErr = 'ERROR CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteErrMessage = true
end
end
-- WARNING: pinza meno del minimo richiesto
if dArea and dArea < dMinClampingAreaWarn and not bWriteErrMessage then
sWrn = 'WARNING CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteWarnMessage = true
end
EgtEmptyGroup( CLAMP_CHECK_GROUP)
EgtEmptyGroup( CLAMP_CHECK_INTERS)
-- controllo altro lato solo se non sono già in errore
if not bWriteErrMessage then
-- controllo faccia posteriore
dArea, dXClampedLenght = CalculateIntersectionArea( 'MAX', 'Y', 3)
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
if dArea and dArea < dMinClampingAreaErr then
-- solo se pinza almeno 1cm2, e la somma della lunghezza pinzata è maggiore della lunghezza minima pinzabile da Warning e non errore
if dXClampedLenght >= MinJoin * ClampingCoeffMin and dArea > 1000 then
bError = false
end
-- pinzaggio non fattibile, errore
if bError then
sErr = 'ERROR CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteErrMessage = true
end
end
-- WARNING: pinza meno del minimo richiesto
if dArea and dArea < dMinClampingAreaWarn and not bWriteWarnMessage and not bWriteErrMessage then
sWrn = 'WARNING CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteWarnMessage = true
end
EgtEmptyGroup( CLAMP_CHECK_GROUP)
EgtEmptyGroup( CLAMP_CHECK_INTERS)
end
if bWriteErrMessage then
EmtSetLastError( 1213, sErr, EgtGetEnableUI())
EgtOutBox( sErr, 'CLAMPING', 'ERROR', 'OK')
EmtSetSimulPause()
elseif bWriteWarnMessage then
EgtOutLog( sWrn)
EgtOutBox( sWrn, 'CLAMPING', 'WARNING', 'OK')
EmtSetSimulPause()
end
end
---------------------------------------------------------------------
function ExecMovePY( bClose)
--SimulMoveAxes( 'PY', EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
local dPY = MaxOpen
if bClose then
dPY = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PY', dPY, MCH_SIM_STEP.RAPID)
SetPYLight( bClose)
if bClose then
CheckClamping( 'PY')
end
end
---------------------------------------------------------------------
function ExecMovePV( bClose)
--EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
local dPV = MaxOpen
if bClose then
dPV = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PV', dPV, MCH_SIM_STEP.RAPID)
SetPVLight( bClose)
if bClose then
CheckClamping( 'PV')
end
end
---------------------------------------------------------------------
function VerifyYSlide( sName1, dVal1, sName2, dVal2)
-- Se movimento trave agganciata con carrello Y
@@ -1192,11 +1424,11 @@ end
-- *** ESTIMATION T&L ***
---------------------------------------------------------------------
local ESTIMATION_RAPID_COEFF = EstimationRapidMultiplier or 1
local RAPID_X_FEED = 75000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_X_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Y_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Z_FEED = 50000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_C_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_B_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_Z_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_C_FEED = 12000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_B_FEED = 12000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_MIN_T = 0.1 * ESTIMATION_RAPID_COEFF -- s
local LOAD_T = 2 * ESTIMATION_RAPID_COEFF -- s
local CHAR_ONE_MOVE_T = 1 * ESTIMATION_RAPID_COEFF -- s
@@ -1208,6 +1440,18 @@ local FALL_T = 2 * ESTIMATION_RAPID_COEFF -- s
---------------------------------------------------------------------
function OnEstimStart()
EMT.INCHES = not EgtUiUnitsAreMM() -- unità di misura mm/inches
-- TPA
if NumericalControl == 'TPA' then
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or 4000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
EMT.MINACC = MinAcc or 300 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
-- NUM_PLUS e NUM
else
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
end
end
---------------------------------------------------------------------
@@ -1293,6 +1537,15 @@ function OnEstimDispositionEnd()
EMT.OPEISDISP = false
end
---------------------------------------------------------------------
function OnEstimRawMoveData()
-- se start del pezzo
if IsStartOrRestPhase( EMT.PHASE) then
EMT.SPLIT = false
end
OnRawMoveData()
end
---------------------------------------------------------------------
function OnEstimToolSelect()
-- reset indice utensile in tabella lunghezze
@@ -1349,6 +1602,12 @@ function OnEstimMachiningEnd()
EMT.TLE_NAME = nil
EMT.TLE_TIME = nil
end
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
EMT.MCHSPLIT = ( EMT.MCHUSERNOTES:find( 'Split;', 1, true) ~= nil)
if EMT.MCHSPLIT then
EMT.SPLIT = true
end
end
---------------------------------------------------------------------
@@ -1479,15 +1738,15 @@ function OnEstimRapid()
EMT.MCHEXTLEN = EMT.MCHEXTLEN + dLen
-- calcolo tempo
local dTime = RAPID_MIN_T
local dT1 = abs( dL1) / RAPID_X_FEED * 60
local dT1 = CalcMoveTime( abs( dL1), EMT.FMAXPINZE, EMT.SPLIT)
if dT1 > dTime then dTime = dT1 end
local dT2 = abs( dL2) / RAPID_Y_FEED * 60
local dT2 = abs( dL2) / ( RAPID_X_FEED / 60) -- CalcMoveTime( abs( dL2), RAPID_X_FEED, EMT.SPLIT)
if dT2 > dTime then dTime = dT2 end
local dT3 = abs( dL3) / RAPID_Z_FEED * 60
local dT3 = abs( dL3) / ( RAPID_Z_FEED * 60) -- CalcMoveTime( abs( dL3), RAPID_Z_FEED, EMT.SPLIT)
if dT3 > dTime then dTime = dT3 end
local dT4 = abs( dR1) / RAPID_C_FEED * 60
local dT4 = abs( dR1) / ( RAPID_C_FEED / 60)
if dT4 > dTime then dTime = dT4 end
local dT5 = abs( dR2) / RAPID_B_FEED * 60
local dT5 = abs( dR2) / ( RAPID_B_FEED / 60)
if dT5 > dTime then dTime = dT5 end
EMT.MCHEXTTIME = EMT.MCHEXTTIME + dTime
EgtOutLog( string.format( ' G0 Len=%.0f Rot=%.0f° Time=%.2f', dLen, abs( dR1) + abs( dR2), dTime), 5)
@@ -1505,7 +1764,7 @@ function OnEstimLinear()
local dLen = sqrt( dL1 * dL1 + dL2 * dL2 + dL3 * dL3)
EMT.MCHCUTLEN = EMT.MCHCUTLEN + dLen
-- calcolo tempo
local dTime = dLen / EMT.F * 60
local dTime = dLen / ( EMT.F / 60) -- CalcMoveTime( dLen, EMT.F, EMT.SPLIT)
EMT.MCHCUTTIME = EMT.MCHCUTTIME + dTime
EgtOutLog( string.format( ' G1 Len=%.0f Time=%.2f', dLen, dTime), 5)
-- aggiorno valori come precedenti
@@ -1652,6 +1911,70 @@ function GetParkT()
end
end
---------------------------------------------------------------------
function CalcDinamicaPinze_TPA( dH, dS, dL)
local MinTempoAcc = EMT.MINACC -- [ms] ~300
local MaxTempoAcc = EMT.MAXACC -- [ms] ~4000
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = EgtClamp( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito), MinTempoAcc, MaxTempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return TempoAcc, MinTempoAcc, RidFeed
end
---------------------------------------------------------------------
function CalcDinamicaPinze_NUM( dH, dS, dL)
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
local AccMaxPinze = EMT.MAXACC
local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return AccPinze, AccMaxPinze, RidFeed, TempoAcc
end
---------------------------------------------------------------------
function CalcMoveTime( dPathLen, dFeed, bIsSplitted)
local dTime
local dFeedInSec = dFeed / 60
if NumericalControl == 'TPA' then
local dTempoAcc, _, _ = CalcDinamicaPinze_TPA( EMT.HT, EMT.ST, EgtIf( bIsSplitted, EMT.LT, EMT.LB))
dTempoAcc = dTempoAcc / 1000
-- se si raggiunge la velocità massima
if dPathLen >= dFeedInSec * dTempoAcc then
dTime = dTempoAcc * 2 + ( ( dPathLen - dFeedInSec * dTempoAcc) / dFeedInSec)
else
dTime = 2 * sqrt( (dPathLen * dTempoAcc) / dFeedInSec)
end
else
local dAcc, _, _, _ = CalcDinamicaPinze_NUM( EMT.HT, EMT.ST, EgtIf( bIsSplitted, EMT.LT, EMT.LB))
-- Caso 1: dFeed raggiunta
if dPathLen >= ( dFeedInSec ^ 2) / dAcc then
dTime = ( dFeedInSec / dAcc) + ( dPathLen / dFeedInSec)
-- Caso 2: dFeed non raggiunta
else
dTime = 2 * sqrt( dPathLen / dAcc)
end
end
return dTime
end
---------------------------------------------------------------------
-- *** END GENERAL ***
---------------------------------------------------------------------
+10 -64
View File
@@ -31,20 +31,9 @@ end
---------- OnSpecialApplyDisposition & OnPostApplyMachining ---------
----------------------- Costanti ------------------------------------
local DELTA_TOL_V = 110
local DELTA_TOL_S = 210
local DELTA_TOL_L = 410
local DELTA_TOL_FIXED = 50
local DeltaTol = DELTA_TOL_S
local DELTA_SIC = 1
local AGG_LOAD = 50
local MIN_JOIN_VV = EgtClamp( MinJoinVV or 75, 60, 150)
local MIN_JOIN_SS = EgtClamp( MinJoinSS or 100, 80, 275)
local MIN_JOIN_LS = EgtClamp( MinJoinLS or 290, 250, 400)
local MIN_JOIN_SL = EgtClamp( MinJoinSL or 100, 80, 400)
local MIN_JOIN_LL = EgtClamp( MinJoinLL or 400, 300, 600)
local MinJoin = MIN_JOIN_SS
local MinOther = abs( MinY) + abs( MaxV) + MinJoin
----------------------- Variabili -----------------------------------
local Test = false
@@ -153,53 +142,6 @@ local function IsFirstMachiningAfterRotation( nMchId)
return ( nRot ~= nPrevRot)
end
---------------------------------------------------------------------
local function UpdateMinJoinDeltaTol()
local L_SMALL = 800
local H_V = 90
local H_S = 200
local H_L = 400
local W_V = 90
local W_S = 150
local W_L = 250
if EMC.SB <= W_V and EMC.HB <= H_V then
MinJoin = MIN_JOIN_VV
DeltaTol = DELTA_TOL_V
elseif EMC.LB <= L_SMALL then
MinJoin = MIN_JOIN_SS
DeltaTol = DELTA_TOL_S
else
local dMinJoinS
local dMinJoinL
if EMC.SB <= W_S then
dMinJoinS = MIN_JOIN_SS
dMinJoinL = MIN_JOIN_LS
elseif EMC.SB <= W_L then
local Coeff = ( EMC.SB - W_S) / ( W_L - W_S)
dMinJoinS = ( 1 - Coeff) * MIN_JOIN_SS + Coeff * MIN_JOIN_SL
dMinJoinL = ( 1 - Coeff) * MIN_JOIN_LS + Coeff * MIN_JOIN_LL
else
dMinJoinS = MIN_JOIN_SL
dMinJoinL = MIN_JOIN_LL
end
if EMC.HB <= H_S then
MinJoin = dMinJoinS
DeltaTol = DELTA_TOL_S
elseif EMC.HB <= H_L then
local Coeff = ( EMC.HB - H_S) / ( H_L - H_S)
MinJoin = ( 1 - Coeff) * dMinJoinS + Coeff * dMinJoinL
DeltaTol = ( 1 - Coeff) * DELTA_TOL_S + Coeff * DELTA_TOL_L
else
MinJoin = dMinJoinL
DeltaTol = DELTA_TOL_L
end
if EMC.SB < W_V then
DeltaTol = DELTA_TOL_V
end
end
MinOther = abs( MinY) + abs( MaxV) + MinJoin
end
---------------------------------------------------------------------
local function GetCUTID()
-- recupero CUTID del pezzo in lavoro
@@ -367,7 +309,7 @@ function OnSpecialApplyDisposition()
EMC.ZMIN = b3Raw:getMin():getZ()
-- Aggiorno limiti di presa e tolleranza
UpdateMinJoinDeltaTol()
UpdateMinJoinDeltaTol( EMC.SB, EMC.HB, EMC.LB)
-- Assegno sovramateriale di testa e ingombro tagli di testa e di coda
EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0
@@ -656,7 +598,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
EMC.ZMIN = b3Raw:getMin():getZ()
-- Aggiorno limiti di presa e tolleranza
UpdateMinJoinDeltaTol()
UpdateMinJoinDeltaTol( EMC.SB, EMC.HB, EMC.LB)
-- Recupero sovramateriale di testa e ingombro tagli di testa e di coda
EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0
@@ -931,7 +873,7 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
local dHeadBack = 350
if bSaw then
if vtTool:getX() > 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then
dHeadBack = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX())
dHeadBack = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) + EgtIf( EMC.CNT == 1, 10, 0)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then
dHeadBack = EgtIf( vtArm:getX() < 0, 540, 350)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then
@@ -1022,7 +964,7 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
local dHeadFront = 350
if bSaw then
if vtTool:getX() < 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then
dHeadFront = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX())
dHeadFront = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) + EgtIf( EMC.CNT == 1, 10, 0)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then
dHeadFront = EgtIf( vtArm:getX() > 0, 540, 350)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then
@@ -1642,7 +1584,9 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- * deve effettivamente spostarsi
-- * non si arriva da gestione passo del pellegrino
-- * se riesce a raggiungere la posizione con le corse a disposizione per come sono posizionate le morse attualmente
if ( dYDeltaI - dVDeltaF) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL and not EMC.PILGRIMSTEP and
if ( dYDeltaI - dVDeltaF) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and
( abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL or not EMC.VDELTA) and
not EMC.PILGRIMSTEP and
( dVDeltaF - dVDeltaI > MinV - dVPosI + MyMinY - dYPosI) then
table.insert( vCmd, { 0, 'Direct-V-Y'})
-- se l'altra morsa non era in presa, vado a pinzare il pezzo
@@ -1747,7 +1691,9 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- * deve effettivamente spostarsi
-- * non si arriva da gestione passo del pellegrino
-- * se riesce a raggiungere la posizione con le corse a disposizione per come sono posizionate le morse attualmente
elseif ( dYDeltaF - dVDeltaI) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL and not EMC.PILGRIMSTEP and
elseif ( dYDeltaF - dVDeltaI) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and
( abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL or not EMC.YDELTA) and
not EMC.PILGRIMSTEP and
( dYDeltaF - dYDeltaI < MaxY - dYPosI + MaxV - dVPosI) then
table.insert( vCmd, { 0, 'Direct-Y-V'})
-- se l'altra morsa non era in presa, vado a pinzare il pezzo
+190 -82
View File
@@ -10,10 +10,10 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.7f1'
PP_NVER = '2.7.6.1'
MIN_MACH_VER = '2.5k1'
MACH_NAME = string.match( EgtGetCurrMachineDir(), "[^\\]+$") -- si ricava il nome della macchina dal direttorio
PP_VER = '3.1c2'
PP_NVER = '3.1.3.2'
MIN_MACH_VER = '2.7j1'
MACH_NAME = EgtGetCurrMachineName()
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
@@ -32,7 +32,7 @@ end
EgtOutLog ( '** ' .. MACH_NAME..' '..PP_VER..' ** ( '..INFO_STD_PP.NAME..': '..INFO_STD_PP.VERSION..' - MinMach: '.. MIN_MACH_VER ..') **', 1)
-- Parametri macchina
NumericalControl = 'TPA' -- NUM o TPA
NumericalControl = 'TPA' -- NUM o TPA
MinX = -1350
MaxX = 0
MinZ = -1350
@@ -51,6 +51,7 @@ LoadT = 1454.2
UnloadT = -1700
MaxOpen = 305
MillOffs = 177.35
DistRotCenterBToTopC = 403 -- distanza tra il centro di rotazione del mandrino B e la mensola C
SawOffs = -242.68
SawBOffs = 0
SawCOffs = 0
@@ -61,7 +62,7 @@ AngTrBHOffs = 154.5
AngTrBHLen = 90
TurnerOffs = 200.0
DeltaTabY = -898.0
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
DimTabY = 400
DimTabX = 24000
LenToPress = 900
@@ -72,13 +73,25 @@ DefTcPos = 'T2'
SecondSupport = 0
SpecialBH = false
MaxUnloadLen = 0
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
NewTopC = true
SafeXRotAxes = -150
AggreBlockHaus = false
EstimationRapidMultiplier = 1
SecondToolChanger = false
EstimationRapidMultiplier = 1
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
MinJoinVV = 75
MinJoinSS = 100
MinJoinLS = 290
MinJoinSL = 100
MinJoinLL = 400
DistHeadToCabinUnload = nil -- distanza tra la paratia al carico e la testa macchina (Y) in valore assoluto
DistHeadToCabinLoad = nil -- distanza tra la paratia allo scarico e la testa macchina (Y) in valore assoluto
-- costanti dimensioni utensili
LONG_TOOL_MINLEN = 218.5
BIG_TOOL_DIAM = 300
-- leggo e aggiorno con parametri da BeamData
if BD then
@@ -134,19 +147,32 @@ if EgtExistsFile( sData) then
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD end
if Machine.Offsets.DEFTCPOS then DefTcPos = ( 'T' .. Machine.Offsets.DEFTCPOS) end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.MIN_JOIN_VV then MinJoinVV = Machine.Offsets.MIN_JOIN_VV end
if Machine.Offsets.MIN_JOIN_SS then MinJoinSS = Machine.Offsets.MIN_JOIN_SS end
if Machine.Offsets.MIN_JOIN_LS then MinJoinLS = Machine.Offsets.MIN_JOIN_LS end
if Machine.Offsets.MIN_JOIN_SL then MinJoinSL = Machine.Offsets.MIN_JOIN_SL end
if Machine.Offsets.MIN_JOIN_LL then MinJoinLL = Machine.Offsets.MIN_JOIN_LL end
if Machine.Offsets.MIN_JOIN_VV then MinJoinVV = EgtClamp( Machine.Offsets.MIN_JOIN_VV, 60, 150) end
if Machine.Offsets.MIN_JOIN_SS then MinJoinSS = EgtClamp( Machine.Offsets.MIN_JOIN_SS, 80, 275) end
if Machine.Offsets.MIN_JOIN_LS then MinJoinLS = EgtClamp( Machine.Offsets.MIN_JOIN_LS, 250, 400) end
if Machine.Offsets.MIN_JOIN_SL then MinJoinSL = EgtClamp( Machine.Offsets.MIN_JOIN_SL, 80, 400) end
if Machine.Offsets.MIN_JOIN_LL then MinJoinLL = EgtClamp( Machine.Offsets.MIN_JOIN_LL, 300, 600) end
if Machine.Offsets.MAXFEEDPINZE then MaxFeedPinze = Machine.Offsets.MAXFEEDPINZE end
if Machine.Offsets.MAXACC then MaxAcc = Machine.Offsets.MAXACC end
if Machine.Offsets.MINACC then MinAcc = Machine.Offsets.MINACC end
if Machine.Offsets.NEWTOPC then NewTopC = ( Machine.Offsets.NEWTOPC == 1) end
if Machine.Offsets.AGGRE_BH then AggreBlockHaus = ( Machine.Offsets.AGGRE_BH == 1) end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.SEC_TC then SecondToolChanger = ( Machine.Offsets.SEC_TC == 1) end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.MAX_HEIGHT_ROT_B_ABOVE then BeamHeightForFixRot = Machine.Offsets.MAX_HEIGHT_ROT_B_ABOVE end
if Machine.Offsets.COEFF_CLAMP_CHECK then ClampingCoeffMin = Machine.Offsets.COEFF_CLAMP_CHECK end
if Machine.Offsets.DIST_ROT_CENTER_B_TO_TOP_C then DistRotCenterBToTopC = EgtClamp( Machine.Offsets.DIST_ROT_CENTER_B_TO_TOP_C, 395, 410) end
if Machine.Offsets.LONG_TOOL_MINLEN then LONG_TOOL_MINLEN = EgtClamp( Machine.Offsets.LONG_TOOL_MINLEN, 216, 226.1) end
if Machine.Offsets.DIST_HEAD_TO_CABIN_UNLOAD then DistHeadToCabinUnload = Machine.Offsets.DIST_HEAD_TO_CABIN_UNLOAD end
if Machine.Offsets.DIST_HEAD_TO_CABIN_LOAD then DistHeadToCabinLoad = Machine.Offsets.DIST_HEAD_TO_CABIN_LOAD end
end
end
end
if SpecialBH then SecondSupport = 0 end
-- Aggiorno valori MinJoin
MinJoin = MinJoinSS
MinOther = abs( MinY) + abs( MaxV) + MinJoin
DeltaTol = 210
-- compongo i gruppi appartenenti alla base
local sBaseAux = {'BASE/SOLID', 'BASE/TC', 'BASE/SIGN', 'BASE/COLLISION'}
@@ -166,6 +192,19 @@ local BaseId = EmtBase {
Name = 'Base',
Geo='BASE/GEO',
Aux = sBaseAux}
-- Sposta la faccia interna alla cabina dei solidi di collisione se sono impostati nel TS3Data, valori positivi
if DistHeadToCabinLoad then
local nSide1Id = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), 'SIDE1')
local b3Collision = EgtGetBBox( nSide1Id, GDB_BB.STANDARD)
local vtMove = Vector3d( -abs( DistHeadToCabinLoad) - b3Collision:getMax()[1], 0, 0)
EgtSurfTmMoveFacet( nSide1Id, 3, vtMove, GDB_RT.GLOB)
end
if DistHeadToCabinUnload then
local nSide2Id = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), 'SIDE2')
local b3Collision = EgtGetBBox( nSide2Id, GDB_BB.STANDARD)
local vtMove = Vector3d( abs( DistHeadToCabinUnload) - b3Collision:getMin()[1], 0, 0)
EgtSurfTmMoveFacet( nSide2Id, 3, vtMove, GDB_RT.GLOB)
end
local XId = EmtAxis {
Name = 'X',
Parent = 'Base',
@@ -196,25 +235,29 @@ local CId = EmtAxis {
Stroke = {MinC, MaxC},
Home = 0,
Geo = 'C_AXIS/GEO',
Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION'}}
if NewTopC then
local vtMove = Vector3d( 65,0,0)
local SolidArmId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'ARM')
if EgtSurfTmMoveFacet then
EgtSurfTmMoveFacet( SolidArmId, 11, vtMove, GDB_RT.GLOB)
else
EgtSurfTmMoveVertex( SolidArmId, 23, EgtSurfTmGetVertex( SolidArmId, 23, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
EgtSurfTmMoveVertex( SolidArmId, 25, EgtSurfTmGetVertex( SolidArmId, 25, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
EgtSurfTmMoveVertex( SolidArmId, 35, EgtSurfTmGetVertex( SolidArmId, 35, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
EgtSurfTmMoveVertex( SolidArmId, 36, EgtSurfTmGetVertex( SolidArmId, 36, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
end
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtMove( CollTopId, vtMove, GDB_RT.GLOB)
EgtSetName( CollTopId, 'BOX')
else
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtSetName( CollTopId, 'BOX')
end
Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION', 'C_AXIS/COLLISION2'}}
-- Imposto i vettori di movimento separatamente se sono presenti le variabili di riferimento
local vtXMove = Vector3d( EgtIf( NewTopC, 65, 0), 0, 0)
-- si prende la minima distanza tra DistRotCenterBToTopC e LONG_TOOL_MINLEN + pivot (comunque distanza minima 403)
local dZMove = max( 403, min( ( MillOffs + LONG_TOOL_MINLEN + 5), DistRotCenterBToTopC)) - 400
local vtZMove = Vector3d( 0, 0, dZMove)
-- Muove le facce in X e Z del solido principale
local SolidArmId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'ARM')
EgtSurfTmMoveFacet( SolidArmId, 14, vtZMove, GDB_RT.GLOB)
EgtSurfTmMoveFacet( SolidArmId, 11, vtXMove, GDB_RT.GLOB)
-- Muove il solido di collisione denominato "TOP" in X e muove la sua faccia inferiore per portarla al pari del solido principale
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtMove( CollTopId, vtXMove, GDB_RT.GLOB)
EgtSurfTmMoveFacet( CollTopId, 4, vtZMove, GDB_RT.GLOB)
EgtSetName( CollTopId, 'BOX')
-- Imposta nel Frame di riferimento l'info "CollSkip"
local RefId = CollTopId + EgtGetInfo( CollTopId, 'Frame', 'i')
EgtSetInfo( RefId, 'CollSkip', 'C_TOP')
-- Muove il solido di collisione C_TOP
local CollUtTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION2'), 'C_TOP')
EgtMove( CollUtTopId, vtZMove, GDB_RT.GLOB)
EmtAxis {
Name = 'B',
Parent = 'C',
@@ -346,7 +389,7 @@ local PYId = EmtAxis {
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PY_AXIS/GEO',
Aux = {'PY_AXIS/SOLID', 'PY_AXIS/COLLISION'}}
Aux = {'PY_AXIS/SOLID', 'PY_AXIS/COLLISION', 'PY_AXIS/CLAMP_CHECK'}}
local VId = EmtAxis {
Name = 'V',
Parent = 'Base',
@@ -366,7 +409,7 @@ local PVId = EmtAxis {
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PV_AXIS/GEO',
Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION'}}
Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION', 'PV_AXIS/CLAMP_CHECK'}}
EmtAxis {
Name = 'T',
Parent = 'Base',
@@ -533,13 +576,6 @@ if SecondToolChanger then
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T28'}
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( 510.4, -113.2, -1160.8),
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101S'}
else
if not SpecialBH then
EmtTcPos {
@@ -549,14 +585,6 @@ else
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
else
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( 510.4, -113.2, -1160.8),
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101S'}
end
if SecondSupport == 1 then
-- supporto per punta
@@ -577,19 +605,6 @@ else
ADir = Z_AX(),
Geo = 'BASE/T111M'}
EgtSetInfo( TcpSsId, 'Mortiser', true)
elseif SecondSupport == 3 then
-- supporto per rinvio angolare
local TcpSsId = EmtTcPos {
Name = 'T91',
Parent = 'Base',
ExitNbr = 2,
Pos1 = Point3d( 710.4+150, -113.2, -329.8-170),
TDir1 = -X_AX(),
Pos2 = Point3d( 710.4-150, -113.2, -329.8-170),
TDir2 = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T91',
Aux = 'BASE/T91_HS'}
end
if SpecialBH then
EmtTcPos {
@@ -602,6 +617,38 @@ else
end
end
-- motosega in caso di magazzino 2 o SpecialBH
if SpecialBH or SecondToolChanger then
local TcpSsId = EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( 510.4, -113.2, -1160.8),
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101S'}
-- spostamento in caso di magazzino 2
if SecondToolChanger then
EgtMove( TcpSsId, Vector3d( 0, 0, 140), GDB_RT.GLOB)
end
end
if SecondSupport == 3 then
-- supporto per rinvio angolare
local TcpSsId = EmtTcPos {
Name = 'T91',
Parent = 'Base',
ExitNbr = 2,
Pos1 = Point3d( 710.4+150, -113.2, -329.8-170),
TDir1 = -X_AX(),
Pos2 = Point3d( 710.4-150, -113.2, -329.8-170),
TDir2 = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T91',
Aux = 'BASE/T91_HS'}
if SecondToolChanger then
EgtMove( TcpSsId, Vector3d( 0, 0, -900), GDB_RT.GLOB)
end
end
-- Aggiusto posizioni geometriche
local vtMove = Vector3d( 0, ( DeltaTabY + 913.16), ( DeltaTabZ + 830.037))
local vtMoveX = Vector3d( 0, 0, ( DeltaTabZ + 830.037))
@@ -613,10 +660,12 @@ EgtMove( EgtGetFirstNameInGroup( YId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( YId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( XId, 'SOLID'), vtMoveX, GDB_RT.GLOB)
-- Assegno identificativi alle spie delle morse
@@ -631,24 +680,33 @@ PVLightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PVId, 'SOLID') or GD
---------------------------------------------------------------------
function OnSetHead()
-- se testa lama
if EMC.HEAD == 'H2' then
EmtModifyAxisDirection( 'B', VectorFromRotated( X_AX(), Z_AX(), -SawCOffs))
EmtModifyAxisHome( 'C', 0)
-- se sega a catena
elseif EMC.HEAD == 'H3' then
EmtModifyAxisDirection( 'B', X_AX())
EmtModifyAxisHome( 'C', 180)
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
if not EMC.VER or EMC.VER < '2.5h2' then
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
if EMC.HEAD == 'H1' then
if EMC.TOTLEN and EMC.TOTLEN < LONG_TOOL_MINLEN then
EmtModifyAxisStroke( 'B', {MinB, MaxB})
else
EmtModifyAxisStroke( 'B', {-140, 140})
end
-- altrimenti
else
EmtModifyAxisDirection( 'B', X_AX())
EmtModifyAxisHome( 'C', 0)
EmtModifyAxisStroke( 'B', {MinB, MaxB})
if EMC.HEAD == 'H2' then
EmtModifyAxisDirection( 'B', VectorFromRotated( X_AX(), Z_AX(), -SawCOffs))
EmtModifyAxisHome( 'C', 0)
-- se sega a catena
elseif EMC.HEAD == 'H3' then
EmtModifyAxisDirection( 'B', X_AX())
EmtModifyAxisHome( 'C', 180)
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
if not EMC.VER or EMC.VER < '2.5h2' then
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
end
-- altrimenti
else
EmtModifyAxisDirection( 'B', X_AX())
EmtModifyAxisHome( 'C', 0)
end
end
end
@@ -710,13 +768,13 @@ function SetFloatPos( sHead, dPos)
-- recupero Id testa
local nHeadId = EgtGetHeadId( sHead)
if not nHeadId then return false end
-- se ci sono entit flottanti nel ToolHolder
-- se ci sono entita' flottanti nel ToolHolder
local nRefId = EgtGetFirstNameInGroup( nHeadId, '_T1')
local vtTool = EgtFR( nRefId, GDB_ID.ROOT):getVersZ()
local nObjId = EgtGetFirstGroupInGroup( EgtGetFirstNameInGroup( nHeadId, 'T1'))
local FloatEntities = EgtGetInfoInGroup( nObjId, 'Float')
if FloatEntities and #FloatEntities > 0 then
-- il porta-utensile flottante non pu comprimersi pi di 10mm
-- il porta-utensile flottante non puo' comprimersi piu' di 10mm
if dPos > 10 then
local sErr = 'Floating Ring compressed more than 10mm'
EmtSetLastError( 1222, sErr)
@@ -725,7 +783,7 @@ function SetFloatPos( sHead, dPos)
local dFloat = EgtGetInfo( FloatEntities[1], 'Float', 'd')
if abs( dPos - dFloat) > 10 * GEO.EPS_SMALL then
local vtMove = ( dPos - dFloat) * vtTool
-- sposto tutte le entit flottanti
-- sposto tutte le entita' flottanti
for i = 1, #FloatEntities do
EgtMove( FloatEntities[i], vtMove, GDB_RT.GLOB)
EgtSetInfo( FloatEntities[i], 'Float', dPos)
@@ -757,3 +815,53 @@ function OnResetMachine()
end
EgtSetStatus( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill') or GDB_ID.NULL, GDB_ST.OFF)
end
---------------------------------------------------------------------
function UpdateMinJoinDeltaTol( SB, HB, LB)
local L_SMALL = 800
local H_V = 90
local H_S = 200
local H_L = 400
local W_V = 90
local W_S = 150
local W_L = 250
local DELTA_TOL_S = 210
local DELTA_TOL_V = 110
local DELTA_TOL_L = 410
if SB <= W_V and HB <= H_V then
MinJoin = MinJoinVV
DeltaTol = DELTA_TOL_V
elseif LB <= L_SMALL then
MinJoin = MinJoinSS
DeltaTol = DELTA_TOL_S
else
local dMinJoinS
local dMinJoinL
if SB <= W_S then
dMinJoinS = MinJoinSS
dMinJoinL = MinJoinLS
elseif SB <= W_L then
local Coeff = ( SB - W_S) / ( W_L - W_S)
dMinJoinS = ( 1 - Coeff) * MinJoinSS + Coeff * MinJoinSL
dMinJoinL = ( 1 - Coeff) * MinJoinLS + Coeff * MinJoinLL
else
dMinJoinS = MinJoinSL
dMinJoinL = MinJoinLL
end
if HB <= H_S then
MinJoin = dMinJoinS
DeltaTol = DELTA_TOL_S
elseif HB <= H_L then
local Coeff = ( HB - H_S) / ( H_L - H_S)
MinJoin = ( 1 - Coeff) * dMinJoinS + Coeff * dMinJoinL
DeltaTol = ( 1 - Coeff) * DELTA_TOL_S + Coeff * DELTA_TOL_L
else
MinJoin = dMinJoinL
DeltaTol = DELTA_TOL_L
end
if SB < W_V then
DeltaTol = DELTA_TOL_V
end
end
MinOther = abs( MinY) + abs( MaxV) + MinJoin
end
Binary file not shown.
+27 -18
View File
@@ -20,9 +20,10 @@
2=d,OpenMinSafe,0
3=d,OpenOutRaw,0
4=l,MaxOptSize,0
5=b,AdjustFeed,1
[Mortising]
0=d,MaxElev,0
0=l,MaxElev,0
[Chiseling]
@@ -33,26 +34,34 @@
[GenMachining]
[SurfRoughing]
0=l,MaxElev,1000
0=l,MaxElev,0
1=b,PlaneZ,0
2=i,Order,[0=ByPlane;1=ByDepth]
[SurfFinishing]
0=b,SkipMaxDown,1
1=i,OptimalType,[0=ZigZag;2=SpiralIn;3=SpiralOut]
2=d,SplitAngle,45
3=d,AngleTol,5
[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
0=s,VtAuxDir,0,1,0
1=l,LinTol,0.01
2=l,MaxLen,10
3=i,ProjType,[0=MinDist;1=FixedDir;2=Guide]
4=i,PocketType,[0=ZigZag;2=SpiralIn;3=SpiralOut]
5=d,PocketAng,0
6=d,SideAng,90
7=d,LeadAng,0
8=l,Step,10
9=d,AngIni,-90
10=d,AngFin,90
11=l,LiTang,0
12=l,LiOrth,0
13=l,LiElev,0
14=l,LoTang,0
15=l,LoOrth,0
16=l,LoElev,0
17=b,DirFromGuide,0
18=b,SurfAvoid,0
19=d,SingConeAng,0.1
+3
View File
@@ -51,6 +51,9 @@ if IsTC2Active then
{Pos = "Pos19", TcPos = "T26", Head = "H1", Group = "G3"},
{Pos = "Pos20", TcPos = "T27", Head = "H1", Group = "G3"},
{Pos = "Pos21", TcPos = "T28", Head = "H1", Group = "G3"}}
if EgtGetHeadId( 'H5') then
table.insert( PositionTableTC2, {Pos = "Pos22", TcPos = "T91", Head = "H5", Group = "G2"})
end
EgtJoinTables( PositionTable, PositionTableTC2)
else
local SecSuppId = EgtGetTcPosId( 'T111')
Binary file not shown.
+18 -16
View File
@@ -6,36 +6,38 @@
[DRILL_STD]
0=th,TH,
1=d,STEP
2=s,DOUBLE
1=l,STEP
2=tl,DOUBLE
[SAW_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
1=l,STEP
2=l,SIDESTEP
3=b,LONGCUT
[SAW_FLAT]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
1=l,STEP
2=l,SIDESTEP
3=b,LONGCUT
[MILL_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
1=l,STEP
2=l,SIDESTEP
3=l,SIDEDEPTH
4=tl,DOUBLE
5=lr,TOOL_OVERHANG
[MILL_NOTIP]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
1=l,STEP
2=l,SIDESTEP
3=l,SIDEDEPTH
4=tl,DOUBLE
5=lr,TOOL_OVERHANG
[MORTISE_STD]
0=b,MORTISE
1=d,STEP
2=d,SIDESTEP
1=l,STEP
2=l,SIDESTEP
+52
View File
@@ -1,5 +1,57 @@
==== Common_FAST Update Log ====
Versione 3.1a2 (26/01/2026)
- (GEN) Nella G101 il parametro EE era sempre a 4 perchè la variabile veniva settata dopo. Ticket#2796
Versione 3.1a1 (08/01/2026)
- (SIM) Ottimizzata scrittura funzione ClampCheck post aggiornamento dll
- (SIM) Corretto problema della funzione OnSimulDispositionStart in caso di fase finale.
- (MLDE-SIM-GEN) Variabile DeltaTol deve essere spostata in MLDE
Versione 2.7l3 (22/12/2025)
- (SIM) Eliminata MinJoin, utilizzata al suo posto funzione già esistente UpdateMinJoin nell'mlde
- (SIM) Modificata formula calcolo Area minima
Versione 2.7l2 (18/12/2025)
- (SIM) Aggiunta funzione CheckClamping
Versione 2.7l1 (10/12/2025)
- (SIM) Aggiornata risoluzione VMillTol in funzione dello spessore lama
- (EST) Modifiche a calcolo stima tempi, da verificare.
- (SIM) Corretto movimento in simulazione che non rispettava movimento generato.
- (GEN) Con controllo NUM/NUM_PLUS nella scrittura della coordinata tolto il simbolo '='
- (SIM) Aggiunto controllo C in base a carico Dx o Sx durante il cambio utensile
Versione 2.7k1 (10/11/2025)
- (GEN) Corretto set variabili info utensile prima del movimento in home in caso di pezzi alti per NUM/NUM_PLUS.
Versione 2.7j2 (08/10/2025)
- (SIM-GEN) Quando si scarica motosega, si raddrizza prima l'asse B e poi si muove il C. Ora sempre e non solo se pezzo alto.
Versione 2.7j1 (06/10/2025)
- (SIM-GEN) Quando si scarica motosega, si raddrizza prima l'asse B e poi si muove il C.
- (MLDE-SIM) Controllo collisione tra utensile e TOP testa C. Serve CAM5 2.7j1
Versione 2.7i3 (23/09/2025)
- (MLDE-ALL) Spostate costanti dimensioni utensili in MLDE.
Versione 2.7i2 (17/09/2025)
- (EST) Stima tempi considerando accelerazioni
- (SIM) Prelievo e deposito motosega con gli angoli comunicati da Essetre
Versione 2.7i1 (08/09/2025)
- (SIM-GEN) Se lavorazione precedente e successiva con motosega e si cambiano assi rotanti, vado in parcheggio per ruotare. Ticket#1844
- (SIM-GEN) Per NEWCLAMPING, corretto un caso di riposizionemento allo scarico dove la pinza V poteva andare in posizione direttamente, ma cercava di fare passo pellegrino. Ticket#2572
Versione 2.7g1 (01/07/2025)
- (GEN) Aggiunti parametri FMAXPINZE, MAXACC, MINACC configurabili da TS3. Ticket#2052
Versione 2.7f3 (26/06/2025)
- (SIM-GEN) Aggiunti 10mm di sicurezza in caso di primo pinzaggio per stare oltre tolleranza riqualifica laser di 50mm. Ticket#2504
Versione 2.7f2 (19/06/2025)
- (GEN) Se in separazione il pezzo è andato più lontano della posizione standard, viene riletta. Ticket#2498
Versione 2.7f1 (18/06/2025)
- (SIM-GEN) Se utensile più lungo di 350mm, si va in posizione sicurezza come per la motosega. Ticket#2438
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_FAST', -- nome script PP standard
VERSION = '2.7f1', -- versione script
VERSION = '3.1a2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}