Compare commits

..

10 Commits

Author SHA1 Message Date
luca.mazzoleni 6922eac78e - corretto Compile 2026-07-17 17:24:52 +02:00
luca.mazzoleni 4c80f37797 - in BeamDataNew ripristinari valori corretti GetBlockedAxis 2026-06-19 15:37:50 +02:00
luca.mazzoleni 5da4ccece9 Merge branch 'master' into develop 2026-06-11 18:30:18 +02:00
luca.mazzoleni 171187c172 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST 2026-06-11 18:30:12 +02:00
luca.mazzoleni 3413e43f62 - update BeamDataNew 2026-06-11 18:29:32 +02:00
daniele.nicoli d8cd917aaf Merge remote-tracking branch 'origin/master' into develop 2026-04-24 11:30:18 +02:00
andrea.villa ba63901305 Allineamento con common ver. 3.1d2 2026-04-22 16:29:17 +02:00
daniele.nicoli 507e75121f Merge branch 'master' into develop 2026-04-22 13:08:39 +02:00
andrea.villa 6d937b7e88 Allineamento a common ver. 3.1d1 2026-04-14 15:15:46 +02:00
andrea.villa 656982ca9c Allineamento con common ver. 3.1c2 2026-03-30 18:33:39 +02:00
10 changed files with 138 additions and 184 deletions
+1 -85
View File
@@ -175,87 +175,6 @@ local function GetSCC( vtToolDirection, vtEdgeDirection, vtNFace)
return nSCC return nSCC
end end
---------------------------------------------------------------------
-- sAxis può essere AB, C, Z; restituisce direzioni, profondità di estrusione e punti per il controllo precollisione
local function GetPreCollisionData( sAxis, vtC, vtHead)
local PreCollisionData = {}
-- Pivot uguale per tutti; non c'è aggregato quindi non dipende da SCC
-- riferimento vtPivot
-- - vtHead (Z): asse rotazione utensile, guarda il mandrino
-- - vtToolSCC (X): direzione asse C o aggregato
-- - vtEdge (Y): direzione lato, verso in base a X e Z
-- - punto di applicazione: naso mandrino o aggregato
PreCollisionData.vtMovePivot = Vector3d( 0, 0, -MldeParameters.SawOffs)
-- carro Z
if sAxis == 'Z' then
PreCollisionData.Directions = { vtDirectionX = X_AX(), vtDirectionY = Z_AX(), vtDirectionZ = -Y_AX()}
PreCollisionData.bSurfTmByRevolve = true
PreCollisionData.Points = {
Point3d( 0, 523, 0),
Point3d( 109.556, 523, 0),
Point3d( 109.556, 583, 0),
Point3d( 143.113, 583, 0),
Point3d( 143.113, 2533, 0),
Point3d( 0, 2533, 0)
}
-- motore (asse A o B)
elseif sAxis == 'AB' then
PreCollisionData.Directions = { vtDirectionX = vtC, vtDirectionY = -vtHead, vtDirectionZ = vtC ^ -vtHead}
PreCollisionData.dExtrusionDepth = 180
PreCollisionData.Points = {
Point3d( 100,-122,0),
Point3d( 100, -232.5, 0),
Point3d( -90, -232.5, 0),
Point3d( -90, 204.505, 0),
Point3d( -77.5, 216.55, 0),
Point3d( -89, 234.05, 0),
Point3d( -89, 242.55, 0),
Point3d( 89, 242.55, 0),
Point3d( 89, 234.05, 0),
Point3d( 77.5, 216.55, 0),
Point3d( 90, 204.505, 0),
Point3d( 90, 93, 0),
Point3d( 125, 93, 0),
Point3d( 125, -122, 0),
Point3d( 100, -122, 0)
}
-- asse C
elseif sAxis == 'C' then
PreCollisionData.Directions = { vtDirectionX = vtC, vtDirectionY = Z_AX(), vtDirectionZ = vtC ^ Z_AX()}
PreCollisionData.dExtrusionDepth = 200
PreCollisionData.Points = {
Point3d( 125, -92.752, 0),
Point3d( 203.5, -92.752, 0),
Point3d( 203.5, -100, 0),
Point3d( 400, -100, 0),
Point3d( 450, -50, 0),
Point3d( 450, 400, 0),
Point3d( 360, 490, 0),
Point3d( 170, 490, 0),
Point3d( 170, 523, 0),
Point3d( EgtIf( MldeParameters.NewTopC, -110, -175), 523, 0),
Point3d( EgtIf( MldeParameters.NewTopC, -110, -175), 400, 0),
Point3d( 230.858, 400, 0),
Point3d( 325, 305.858, 0),
Point3d( 325, 146, 0),
Point3d( 203.5, 146, 0),
Point3d( 203.5, 93, 0),
Point3d( 125, 93, 0),
Point3d( 125, -92.752, 0)
}
end
return PreCollisionData
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function GetSetupInfo( sHead) local function GetSetupInfo( sHead)
local SetupInfo = {} local SetupInfo = {}
@@ -265,21 +184,18 @@ local function GetSetupInfo( sHead)
SetupInfo.dCAxisEncumbrance = 180 SetupInfo.dCAxisEncumbrance = 180
SetupInfo.dCAxisSideEncumbrance = 200 SetupInfo.dCAxisSideEncumbrance = 200
SetupInfo.bToolOnAggregate = false SetupInfo.bToolOnAggregate = false
SetupInfo.vtRotationAxisC = EgtGetAxisDir( 'C')
SetupInfo.vtRotationAxisAB = EgtGetAxisDir( 'B')
-- testa 5 assi da sopra -- testa 5 assi da sopra
if sHead == 'H1' then if sHead == 'H1' then
SetupInfo.HeadType = { bTop = true, bBottom = false} SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {} SetupInfo.PreferredSide = {}
SetupInfo.dPivot = MldeParameters.MillOffs -- per uscita fresa, diverso da uscita lama SetupInfo.dPivot = MldeParameters.MillOffs -- per uscita fresa, diverso da uscita lama
SetupInfo.GetMinNz = function() return sin( -45) end SetupInfo.GetMinNz = function() return sin( -25) end
-- lama su testa 5 assi da sopra -- lama su testa 5 assi da sopra
elseif sHead == 'H2' then elseif sHead == 'H2' then
SetupInfo.HeadType = { bTop = true, bBottom = false} SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {} SetupInfo.PreferredSide = {}
SetupInfo.GetMinNz = function() return sin( -45) end SetupInfo.GetMinNz = function() return sin( -45) end
SetupInfo.GetPreCollisionData = GetPreCollisionData
SetupInfo.GetSCC = GetSCC SetupInfo.GetSCC = GetSCC
-- motosega -- motosega
elseif sHead == 'H3' then elseif sHead == 'H3' then
+27 -19
View File
@@ -510,6 +510,7 @@ function OnPathStart()
-- salvo precedenti rotanti -- salvo precedenti rotanti
EMT.R1pp = EMT.R1p EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev() EmtResetPrev()
@@ -634,7 +635,7 @@ function OnRapid()
local bGoToHome = false local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio -- 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 bGoToHome = true
end end
@@ -646,12 +647,14 @@ function OnRapid()
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then 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) .. local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) .. ' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove) EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. 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( sOutPreMove)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
@@ -663,24 +666,26 @@ function OnRapid()
end end
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- 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 ( 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 local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. 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' .. 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( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
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( sOutPreMove)
end end
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. 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( sOutPreMove)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
@@ -1343,7 +1348,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '0', '1') local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '0', '1')
local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp() local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
end end
@@ -1352,7 +1357,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '111', '112') local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '111', '112')
local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp() local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true EMT.U_STD = true
@@ -1512,10 +1517,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then elseif nVDelta > 0 then
EMT.YDELTA = nil EMT.YDELTA = nil
EMT.VDELTA = nVDelta EMT.VDELTA = nVDelta
end end
local sYLoad = ' Y'..EmtLenToString( LoadT) local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1' local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end end
end end
+28 -20
View File
@@ -558,6 +558,7 @@ function OnPathStart()
-- salvo precedenti rotanti -- salvo precedenti rotanti
EMT.R1pp = EMT.R1p EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev() EmtResetPrev()
@@ -683,7 +684,7 @@ function OnRapid()
local bGoToHome = false local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio -- 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 bGoToHome = true
end end
@@ -718,13 +719,15 @@ function OnRapid()
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then 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) .. local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) .. ' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove) EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. 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' .. EmtLenToString( 0, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
EmtOutput( sOutPreMove) ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
end end
@@ -735,24 +738,26 @@ function OnRapid()
end end
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- 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 ( 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 local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. 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' .. 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( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
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( sOutPreMove)
end end
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. 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( sOutPreMove)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
@@ -1430,7 +1435,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '0', '1') local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '0', '1')
local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp() local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
end end
@@ -1439,7 +1444,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '111', '112') local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '111', '112')
local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp() local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true EMT.U_STD = true
@@ -1599,10 +1604,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then elseif nVDelta > 0 then
EMT.YDELTA = nil EMT.YDELTA = nil
EMT.VDELTA = nVDelta EMT.VDELTA = nVDelta
end end
local sYLoad = ' Y'..EmtLenToString( LoadT) local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1' local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end end
end end
+40 -21
View File
@@ -525,6 +525,9 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD EMT.PREVHEAD = EMT.HEAD
EMT.PREVS = EMT.S EMT.PREVS = EMT.S
-- salvo posizione
EMT.PREVTCPOS = AdjustTcPos( false)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -539,6 +542,7 @@ function OnPathStart()
-- salvo precedenti rotanti -- salvo precedenti rotanti
EMT.R1pp = EMT.R1p EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev() EmtResetPrev()
@@ -659,9 +663,11 @@ function OnRapid()
end end
end end
local sTcPosReal = AdjustTcPos( false)
local bGoToHome = false local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio -- 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 bGoToHome = true
end end
@@ -676,9 +682,9 @@ function OnRapid()
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove) EmtOutput( sOutPreMove)
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. 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) .. ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. EgtNumToString( EMT.PREVTCPOS, EMT.DECMACRO) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove) EmtOutput( sOutPreMove)
EmtOutput( 'M101 P1=2') EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3') EmtOutput( 'M101 P1=3')
@@ -690,21 +696,33 @@ function OnRapid()
end end
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- 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
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
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) .. ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
if EMT.LOAD then
ParkLine( sOutPreMove)
else
EmtOutput( sOutPreMove) EmtOutput( sOutPreMove)
elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then 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) .. 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) .. ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
@@ -1608,10 +1626,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then elseif nVDelta > 0 then
EMT.YDELTA = nil EMT.YDELTA = nil
EMT.VDELTA = nVDelta EMT.VDELTA = nVDelta
end end
local sYLoad = ' P2='..EmtLenToString( LoadT) local sYLoad = ' P2='..EmtLenToString( LoadT)
local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp() local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' P4=110'
EMT.SE = ' P8=1'
end end
end end
@@ -1760,8 +1781,6 @@ function AdjustTcPos( bLen3)
sPos = '0' .. sPos sPos = '0' .. sPos
end end
end end
-- salvo posizione
EMT.PREVTCPOS = sPos
return sPos return sPos
end end
+11 -17
View File
@@ -560,9 +560,8 @@ function OnSimulToolSelect( dPosA)
end end
-- imposto il valore di A -- imposto il valore di A
EgtSetAxisPos( 'A', dPosA) EgtSetAxisPos( 'A', dPosA)
if abs( dPosA) < 0.1 then local dHomeC = GetChainSawCHomeFromVirtualAxis( dPosA)
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0)) EgtSetAxisPos( 'C', dHomeC)
end
EgtSetAxisPos( 'B', 0) EgtSetAxisPos( 'B', 0)
-- se aggregato per fresa tipo blockhaus -- se aggregato per fresa tipo blockhaus
elseif EMT.HEAD == 'H7' then elseif EMT.HEAD == 'H7' then
@@ -607,12 +606,7 @@ function OnSimulToolDeselect()
SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
-- raddrizzo asse B prima di ruotare il C -- raddrizzo asse B prima di ruotare il C
SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT) SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
local dPosA = EgtGetAxisPos( 'A') SimulMoveAxis( 'C', 0, MCH_SIM_STEP.COLLROT)
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( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico rinvio -- movimento scarico rinvio
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
@@ -655,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) 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 else
if EMT.NEXTHEAD == 'H3' then if EMT.NEXTHEAD == 'H3' then
local dPosA = EgtGetAxisPos( 'A') SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', 0, MCH_SIM_STEP.RAPROT)
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 else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
end end
@@ -851,10 +840,15 @@ function OnSimulMoveStart()
EMT.MCHFIRST = false EMT.MCHFIRST = false
local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo -- 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 ( 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 -- 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( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT) SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT) SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT)
+10 -10
View File
@@ -1572,8 +1572,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dMaxMovePilgrimStepSingleClampY = MaxY - dYPosI dMaxMovePilgrimStepSingleClampY = MaxY - dYPosI
dMaxMovePilgrimStepSingleClampV = - MinV + dVPosI dMaxMovePilgrimStepSingleClampV = - MinV + dVPosI
else else
dMaxMovePilgrimStepDoubleClamp = MaxY - MinY - MinV + MaxV dMaxMovePilgrimStepDoubleClamp = MaxY - MyMinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MinY dMaxMovePilgrimStepSingleClampY = MaxY - MyMinY
dMaxMovePilgrimStepSingleClampV = - MinV + MaxV dMaxMovePilgrimStepSingleClampV = - MinV + MaxV
end end
@@ -1863,8 +1863,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dTPosI = dTPosA dTPosI = dTPosA
dYPosI = dYPosA dYPosI = dYPosA
dVPosI = dVPosA dVPosI = dVPosA
dMaxMovePilgrimStepDoubleClamp = MaxY - MinY - MinV + MaxV dMaxMovePilgrimStepDoubleClamp = MaxY - MyMinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MinY dMaxMovePilgrimStepSingleClampY = MaxY - MyMinY
dMaxMovePilgrimStepSingleClampV = - MinV + MaxV dMaxMovePilgrimStepSingleClampV = - MinV + MaxV
end end
@@ -1917,10 +1917,10 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- recupero una corsa massima e l'altra solo di quello che serve -- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dYDeltaI - dYDeltaF) > dMaxMovePilgrimStepSingleClampV then elseif abs( dYDeltaI - dYDeltaF) > dMaxMovePilgrimStepSingleClampV then
-- suddivido il movimento su entrambe le morse -- suddivido il movimento su entrambe le morse
local dTotMove = ( dYDeltaF - dYDeltaI) / 2 local dTotMove = ( ( dYDeltaF + dVDeltaF) / 2 + ( dYDeltaI + dVDeltaI) / 2) / 2
-- morsa Y arriva in posizione finale -- morsa Y arriva in posizione finale
dVPosA = MaxV - dTotMove dVPosA = EgtClamp( MaxV - dTotMove, MaxV, MinV)
dTPosA = dTPosI - dVPosI + MaxV - dTotMove dTPosA = dTPosI - dVPosI + dVPosA
dYPosA = dYDeltaF + dTPosA dYPosA = dYDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA}) table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)}) table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
@@ -2024,10 +2024,10 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- recupero una corsa massima e l'altra solo di quello che serve -- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dVDeltaI - dVDeltaF) > dMaxMovePilgrimStepSingleClampY then elseif abs( dVDeltaI - dVDeltaF) > dMaxMovePilgrimStepSingleClampY then
-- suddivido il movimento su entrambe le morse -- suddivido il movimento su entrambe le morse
local dTotMove = ( dVDeltaI - dVDeltaF) / 2 local dTotMove = ( ( dYDeltaF + dVDeltaF) / 2 + ( dYDeltaI + dVDeltaI) / 2) / 2
-- morsa V arriva in posizione finale -- morsa V arriva in posizione finale
dYPosA = MinY + dTotMove dYPosA = EgtClamp( MinY + dTotMove, MinY, MaxY)
dTPosA = dTPosI + ( MinY - dYPosI) + dTotMove dTPosA = dTPosI - dYPosI + dYPosA
dVPosA = dVDeltaF + dTPosA dVPosA = dVDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA}) table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)}) table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
+5 -5
View File
@@ -25,11 +25,11 @@ REM copio i sorgenti nel percorso temporaneo per i compilati
ROBOCOPY . %fullPathSource%\bin\%machineName%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" ROBOCOPY . %fullPathSource%\bin\%machineName%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt"
REM copio i file compilati nel percorso temporaneo per i compilati REM copio i file compilati nel percorso temporaneo per i compilati
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.mlpe -s Common-FAST.mlpe \EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_FAST.mlpe -s Common_FAST.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.mlse -s Common-FAST.mlse \EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_FAST.mlse -s Common_FAST.mlse
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.NUM.mlpe -s Common-FAST.NUM.mlpe \EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_FAST.NUM.mlpe -s Common_FAST.NUM.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.NUM_PLUS.mlpe -s Common-FAST.NUM_PLUS.mlpe \EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_FAST.NUM_PLUS.mlpe -s Common_FAST.NUM_PLUS.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.TPA.mlpe -s Common-FAST.TPA.mlpe \EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_FAST.TPA.mlpe -s Common_FAST.TPA.mlpe
REM comprimo i file compilati in uno zip pronto per essere distribuito REM comprimo i file compilati in uno zip pronto per essere distribuito
tar.exe acvf %fullPathZip%\%machineName%.zip -C %fullPathSource%\bin\ %machineName%\*.* tar.exe acvf %fullPathZip%\%machineName%.zip -C %fullPathSource%\bin\ %machineName%\*.*
+4 -6
View File
@@ -24,8 +24,8 @@
require( 'EmtGenerator') require( 'EmtGenerator')
EgtEnableDebug( false) EgtEnableDebug( false)
PP_VER = '3.1c3' PP_VER = '3.1d2'
PP_NVER = '3.1.3.3' PP_NVER = '3.1.4.2'
MIN_MACH_VER = '2.7j1' MIN_MACH_VER = '2.7j1'
MACH_NAME = EgtGetCurrMachineName() MACH_NAME = EgtGetCurrMachineName()
@@ -70,8 +70,6 @@ SawOffs = -242.68
SawBOffs = 0 SawBOffs = 0
SawCOffs = 0 SawCOffs = 0
ChSawLen = 90.0 ChSawLen = 90.0
ParkCSawC = -90 -- Parcheggio sega a catena A90
ParkCSaw0C = 0 -- Parcheggio sega a catena A0
AngTr1Offs = 170 AngTr1Offs = 170
AngTr1Len = 150 AngTr1Len = 150
AngTrBHOffs = 154.5 AngTrBHOffs = 154.5
@@ -732,10 +730,10 @@ end
function GetChainSawCHomeFromVirtualAxis( dPosA) function GetChainSawCHomeFromVirtualAxis( dPosA)
-- se A=0 -> T111 -> HomeC = 0 -- se A=0 -> T111 -> HomeC = 0
if abs( dPosA) < 0.1 then if abs( dPosA) < 0.1 then
return EgtIf( BD.RIGHT_LOAD, 180, ParkCSaw0C) return EgtIf( BD.RIGHT_LOAD, -180, 0)
-- altrimenti A=90 -> T114 -> HomeC = -90 -- altrimenti A=90 -> T114 -> HomeC = -90
else else
return EgtIf( BD.RIGHT_LOAD, 90, ParkCSawC) return EgtIf( BD.RIGHT_LOAD, 90, 270)
end end
end end
+11
View File
@@ -1,5 +1,16 @@
==== Common_FAST Update Log ==== ==== Common_FAST Update Log ====
Versione 3.1d2 (22/04/2026)
- (GEN) Corretta generazione del PreparePostRotation (in tutti i CN) ora salva lo stato della pinza per lo spostamento successivo. Ticket#2933
- (SIM-GEN) Corretto pinzaggio in caso di passo del pellegrino con recupero completo di una sola pinza
Versione 3.1d1 (14/04/2026)
- (SIM-GEN) Aggiorna lo step totale del PilgrimStep e lo step Y con il valore di MyMinY, di modo che tenga conto del AGG_LOAD quando c'è. Ticket#2919
- (GEN) Per NUM, si lascia aperta la pinza di carico in caso di END2. TPA era già corretto. Ticket#2869
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) 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à. - (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. - FASTCLAMPING = false : una pinza resta ferma e si fa il movimento tutto con una pinza. Così si limita lo scivolamento del pezzo.
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = { local InfoCommon_STD_PP = {
NAME = 'Common_FAST', -- nome script PP standard NAME = 'Common_FAST', -- nome script PP standard
VERSION = '3.1c1', -- versione script VERSION = '3.1d2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
} }