Compare commits

...

22 Commits

Author SHA1 Message Date
andrea.villa f8436a983a Merge branch 'develop' 2026-03-30 18:31:22 +02:00
andrea.villa d7e870cf1e Merge branch 'develop' of https://gitlab.steamware.net/egalware-machines/essetre/Common-FAST into develop 2026-03-30 18:29:35 +02:00
andrea.villa 82f0eab4ae - Corretti moviemnti con motosega. Ora si ruota la C con B sempre a zero, anche alla posizione X di sicurezza
- Cambio versione per rilascio a cliente
2026-03-30 18:29:31 +02:00
andrea.villa 04ab01cba8 Merge remote-tracking branch 'origin/main' into develop 2026-03-30 18:25:54 +02:00
daniele.nicoli 536352b802 Merge remote-tracking branch 'origin/main' into develop 2026-03-27 15:39:19 +01:00
andrea.villa 1484fb761b Merge remote-tracking branch 'origin/develop' 2026-03-27 15:22:05 +01:00
andrea.villa 660209bdea - In caso di motosega prelevata, si ruota in home.
- Cambio versione per rilascio a cliente
2026-03-27 15:14:21 +01:00
daniele.nicoli 3867f7b7ed Sistemati anche casi di prima lavorazione con motosega, ora in tutti i casi la motosega che si muove da Home spezza i movimenti B e C dai lineari. 2026-03-27 13:04:52 +01:00
daniele.nicoli bc2388dd43 - In generazione diversificato caso di cambio utensile da H1 a H3 (motosega) e caso di home con utensile H3 sia in lavorazione precedente che corrente.
- Motosega - Separata funzione di calcolo parcheggio asse A/C in mlde e mlpe
2026-03-26 15:25:10 +01:00
daniele.nicoli 86d9b2ec3d Allineata generazione a simulazione. Se con motosega girava asse rotante B rischiava collisione perchè li muoveva contemporaneamente X,B,C. 2026-03-25 17:02:10 +01:00
andrea.villa 2221224e9a Miglioramento del posizionamento pinze con FASTCLAMPING attivo 2026-03-20 10:48:11 +01:00
andrea.villa 0b7fefd0fd Merge remote-tracking branch 'origin/main' into develop 2026-03-20 10:47:01 +01:00
andrea.villa 51e2180b15 Nella G101 il parametro EE era sempre a 4 perchè la variabile veniva settata dopo 2026-01-26 15:54:43 +01:00
andrea.villa ee7087b003 Variabile DeltaTol deve essere spostata in MLDE 2026-01-08 12:14:51 +01:00
andrea.villa be993f47df Merge remote-tracking branch 'origin/develop' 2026-01-08 08:39:13 +01:00
andrea.villa 2522967e95 Commit per rilascio nuova versione macchina 2026-01-08 08:38:59 +01:00
daniele.nicoli 40e049dbb5 - Ottimizzata scrittura funzione ClampCheck post aggiornamento dll.
- Corretto problema della funzione OnSimulDispositionStart in caso di fase finale.
2026-01-07 11:39:56 +01:00
daniele.nicoli 270039d7e3 Merge remote-tracking branch 'origin/HEAD' into develop 2026-01-07 10:50:36 +01:00
andrea.villa 9241a53f97 Merge branch 'develop' 2025-12-22 10:06:21 +01:00
andrea.villa ff984c30b4 Cambio versione per rilascio a cliente 2025-12-22 10:05:59 +01:00
daniele.nicoli 001fd45f0c - Eliminata MinJoin, utilizzata al suo posto funzione già esistente UpdateMinJoin nell'mlde
- Modificata formula calcolo Area minima
2025-12-22 08:23:07 +01:00
daniele.nicoli 24e73d886d Merge remote-tracking branch 'origin/main' into develop 2025-12-22 08:20:26 +01:00
7 changed files with 209 additions and 178 deletions
+21 -12
View File
@@ -510,6 +510,7 @@ function OnPathStart()
-- salvo precedenti rotanti
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev()
@@ -609,6 +610,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
@@ -631,7 +635,7 @@ function OnRapid()
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
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sET ~= EMT.PREVET or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
@@ -641,17 +645,16 @@ function OnRapid()
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- 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.FLAG2 == 1 then
-- se ho ancora motosega, si setta già asse C, altrimenti asse C per andare in home
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
' B' .. EmtLenToString( 0, 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')
@@ -663,20 +666,26 @@ function OnRapid()
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
if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local 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)
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')
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
elseif 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
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
' 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
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
+22 -13
View File
@@ -558,6 +558,7 @@ function OnPathStart()
-- salvo precedenti rotanti
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev()
@@ -657,6 +658,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
@@ -680,7 +684,7 @@ function OnRapid()
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
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sET ~= EMT.PREVET or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
@@ -713,18 +717,17 @@ function OnRapid()
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- 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.FLAG2 == 1 then
-- se ho ancora motosega, si setta già asse C, altrimenti asse C per andare in home
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)
' B' .. EmtLenToString( 0, 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
@@ -735,20 +738,26 @@ function OnRapid()
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
if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local 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)
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')
-- ruoto in zona sicura prima di approcciare la lavorazione
elseif 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
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
' 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
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
+34 -12
View File
@@ -525,6 +525,9 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVS = EMT.S
-- salvo posizione
EMT.PREVTCPOS = AdjustTcPos( false)
end
---------------------------------------------------------------------
@@ -539,6 +542,7 @@ function OnPathStart()
-- salvo precedenti rotanti
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev()
@@ -659,9 +663,11 @@ function OnRapid()
end
end
local sTcPosReal = AdjustTcPos( false)
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
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sTcPosReal ~= EMT.PREVTCPOS or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
@@ -676,9 +682,9 @@ function OnRapid()
' 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')
' P4=' .. EgtNumToString( 0, 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)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
@@ -690,15 +696,33 @@ function OnRapid()
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
if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local 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')
if EMT.LOAD then
ParkLine( sOutPreMove)
else
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')
if EMT.LOAD then
ParkLine( sOutPreMove)
ParkLine( 'M101 P1=2')
ParkLine( 'M101 P1=3')
else
EmtOutput( sOutPreMove)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
end
elseif 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 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) ..
@@ -1754,8 +1778,6 @@ function AdjustTcPos( bLen3)
sPos = '0' .. sPos
end
end
-- salvo posizione
EMT.PREVTCPOS = sPos
return sPos
end
+56 -61
View File
@@ -467,7 +467,7 @@ function OnSimulDispositionStart()
end
nRawId = nNextRawId
end
EMT.LB = b3Bar:getDimX()
EMT.LB = b3Bar:getDimX()
end
-- Indicazione angolo rotazione pezzo
EMT.ROT = EgtGetInfo( EMT.DISPID, 'ROT', 'i') or 0
@@ -553,17 +553,15 @@ function OnSimulToolSelect( dPosA)
end
EgtSetCurrMachining( NextMchId)
-- recupero il valore dell'asse virtuale bloccato A
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
dPosA = tonumber( sVal:sub( 3))
dPosA = GetCurrChainSawingVirtualAxis()
else
-- imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end
-- imposto il valore di A
EgtSetAxisPos( 'A', dPosA)
if abs( dPosA) < 0.1 then
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
end
local dHomeC = GetChainSawCHomeFromVirtualAxis( dPosA)
EgtSetAxisPos( 'C', dHomeC)
EgtSetAxisPos( 'B', 0)
-- se aggregato per fresa tipo blockhaus
elseif EMT.HEAD == 'H7' then
@@ -608,12 +606,7 @@ function OnSimulToolDeselect()
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)
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, 270), MCH_SIM_STEP.COLLROT)
end
SimulMoveAxis( 'C', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico rinvio
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
@@ -656,12 +649,7 @@ function OnSimulToolDeselect()
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
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
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', 0, MCH_SIM_STEP.RAPROT)
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
end
@@ -721,8 +709,7 @@ function OnSimulMachiningStart()
-- se lavorazione attuale e precedente con sega a catena con angolo A diverso, devo scaricare e ricaricare
if EMT.HEAD == 'H3' and EMT.HEAD == EMT.PREVHEAD then
local dPrevA = EgtGetAxisPos( 'A')
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
local dPosA = tonumber( sVal:sub( 3))
local dPosA = GetCurrChainSawingVirtualAxis()
if abs( dPosA - dPrevA) > 1 then
OnSimulToolDeselect()
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.ON)
@@ -853,10 +840,15 @@ function OnSimulMoveStart()
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.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) and
if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' 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 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
if EMT.HEAD == 'H3' and bGoToHome then
SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT)
@@ -1099,16 +1091,17 @@ end
---------------------------------------------------------------------
function CheckClamping( sClampName)
nIndexClamp = EgtGetAxisId( sClampName)
local idClampPath = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nIndexClamp, 'CLAMP_CHECK') or GDB_ID.NULL)
local b3ClampingArea = EgtGetBBoxGlob( idClampPath or GDB_ID.NULL, GDB_BB.STANDARD)
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 idClampPath or not EMT.VMILL or not ClampingCoeffMin then
if not nClampPathId or not EMT.VMILL or not ClampingCoeffMin then
return
end
local function GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
local idCurveList = {}
local vCurveListId = {}
local vtIntersPlane
-- piano di interpolazione
if sIntersPlane == 'X' then
@@ -1127,57 +1120,49 @@ function CheckClamping( sClampName)
elseif sPosIntersPlane == 'MAX' then
ptPosIntersPlane = b3VMill:getMax() - dDepth * vtIntersPlane
end
local idLoop, nLoopCnt = EgtPlaneVolZmapInters( ptPosIntersPlane, vtIntersPlane, EMT.VMILL[i], CLAMP_CHECK_INTERS, GDB_RT.GLOB)
-- se c'è almeno una curva
if idLoop then
for j = 1, nLoopCnt do
local idLoopTemp = idLoop + j - 1
table.insert( idCurveList, idLoopTemp)
end
end
local nLoopId, nLoopCnt = EgtPlaneVolZmapInters( ptPosIntersPlane, vtIntersPlane, EMT.VMILL[i], CLAMP_CHECK_INTERS, GDB_RT.GLOB)
vCurveListId = EgtTableAdd( vCurveListId, nLoopId, nLoopCnt)
end
return idCurveList
return vCurveListId
end
local function CalculateIntersectionArea( sPosIntersPlane, sIntersPlane, dDepth)
-- test piano frontale
local idCurveList = GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
local vCurveListId = GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
-- si copia curva intersezione e curva pinza in gruppo di confronto
local idFlatSurf, nFlatSurfCnt = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, idCurveList)
local idClampSurf = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, idClampPath)
local nFlatSurfId, nFlatSurfCnt = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, vCurveListId)
local vFlatSurfId = EgtTableFill( nFlatSurfId, nFlatSurfCnt) or {}
local nClampSurfId = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, nClampPathId)
if idFlatSurf then
local dTotalArea = 0
local dTotalXLenght = 0
for k = 1, nFlatSurfCnt do
local idTempSurf = idFlatSurf + k - 1
EgtSurfFrIntersect( idTempSurf, idClampSurf)
if idTempSurf then
dTotalArea = dTotalArea + ceil( EgtSurfArea( idTempSurf) or 0)
local b3BoxIntersectionBox = EgtGetBBoxGlob( idTempSurf, GDB_BB.STANDARD)
if b3BoxIntersectionBox then
dTotalXLenght = dTotalXLenght + ceil( b3BoxIntersectionBox:getDimX()) -- somma lunghezze (x) delle aree pinzate
end
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
return dTotalArea, dTotalXLenght
end
return 0
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))
--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 + ( math.pow( MinJoin, 2) / 2)
dMinClamping = MinJoin * 116 + ( pow( MinJoin, 2) / 2)
if MinJoin > 280 then
dMinClamping = dMinClamping + ( math.pow( MinJoin - 280, 2))
dMinClamping = MinJoin * 116 + ( pow( 280, 2) / 2) + ( pow( MinJoin - 280, 2))
end
end
@@ -1213,13 +1198,13 @@ function CheckClamping( sClampName)
-- controllo altro lato solo se non sono già in errore
if not bWriteErrMessage then
-- controllo faccia posteriore
dArea = CalculateIntersectionArea( 'MAX', 'Y', 3)
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
bError = false
end
-- pinzaggio non fattibile, errore
if bError then
sErr = 'ERROR CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
@@ -1248,6 +1233,7 @@ 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)
@@ -1261,6 +1247,7 @@ 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)
@@ -1916,6 +1903,14 @@ function GetParkT()
end
end
---------------------------------------------------------------------
function GetCurrChainSawingVirtualAxis()
-- recupero il valore dell'asse virtuale bloccato A
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS) or 'A=0'
local dPosA = tonumber( sVal:sub( 3)) or 0
return dPosA
end
---------------------------------------------------------------------
function CalcDinamicaPinze_TPA( dH, dS, dL)
local MinTempoAcc = EMT.MINACC -- [ms] ~300
+55 -79
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
@@ -1594,9 +1536,12 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dTPosF = MaxV - dVDeltaF
end
-- se il pinzaggio deve essere invertito forzo entrata nei riposizionamenti
-- altrimenti posizioni iniziali e finali sono coincidenti dato che la pinza non in presa viene posizionata alla distanza minima a quella in presa
local bInvertClamping = not EMC.PILGRIMSTEP and EMC.YDELTA ~= EMC.YDELTANEXT and EMC.VDELTA ~= EMC.VDELTANEXT
-- verifico che le morse non sono in posizione
if abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL or abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL or
EMC.YDELTA ~= EMC.YDELTANEXT or EMC.VDELTA ~= EMC.VDELTANEXT then
if ( abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL or abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL or bInvertClamping) and
( EMC.YDELTA ~= EMC.YDELTANEXT or EMC.VDELTA ~= EMC.VDELTANEXT) then
if #vCmd == 0 then
table.insert( vCmd, { 0, 'Clamp repositioning'})
-- risalita testa a Zmax
@@ -1668,6 +1613,18 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- se spostamento verso il carico
elseif ( dVPosI + ( dVDeltaF - dVDeltaI)) > MaxV then
dBeamMove = dVPosI + ( dVDeltaF - dVDeltaI) - MaxV
-- se è FASTCLAMPING attivo, si suddivide il movimento
elseif BD.FASTCLAMPING then
-- se la trave si sposta dal carico verso lo scarico
if dTPosI - dTPosF > 0 then
dBeamMove = min( -( dTPosF - dTPosI), -( MyMinY - dYPosI), -( dVDeltaI - dVDeltaF))
else
dBeamMove = max( -( dTPosF - dTPosI), -( MyMinY - dYPosI))
end
dBeamMove = dBeamMove / 2
-- altrimenti la trave resta ferma e la pinza 1 va in presa (si limita lo scivolamento del pezzo)
else
;
end
-- se serve un grande spostamento e si sta pinzando poco. Y trascinatore pinza poco e V si sposta per prima per recuperare
@@ -1742,6 +1699,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- movimento terminato
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
EMC.YDELTA = EMC.YDELTANEXT
EMC.VDELTA = EMC.VDELTANEXT
-- SECONDO CASO -> SCAMBIO DIRETTO : Y IN POSIZIONE FINALE
-- Y può andare in posizione direttamente se :
@@ -1778,6 +1737,18 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- se spostamento verso il carico
elseif ( dYPosI + ( dYDeltaF - dYDeltaI)) > MaxY then
dBeamMove = -( dYPosI + ( dYDeltaF - dYDeltaI) - MaxY)
-- se è FASTCLAMPING attivo, si suddivide il movimento
elseif BD.FASTCLAMPING then
-- se la trave si sposta dal carico verso lo scarico
if dTPosI - dTPosF > 0 then
dBeamMove = max( ( dTPosF - dTPosI), ( MinV - dVPosI), ( dYDeltaI - dYDeltaF))
else
dBeamMove = min( ( dTPosF - dTPosI), ( MaxV - dVPosI))
end
dBeamMove = dBeamMove / 2
-- altrimenti la trave resta ferma e la pinza 1 va in presa (si limita lo scivolamento del pezzo)
else
;
end
-- se serve un grande spostamento e si sta pinzando poco. V trascinatore pinza poco e Y si sposta per prima per recuperare
@@ -1851,6 +1822,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
end
-- movimento terminato
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
EMC.YDELTA = EMC.YDELTANEXT
EMC.VDELTA = EMC.VDELTANEXT
-- TERZO CASO -> PASSO DEL PELLEGRINO
-- non è possibile fare scambio diretto.
@@ -1899,6 +1872,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dDeltaBeam = dTPosI - dTPosF
-- a questo punto entrambe le pinze sono in presa sul pezzo.
-- trave si muove dal carico allo scarico
-- Il trascinatore si decide in base alla direzione di movimento trave
-- trascino con morsa allo scarico. Obiettivo mandare Y in posizione per prima
if dDeltaBeam > 0 then
@@ -1941,18 +1915,20 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
-- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dYDeltaI - dYDeltaF) > dMaxMovePilgrimStepSingleClampY then
elseif abs( dYDeltaI - dYDeltaF) > dMaxMovePilgrimStepSingleClampV then
-- suddivido il movimento su entrambe le morse
local dTotMove = ( dYDeltaF - dYDeltaI) / 2
-- morsa Y arriva in posizione finale
dYDeltaI = dYDeltaF
dVPosA = MinV
dTPosA = dTPosI - dVPosI + MinV
dVPosA = MaxV - dTotMove
dTPosA = dTPosI - dVPosI + MaxV - dTotMove
dYPosA = dYDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
table.insert( vCmd, { 12, 0})
dYDeltaI = dYDeltaF
dTPosI = dTPosA
EMC.YDELTA = dYDeltaF
EMC.VDELTA = dVDeltaI
EMC.VDELTA = nil
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
-- non serve recuperare al massimo della corsa, suddivido movimento in due
@@ -1986,9 +1962,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
end
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
-- aggiorno nuova posizione della morsa allo scarico dopo riposizionamento
dVDeltaI = dVDeltaF
EMC.YDELTA = EMC.YDELTANEXT
EMC.VDELTA = EMC.VDELTANEXT
end
-- imposto i nuovi parametri di aggancio
@@ -2047,17 +2022,19 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
-- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dVDeltaI - dVDeltaF) > dMaxMovePilgrimStepSingleClampV then
-- aggiorno nuova posizione della morsa al carico dopo riposizionamento
dVDeltaI = dVDeltaF
dYPosA = MaxY
dTPosA = dTPosI + ( MaxY - dYPosI)
elseif abs( dVDeltaI - dVDeltaF) > dMaxMovePilgrimStepSingleClampY then
-- suddivido il movimento su entrambe le morse
local dTotMove = ( dVDeltaI - dVDeltaF) / 2
-- morsa V arriva in posizione finale
dYPosA = MinY + dTotMove
dTPosA = dTPosI + ( MinY - dYPosI) + dTotMove
dVPosA = dVDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
table.insert( vCmd, { 11, 0})
dVDeltaI = dVDeltaF
dTPosI = dTPosA
EMC.YDELTA = dYDeltaI
EMC.YDELTA = nil
EMC.VDELTA = dVDeltaF
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
@@ -2092,9 +2069,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
end
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
-- aggiorno nuova posizione della morsa al carico dopo riposizionamento
dYDeltaI = dYDeltaF
EMC.YDELTA = EMC.YDELTANEXT
EMC.VDELTA = EMC.VDELTANEXT
end
-- imposto i nuovi parametri di aggancio
+20
View File
@@ -1,5 +1,25 @@
==== Common_FAST Update Log ====
Versione 3.1c2 (30/03/2026)
- (SIM-GEN) Corretti moviemnti con motosega. Ora si ruota la C con B sempre a zero, anche alla posizione X di sicurezza. Ticket#2866
Versione 3.1c1 (27/03/2026)
- (SIM-GEN) FASTCLAMPING = true : si suddivide il movimento metà tirando e metà spingendo con altra pinza. Così si aumenta la velocità.
- FASTCLAMPING = false : una pinza resta ferma e si fa il movimento tutto con una pinza. Così si limita lo scivolamento del pezzo.
- (GEN) In caso di motosega prelevata, si ruota in home. Ticket#2866
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
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_FAST', -- nome script PP standard
VERSION = '2.7l2', -- versione script
VERSION = '3.1c2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}