Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44c99bb9c0 | |||
| a20def92b8 | |||
| d53ee46d01 | |||
| a4428dfc7e | |||
| dee48eaa84 | |||
| 0c98a3b342 | |||
| 4663adcc5c | |||
| dace2e7321 | |||
| c7c9d4be20 | |||
| 632c28c667 | |||
| feb0f12b61 | |||
| e6fb6380cb | |||
| f7c241163c | |||
| e42381e231 | |||
| 5636d35be5 | |||
| 562416f232 | |||
| 5a584431cb | |||
| 07a004f18d | |||
| c332eccef2 | |||
| cdcfb0b053 | |||
| 09efa2d462 | |||
| 6a0d00e10b | |||
| 4d773f5bfa | |||
| cb0c293fd7 | |||
| b4235bcc9b | |||
| c5e0c1124d | |||
| 52e9ec6286 | |||
| 36f393ab79 | |||
| ad8091e168 | |||
| d738334a57 | |||
| 3100e615f7 | |||
| a6d54ac40d | |||
| 3bf7c1587f | |||
| a71ba0ee9a | |||
| 7b2f9815d4 |
+85
-14
@@ -75,7 +75,8 @@ local BeamData = {
|
||||
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
|
||||
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda
|
||||
MIN_HEIGHT_ADDED_CUTS = 400, -- altezza minima pezzo per effettuare tagli orizzontali aggiuntivi in testa e coda
|
||||
GAIN_RECLAMPING = 1000 -- in caso di scarso pinzaggio, mm da recuperare con pinzaggio ulteriore prima di spostare
|
||||
GAIN_RECLAMPING = 1000, -- in caso di scarso pinzaggio, mm da recuperare con pinzaggio ulteriore prima di spostare
|
||||
STRATEGIES_SCRIPT = 'Essetre'
|
||||
}
|
||||
|
||||
-- Aggiornamento con dati da TechnoEssetre7
|
||||
@@ -105,6 +106,7 @@ if EgtExistsFile( sData) then
|
||||
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
|
||||
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
|
||||
@@ -184,36 +186,105 @@ local function GetChainSawInitAngs( vtN, vtO, nInd)
|
||||
end
|
||||
BeamData.GetChainSawInitAngs = GetChainSawInitAngs
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetMinNzTopHead( vtNFace)
|
||||
if vtNFace and abs( vtNFace:getY()) > 0.8659 then
|
||||
return -0.2499
|
||||
else
|
||||
return sin( -45)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetMinNzDownUp( b3Raw, vtNFace, vtToolDirection)
|
||||
if vtToolDirection and vtToolDirection:getZ() > 0.35 then
|
||||
-- N_HorAng < 15° or N_HorAng > 55°
|
||||
if vtNFace and ( abs( vtNFace:getY()) < 0.259 or abs( vtNFace:getY()) > 0.819) then
|
||||
return -0.708
|
||||
-- N_HorAng > 50°
|
||||
elseif vtNFace and abs( vtNFace:getY()) > 0.766 then
|
||||
return -0.383
|
||||
else
|
||||
return EgtIf( b3Raw:getDimZ() < BeamData.MIN_DIM_HBEAM, -0.609, -0.383)
|
||||
end
|
||||
elseif vtToolDirection and vtToolDirection:getZ() < - 0.01
|
||||
and ( vtNFace and ( abs( vtNFace:getY()) > 0.983))
|
||||
and ( b3Raw:getDimY() < 210) then
|
||||
|
||||
return -0.173
|
||||
else
|
||||
-- N_HorAng > 60°
|
||||
if vtNFace and ( abs( vtNFace:getY()) > 0.866) then
|
||||
return -0.708
|
||||
else
|
||||
if b3Raw:getDimZ() < 120 then
|
||||
return -0.708
|
||||
elseif b3Raw:getDimZ() < 200 then
|
||||
-- N_HorAng < 15° or N_HorAng > 55°
|
||||
if vtNFace and ( abs( vtNFace:getY()) < 0.259 or abs( vtNFace:getY()) > 0.819) then
|
||||
return -0.5
|
||||
else
|
||||
return -0.383
|
||||
end
|
||||
elseif b3Raw:getDimZ() < 300 then
|
||||
-- N_HorAng < 10°
|
||||
if vtNFace and ( abs( vtNFace:getY()) < 0.174) then
|
||||
return -0.5
|
||||
else
|
||||
return -0.259
|
||||
end
|
||||
elseif b3Raw:getDimZ() < BeamData.MIN_DIM_HBEAM then
|
||||
-- N_HorAng < 10°
|
||||
if vtNFace and ( abs( vtNFace:getY()) < 0.174) then
|
||||
return -0.342
|
||||
else
|
||||
return -0.259
|
||||
end
|
||||
else
|
||||
-- N_HorAng < 10°
|
||||
if vtNFace and ( abs( vtNFace:getY()) < 0.174) then
|
||||
return -0.383
|
||||
else
|
||||
return -0.174
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetSetupInfo( sHead)
|
||||
local SetupInfo = {}
|
||||
|
||||
-- dati comuni
|
||||
SetupInfo.bIsCSymmetric = false
|
||||
SetupInfo.bIsCSymmetrical = false
|
||||
SetupInfo.dCAxisEncumbrance = 180
|
||||
SetupInfo.dCAxisSideEncumbrance = 200
|
||||
SetupInfo.dPivot = 175
|
||||
SetupInfo.bToolOnAggregate = false
|
||||
|
||||
-- testa 5 assi da sopra
|
||||
if sHead == 'H1' then
|
||||
SetupInfo.bIsTopHead = true
|
||||
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
|
||||
SetupInfo.dMaxNegativeAngle = sin( -45)
|
||||
SetupInfo.HeadType = { bTop = true, bBottom = false}
|
||||
SetupInfo.PreferredSide = {}
|
||||
SetupInfo.GetMinNz = GetMinNzTopHead
|
||||
-- lama su testa 5 assi da sopra
|
||||
elseif sHead == 'H2' then
|
||||
SetupInfo.bIsTopHead = true
|
||||
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
|
||||
SetupInfo.dMaxNegativeAngle = sin( -45)
|
||||
SetupInfo.HeadType = { bTop = true, bBottom = false}
|
||||
SetupInfo.PreferredSide = {}
|
||||
SetupInfo.GetMinNz = GetMinNzTopHead
|
||||
SetupInfo.GetMinNzDownUp = GetMinNzDownUp
|
||||
-- motosega
|
||||
elseif sHead == 'H3' then
|
||||
SetupInfo.bIsTopHead = true
|
||||
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
|
||||
SetupInfo.dMaxNegativeAngle = 0
|
||||
SetupInfo.HeadType = { bTop = true, bBottom = false}
|
||||
SetupInfo.PreferredSide = {}
|
||||
SetupInfo.GetMinNz = function() return 0 end
|
||||
-- rinvio angolare 90° (considerato come fosse una testa da sotto)
|
||||
elseif sHead == 'H5' then
|
||||
SetupInfo.bToolOnAggregate = true
|
||||
SetupInfo.bIsBottomHead = true
|
||||
SetupInfo.bIsTopHead = not SetupInfo.bIsBottomHead
|
||||
SetupInfo.dMaxPositiveAngle = 0
|
||||
SetupInfo.HeadType = { bTop = false, bBottom = true}
|
||||
SetupInfo.PreferredSide = {}
|
||||
SetupInfo.GetMaxNz = function() return 0 end
|
||||
end
|
||||
|
||||
return SetupInfo
|
||||
|
||||
@@ -36,6 +36,7 @@ Name=Offsets
|
||||
31=l,OFFSETX_RINV_2,150,OFFSETX_RINV_2
|
||||
32=l,OFFSETZ_RINV_2,347,OFFSETZ_RINV_2
|
||||
33=l,MIN_JOIN_SS,100,MIN_JOIN_SS
|
||||
34=l,MIN_JOIN_VV,75,MIN_JOIN_VV
|
||||
|
||||
[2]
|
||||
Name=Trave
|
||||
|
||||
@@ -6,7 +6,7 @@ local INFO_STD_PP = require( 'Version')
|
||||
local BD = require( 'BeamData')
|
||||
|
||||
-- Variabili di modulo
|
||||
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
local CSP_INFO = INFO_STD_PP.NAME..'_'..NumericalControl..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
local MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
|
||||
local TEST_USE = false
|
||||
|
||||
@@ -53,6 +53,7 @@ function OnProgramStart()
|
||||
end
|
||||
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
|
||||
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n')
|
||||
EmtOutput( '(HEADER)')
|
||||
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
|
||||
if TEST_USE then
|
||||
EmtOutput( 'M28')
|
||||
@@ -104,6 +105,7 @@ function OnProgramEnd()
|
||||
EMT.FALL = nil
|
||||
EMT.RELOAD = nil
|
||||
EMT.RELOAD2 = nil
|
||||
EmtOutput( '(FOOTER)')
|
||||
-- Se modalità test, termino il programma
|
||||
if TEST_USE then
|
||||
EmtOutput( 'M02')
|
||||
@@ -250,9 +252,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
|
||||
@@ -630,7 +632,7 @@ function OnRapid()
|
||||
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 EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
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
|
||||
@@ -652,7 +654,8 @@ function OnRapid()
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot 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)) 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
|
||||
@@ -1538,7 +1541,7 @@ function MyAdjustLinearAxes()
|
||||
elseif EMT.HEAD ~= 'H3' then
|
||||
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
|
||||
local LenRef = MillOffs
|
||||
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
|
||||
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
|
||||
else
|
||||
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
|
||||
local LenRef = MillOffs
|
||||
|
||||
@@ -6,7 +6,7 @@ local INFO_STD_PP = require( 'Version')
|
||||
local BD = require( 'BeamData')
|
||||
|
||||
-- Variabili di modulo
|
||||
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
local CSP_INFO = INFO_STD_PP.NAME..'_'..NumericalControl..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
local MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
|
||||
local TEST_USE = false
|
||||
|
||||
@@ -53,6 +53,7 @@ function OnProgramStart()
|
||||
end
|
||||
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
|
||||
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n')
|
||||
EmtOutput( '(HEADER)')
|
||||
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
|
||||
if TEST_USE then
|
||||
EmtOutput( 'M28')
|
||||
@@ -108,6 +109,7 @@ function OnProgramEnd()
|
||||
EMT.FALL = nil
|
||||
EMT.RELOAD = nil
|
||||
EMT.RELOAD2 = nil
|
||||
EmtOutput( '(FOOTER)')
|
||||
-- Se modalità test, termino il programma
|
||||
if TEST_USE then
|
||||
EmtOutput( 'M02')
|
||||
@@ -269,9 +271,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
|
||||
@@ -493,7 +495,7 @@ function OnMachiningEnd()
|
||||
end
|
||||
for i = 1, #EMT.AUXSTR do
|
||||
local sOut = EMT.AUXSTR[i]
|
||||
if EMT.AUXTYPE == 'S' then
|
||||
if EMT.AUXTYPE == 'S' and sOut:find( 'G101 ') then
|
||||
sOut = sOut .. ' EH1'
|
||||
elseif EMT.AUXTYPE == 'U' and not EMT.CHY_ON and not sOut:find( 'ET') then
|
||||
sOut = sOut .. ' ET2'
|
||||
@@ -675,7 +677,7 @@ function OnRapid()
|
||||
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 EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
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
|
||||
@@ -720,7 +722,8 @@ function OnRapid()
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot 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)) 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
|
||||
@@ -1640,7 +1643,7 @@ function MyAdjustLinearAxes()
|
||||
if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then
|
||||
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
|
||||
local LenRef = MillOffs
|
||||
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
|
||||
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
|
||||
elseif EMT.HEAD == 'H3' then
|
||||
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
|
||||
local LenRef = MillOffs
|
||||
|
||||
+51
-45
@@ -6,7 +6,7 @@ local INFO_STD_PP = require( 'Version')
|
||||
local BD = require( 'BeamData')
|
||||
|
||||
-- Variabili di modulo
|
||||
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
local CSP_INFO = INFO_STD_PP.NAME..'_'..NumericalControl..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
|
||||
local MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
|
||||
local TEST_USE = false
|
||||
|
||||
@@ -21,13 +21,16 @@ function OnStart()
|
||||
EMT.USETO1 = false -- abilitazione uso origine tavola
|
||||
EMT.MODAL = true -- abilitazione emissione modale
|
||||
EMT.INCHES = false -- unità di misura mm/inches
|
||||
EMT.DECNUM = 5 -- numero di decimali dopo la virgola
|
||||
EMT.DECNUM = 4 -- numero di decimali dopo la virgola
|
||||
EMT.DECVERS = 6 -- numero di decimali dopo la virgola per versori
|
||||
EMT.DECRAD = 4 -- numero di decimali dopo la virgola per raggio
|
||||
EMT.DECMACRO = 3 -- numero di decimali dopo la virgola per macro
|
||||
EMT.NUM = false -- abilitazione numerazione linee
|
||||
--EMT.Nt = 'N' -- token per la numerazione di linea
|
||||
--EMT.LINENBR = 0 -- numero di linea
|
||||
--EMT.LINEINC = 1 -- incremento numerazione linee
|
||||
--EMT.Ft = 'F' -- token per feed
|
||||
--EMT.St = 'S' -- token per speed
|
||||
--EMT.Nt = 'N' -- token per la numerazione di linea
|
||||
--EMT.LINENBR = 0 -- numero di linea
|
||||
--EMT.LINEINC = 1 -- incremento numerazione linee
|
||||
--EMT.Ft = 'F' -- token per feed
|
||||
--EMT.St = 'S' -- token per speed
|
||||
EMT.FMAXPINZE = 154000 -- feed massima pinze
|
||||
end
|
||||
|
||||
@@ -51,6 +54,7 @@ function OnProgramStart()
|
||||
end
|
||||
ParkLine( sPrefixCommentLine..'('.. CSP_INFO..')')
|
||||
ParkLine( sPrefixCommentLine..'('.. MACHINE_INFO..')')
|
||||
ParkLine( '(HEADER)')
|
||||
|
||||
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
|
||||
if TEST_USE then
|
||||
@@ -108,6 +112,7 @@ function OnProgramEnd()
|
||||
EMT.FALL = nil
|
||||
EMT.RELOAD = nil
|
||||
EMT.RELOAD2 = nil
|
||||
EmtOutput( '(FOOTER)')
|
||||
-- Termino il programma
|
||||
EmtOutput( 'M02')
|
||||
end
|
||||
@@ -116,8 +121,8 @@ end
|
||||
function OnToolData()
|
||||
-- emissione dati utensili
|
||||
if EMT.HEAD == 'H1' then
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
|
||||
ParkLine( sOut)
|
||||
-- cerco posizione di attrezzaggio del primo utensile di lavorazione
|
||||
if EMT.TOOL == EMT.TOOL_1 and EMT.TLEN_1 < LONG_TOOL_MINLEN then
|
||||
@@ -125,14 +130,14 @@ function OnToolData()
|
||||
end
|
||||
-- emissione dati lama
|
||||
elseif EMT.HEAD == 'H2' then
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
|
||||
ParkLine( sOut)
|
||||
-- emissione dati sega a catena
|
||||
elseif EMT.HEAD == 'H3' then
|
||||
if EMT.TDIST and abs( EMT.TDIST) < 0.1 then EMT.TDIST = nil end
|
||||
local sData = ' P2=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), 3) .. ' P3=' .. EmtLenToString( EMT.TLEN, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), 3)
|
||||
local sData = ' P2=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), EMT.DECMACRO)
|
||||
if EMT.TCPOS == 'T101' then
|
||||
ParkLine( 'M992 P1=101' .. sData)
|
||||
ParkLine( 'M992 P1=102' .. sData)
|
||||
@@ -148,13 +153,13 @@ function OnToolData()
|
||||
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
|
||||
local nPos = EgtIf( EMT.HEAD == 'H5', 91, 93)
|
||||
if EMT.EXIT == 2 then nPos = nPos + 1 end
|
||||
local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
|
||||
local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
|
||||
ParkLine( sOut)
|
||||
-- emissione dati sega a catena
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
|
||||
ParkLine( sOut)
|
||||
-- altro non previsto
|
||||
else
|
||||
@@ -224,8 +229,8 @@ function OnDispositionEnd()
|
||||
|
||||
if IdTrave >= 0 then
|
||||
local sPrt = '( *** Part '.. EgtNumToString( IdTrave, 0) ..' ***)'
|
||||
local sOut = '( SN=' .. IdTrave .. ' LBarra=' .. EmtLenToString( LBarra, 3) .. ' L='..EmtLenToString( LTrave, 3) ..
|
||||
' H=' .. EmtLenToString( HTrave, 3) .. ' S=' .. EmtLenToString( STrave, 3) .. ' )'
|
||||
local sOut = '( SN=' .. IdTrave .. ' LBarra=' .. EmtLenToString( LBarra, EMT.DECMACRO) .. ' L='..EmtLenToString( LTrave, EMT.DECMACRO) ..
|
||||
' H=' .. EmtLenToString( HTrave, EMT.DECMACRO) .. ' S=' .. EmtLenToString( STrave, EMT.DECMACRO) .. ' )'
|
||||
EMT.PRODID = EgtGetInfo( BtlInfoId, 'PRODID', 'i') or 0
|
||||
EMT.PATTID = EgtGetInfo( BtlInfoId, 'PATTID', 'i') or 0
|
||||
EMT.CUTID = EgtGetInfo( EMT.IDT, 'CUTID', 'i') or 0
|
||||
@@ -268,9 +273,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
|
||||
@@ -655,10 +660,10 @@ function OnRapid()
|
||||
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 EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) ..
|
||||
' P4=' .. EgtNumToString( EMT.R2pp, 3) .. ' P5=' .. EgtNumToString( EMT.R1pp, 3) ..
|
||||
' P6=' .. EgtNumToString( EMT.PREVTCPOS, 3) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) ..
|
||||
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot 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)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
@@ -671,9 +676,10 @@ function OnRapid()
|
||||
end
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) ..
|
||||
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
|
||||
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) ..
|
||||
' 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')
|
||||
EmtOutput( sOutPreMove)
|
||||
@@ -687,8 +693,8 @@ function OnRapid()
|
||||
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
MyZPos = MyZHome
|
||||
end
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( MyZPos, 3) ..
|
||||
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZPos, 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
|
||||
@@ -738,7 +744,7 @@ function OnRapid()
|
||||
sV = EmtLenToString( ParkV)
|
||||
sB = '2'
|
||||
end
|
||||
sOut = 'M112 P1='..EmtLenToString( EMT.L1, 3)..' P3='..sA..' P4='..sB..' P5=0 P6='..sY..' P7='..sV..' P9='..GetFmaxClamp()
|
||||
sOut = 'M112 P1='..EmtLenToString( EMT.L1, EMT.DECMACRO)..' P3='..sA..' P4='..sB..' P5=0 P6='..sY..' P7='..sV..' P9='..GetFmaxClamp()
|
||||
ParkLine( sOut)
|
||||
EMT.LOAD = false
|
||||
-- emissione prime linee speciali e linee parcheggiate
|
||||
@@ -789,7 +795,7 @@ function OnRapid()
|
||||
sOut = 'M101 P1=3'
|
||||
EmtOutput( sOut)
|
||||
end
|
||||
sOut = 'M112 P1=' .. EmtLenToString( EMT.L1, 3) ..' P3='..sA..' P4='..sB..' P6='..sY..' P7='..sV..' P9=' .. GetFmaxClamp()
|
||||
sOut = 'M112 P1=' .. EmtLenToString( EMT.L1, EMT.DECMACRO) ..' P3='..sA..' P4='..sB..' P6='..sY..' P7='..sV..' P9=' .. GetFmaxClamp()
|
||||
EmtOutput( sOut)
|
||||
if not bHeadFirst then
|
||||
sOut = 'M101 P1=2'
|
||||
@@ -861,15 +867,15 @@ function OnRapid()
|
||||
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
|
||||
local dBAxis = 90
|
||||
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
|
||||
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) ..
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
|
||||
' P4=' .. EgtNumToString( dBAxis, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( dCAxis, EMT.DECMACRO) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
' P8=0' .. ' P9=0' .. ' P10=3'
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
|
||||
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) ..
|
||||
sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
|
||||
' P4=' .. EgtNumToString( dBAxis, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( dCAxis, EMT.DECMACRO) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
' P8=0' .. ' P9=0' .. ' P10=3'
|
||||
EmtOutput( sOut)
|
||||
@@ -886,8 +892,8 @@ function OnRapid()
|
||||
MyAdjustLinearAxes()
|
||||
EmtAdjustRotaryAxes()
|
||||
EmtResetPrev()
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
|
||||
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
|
||||
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, 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=3'
|
||||
EmtOutput( sOut)
|
||||
@@ -1007,7 +1013,7 @@ function OnArc()
|
||||
--local sCen = ' ' .. EMT.C1t .. EmtLenToString(EMT.C1,3) ..
|
||||
-- ' ' .. EMT.C2t .. EmtLenToString(EMT.C2,3)
|
||||
-- raggio
|
||||
local sRad = ' ' .. EMT.RRt .. EmtLenToString( EMT.RR, EMT.DECNUM)
|
||||
local sRad = ' ' .. EMT.RRt .. EmtLenToString( EMT.RR, EMT.DECRAD)
|
||||
-- aggiungo feed
|
||||
local sFeed = EmtGetFeed()
|
||||
-- tipo arco
|
||||
@@ -1639,7 +1645,7 @@ function MyAdjustLinearAxes()
|
||||
if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then
|
||||
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
|
||||
local LenRef = MillOffs
|
||||
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
|
||||
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
|
||||
elseif EMT.HEAD == 'H3' then
|
||||
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
|
||||
local LenRef = MillOffs
|
||||
@@ -1650,13 +1656,13 @@ function MyAdjustLinearAxes()
|
||||
local LenAux = MillOffs + AngTr1Offs
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
|
||||
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
|
||||
vtE = Vector3d( EMT.TDIR) * Len + vtAux * LenAux - Z_AX() * LenRef
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
local Len = EMT.TLEN + AngTrBHLen
|
||||
local LenAux = MillOffs + AngTrBHOffs
|
||||
local LenRef = MillOffs
|
||||
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
|
||||
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
|
||||
vtE = Vector3d( EMT.TDIR) * Len + vtAux * LenAux - Z_AX() * LenRef
|
||||
else
|
||||
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
|
||||
end
|
||||
@@ -1767,9 +1773,9 @@ function CalcInterpPlane()
|
||||
local vtY = EMT.IPLGLFR:getVersY()
|
||||
local vtZ = EMT.IPLGLFR:getVersZ()
|
||||
EMT.IPLGLSTR = ' X0 Y' .. EmtLenToString( xS, EMT.DECNUM) .. ' Z0' ..
|
||||
' A' .. EgtNumToString( - vtX:getY(), 6) .. ' B' .. EgtNumToString( vtX:getX(), 6) .. ' C' .. EgtNumToString( vtX:getZ(), 6) ..
|
||||
' I' .. EgtNumToString( - vtY:getY(), 6) .. ' J' .. EgtNumToString( vtY:getX(), 6) .. ' K' .. EgtNumToString( vtY:getZ(), 6) ..
|
||||
' P' .. EgtNumToString( - vtZ:getY(), 6) .. ' Q' .. EgtNumToString( vtZ:getX(), 6) .. ' R' .. EgtNumToString( vtZ:getZ(), 6)
|
||||
' A' .. EgtNumToString( - vtX:getY(), EMT.DECVERS) .. ' B' .. EgtNumToString( vtX:getX(), EMT.DECVERS) .. ' C' .. EgtNumToString( vtX:getZ(), EMT.DECVERS) ..
|
||||
' I' .. EgtNumToString( - vtY:getY(), EMT.DECVERS) .. ' J' .. EgtNumToString( vtY:getX(), EMT.DECVERS) .. ' K' .. EgtNumToString( vtY:getZ(), EMT.DECVERS) ..
|
||||
' P' .. EgtNumToString( - vtZ:getY(), EMT.DECVERS) .. ' Q' .. EgtNumToString( vtZ:getX(), EMT.DECVERS) .. ' R' .. EgtNumToString( vtZ:getZ(), EMT.DECVERS)
|
||||
EMT.IPLGL = true
|
||||
end
|
||||
|
||||
|
||||
+24
-22
@@ -522,20 +522,21 @@ function OnSimulToolSelect( dPosA)
|
||||
elseif EMT.HEAD == 'H7' then
|
||||
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
|
||||
end
|
||||
-- se TC 1
|
||||
if GetTCSet( EMT.TCPOS) == 1 then
|
||||
EgtSetAxisPos( 'B', 90)
|
||||
else
|
||||
if EMT.HEAD ~= 'H3' then
|
||||
EgtSetAxisPos( 'B', -90)
|
||||
end
|
||||
end
|
||||
-- se punta lunga
|
||||
if EMT.TOTLEN > LONG_TOOL_MINLEN then
|
||||
-- se su cambio utensile T111
|
||||
if EMT.TCPOS == 'T111' then
|
||||
EgtSetAxisPos( 'B', 0)
|
||||
end
|
||||
end
|
||||
-- se TC 1
|
||||
if GetTCSet( EMT.TCPOS) == 1 then
|
||||
EgtSetAxisPos( 'B', 90)
|
||||
else
|
||||
EgtSetAxisPos( 'B', -90)
|
||||
end
|
||||
-- breve pausa
|
||||
end -- breve pausa
|
||||
EgtPause( 100)
|
||||
EgtOutText( '')
|
||||
EMT.TOOL_1 = EMT.TOOL
|
||||
@@ -788,7 +789,7 @@ 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.HB > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
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
|
||||
SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
@@ -969,7 +970,7 @@ function ExecRemoveScraps()
|
||||
for i = nPart, 1, -1 do
|
||||
if i ~= nPartMax then
|
||||
local b3Vmill = EgtVolZmapGetPartBBoxGlob( vMillId, i - 1, GDB_BB.STANDARD)
|
||||
if b3Vmill:getDimX() < 1200 then
|
||||
if b3Vmill:getDimX() < 1250 then
|
||||
EgtRemoveVolZmapPart( vMillId, i - 1)
|
||||
end
|
||||
end
|
||||
@@ -1190,18 +1191,19 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- *** ESTIMATION T&L ***
|
||||
---------------------------------------------------------------------
|
||||
local RAPID_X_FEED = 75000 -- mm/min
|
||||
local RAPID_Y_FEED = 100000 -- mm/min
|
||||
local RAPID_Z_FEED = 50000 -- mm/min
|
||||
local RAPID_C_FEED = 15000 -- deg/min
|
||||
local RAPID_B_FEED = 15000 -- deg/min
|
||||
local RAPID_MIN_T = 0.1 -- s
|
||||
local LOAD_T = 2 -- s
|
||||
local CHAR_ONE_MOVE_T = 1 -- s
|
||||
local ROTATION_T = 40 -- s
|
||||
local SPLIT_T = 6 -- s
|
||||
local UNLOAD_T = 4 -- s
|
||||
local FALL_T = 2 -- s
|
||||
local ESTIMATION_RAPID_COEFF = EstimationRapidMultiplier or 1
|
||||
local RAPID_X_FEED = 75000 / 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_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
|
||||
local ROTATION_T = 40 * ESTIMATION_RAPID_COEFF -- s
|
||||
local SPLIT_T = 6 * ESTIMATION_RAPID_COEFF -- s
|
||||
local UNLOAD_T = 4 * ESTIMATION_RAPID_COEFF -- s
|
||||
local FALL_T = 2 * ESTIMATION_RAPID_COEFF -- s
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnEstimStart()
|
||||
|
||||
+1
-2
@@ -76,6 +76,7 @@ SurfFinishing=1
|
||||
[5AxMilling]
|
||||
5AxScript1=5AxProject
|
||||
5AxScript2=5AxPocketProject
|
||||
5AxScript3=5AxCylProject
|
||||
|
||||
[Machining]
|
||||
InitScript=InitMach.lua
|
||||
@@ -97,8 +98,6 @@ H5=6603
|
||||
H6=6603
|
||||
; Angular transmission
|
||||
H7=6617
|
||||
; Floating Aggregate
|
||||
H8=6619
|
||||
|
||||
[SetUp]
|
||||
Default=Standard
|
||||
|
||||
+8
-6
@@ -22,12 +22,12 @@
|
||||
-------------------------------------
|
||||
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( true)
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '2.7a1'
|
||||
PP_NVER = '2.7.1.1'
|
||||
PP_VER = '2.7f2'
|
||||
PP_NVER = '2.7.6.2'
|
||||
MIN_MACH_VER = '2.5k1'
|
||||
MACH_NAME = 'Essetre-FAST'
|
||||
MACH_NAME = string.match( EgtGetCurrMachineDir(), "[^\\]+$") -- si ricava il nome della macchina dal direttorio
|
||||
|
||||
-- Carico i dati globali
|
||||
local sMachDir = EgtGetCurrMachineDir()
|
||||
@@ -89,8 +89,9 @@ MaxUnloadLen = 0
|
||||
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
|
||||
NewTopC = true
|
||||
SafeXRotAxes = 150
|
||||
AggreBlockHaus = true
|
||||
SecondToolChanger = true
|
||||
AggreBlockHaus = false
|
||||
SecondToolChanger = false
|
||||
EstimationRapidMultiplier = 1
|
||||
|
||||
-- leggo e aggiorno con parametri da BeamData
|
||||
if BD then
|
||||
@@ -160,6 +161,7 @@ if EgtExistsFile( sData) then
|
||||
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.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
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+24
-14
@@ -7,27 +7,34 @@
|
||||
[Sawing]
|
||||
|
||||
[Milling]
|
||||
0=d,MaxElev,0
|
||||
0=l,MaxElev,0
|
||||
1=d,OutRaw,0
|
||||
2=d,SideElev,0
|
||||
2=l,SideElev,0
|
||||
3=d,TrimExt,0
|
||||
4=sr,VtFaceUse,0,0,0
|
||||
4=s,VtFaceUse,0,0,0
|
||||
5=s,EdgesFaceUse,0
|
||||
|
||||
[Pocketing]
|
||||
0=d,MaxElev,0
|
||||
0=l,MaxElev,0
|
||||
1=b,Open,0
|
||||
2=d,OpenMinSave,0
|
||||
2=d,OpenMinSafe,0
|
||||
3=d,OpenOutRaw,0
|
||||
4=d,MaxOptSize,0
|
||||
4=l,MaxOptSize,0
|
||||
|
||||
[Mortising]
|
||||
0=d,MaxElev,0
|
||||
|
||||
[Chiseling]
|
||||
|
||||
[SawRoughing]
|
||||
|
||||
[SawFinishing]
|
||||
|
||||
[GenMachining]
|
||||
|
||||
[SurfRoughing]
|
||||
0=l,MaxElev,1000
|
||||
1=b,PlaneZ,0
|
||||
|
||||
[SurfFinishing]
|
||||
0=b,SkipMaxDown,1
|
||||
@@ -38,11 +45,14 @@
|
||||
2=s,Type,ZigZag
|
||||
3=d,SideAng,90
|
||||
4=l,Step,10
|
||||
5=l,OffsProj,0
|
||||
6=l,LiTang,0
|
||||
7=l,LiOrth,0
|
||||
8=l,LiElev,0
|
||||
9=l,LoTang,0
|
||||
10=l,LoOrth,0
|
||||
11=l,LoElev,0
|
||||
12=b,DirFromGuide,1
|
||||
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
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ local INVALIDPOS = ""
|
||||
local POS = "Pos"
|
||||
|
||||
-- Geom Set
|
||||
local GS = {{"H1", "H7", "H8"}}
|
||||
local GS = {{"H1", "H7"}}
|
||||
|
||||
-- Configurazione posizioni
|
||||
local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
|
||||
|
||||
+33
-1
@@ -1,6 +1,38 @@
|
||||
==== Common_FAST Update Log ====
|
||||
|
||||
Versione 2.7a1 (07/01/2024)
|
||||
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
|
||||
|
||||
Versione 2.7e1 (26/05/2025)
|
||||
- (SIM) Aumentata dimensione massima per la quale si rimuove uno scarto dal VMILL. Ticket#1438
|
||||
- (SIM) In simulazione, corretto selezione utensile per punte lunghe. Ticket#2438
|
||||
|
||||
Versione 2.7d1 (14/04/2025)
|
||||
- (GEN) Corretto movimento iniziale in caso di motosega, si controlla solo se non è il carico. Ticket#2385
|
||||
|
||||
Versione 2.7c1 (26/03/2025)
|
||||
- (GEN) All'inizio del codice ISO si scrive nel commento anche il controllo numerico utilizzato per la generazione.
|
||||
- (GEN) Aggiunta commenti HEADER e FOOTER per comunicazione con linea o altre macchine, da parte di Essetre.
|
||||
- (GEN) In MyAdjustLinearAxes si utilizza TDIR per calcolarsi gli offset per compatibilità con lavorazioni a 5 assi.
|
||||
|
||||
Versione 2.7b1 (20/02/2025)
|
||||
- (SIM-GEN) Aggiunta possibilità di settare HCING/TCING nelle note di ogni singola lavorazione per gestire parte non pinzabile del pezzo. Funziona solo con nuovo pinzaggio.
|
||||
- (SIM-GEN) Piccola correzione calcolo posizione carrelli con nuova strategia di pinzaggio.
|
||||
- (SIM-GEN) Caricamento libreria EmtGenMachining. Si fa una require con PCALL perchè la libreria è opzionale e non è detto che ci sia. In installazione CAM5 dalla 2.7a1
|
||||
- (GEN) Per controllo TPA, modifica al numero di decimali.
|
||||
- (SIM) Aggiunta gestione per ToolHolder flottante
|
||||
|
||||
Versione 2.7a3 (08/01/2025)
|
||||
- (GEN) Dopo separazione, in NUM_PLUS, si srive EH1 solo se macro G101, perchè altrimenti non è prevista. Ticket#2239
|
||||
|
||||
Versione 2.7a2 (08/01/2025)
|
||||
- (MLDE-SIM) Aggiunta gestione FACOLTATIVA 'EstimationRapidMultiplier' in MLDE per regolare il tempo stimato. Se non presente in MLDE, default 1.
|
||||
- (SIM) Aggiunta gestione qualità VMILL da impostazioni macchina
|
||||
|
||||
Versione 2.7a1 (07/01/2025)
|
||||
- (MLDE-SIM-GEN) Nuovo aggregato 90° (H7) per fresa tipo BlockHaus. Ticket#2142
|
||||
- (SIM-GEN) Aumentati limiti massimi di pinzaggio minimo
|
||||
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
-- Version.lua by EgalWare s.r.l. 2024/12/23
|
||||
-- Version.lua by EgalWare s.r.l. 2024/03/28
|
||||
-- Gestione della versione dei file comuni post-processori macchine FAST e FASTrl di Essetre
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_FAST', -- nome script PP standard
|
||||
VERSION = '2.7a1', -- versione script
|
||||
VERSION = '2.7f2', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user