Compare commits

...

2 Commits

Author SHA1 Message Date
andrea.villa 1615f6c9f7 Aggiornamento BeamData per visualizzazione in simulazione 2024-02-23 12:26:15 +01:00
andrea.villa ad065c8df4 - Rimossa chiamata funzione EgtGetSourceDir
- Prima versione post common
- Allineamento con common ver. 2.6c3
2024-02-23 11:59:54 +01:00
9 changed files with 1853 additions and 92 deletions
+4 -2
View File
@@ -7,7 +7,7 @@ EgtOutLog( ' FAST-BeamData started', 1)
-- Tabella per definizione modulo
local BeamData = {
RIGHT_LOAD = true, -- flag carico da destra
SIMUL_VIEW_DIR = 3, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
SIMUL_VIEW_DIR = 1, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
GO_FAST = 0, -- flag abilitazione modalità veloce (0=no, 1=carrelli, 2=anche cambio utensili)
ROT90 = false, -- flag abilitazione rotazione 90 gradi
MIN_WIDTH = 40, -- larghezza minima del grezzo
@@ -54,6 +54,7 @@ local BeamData = {
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
RAW_OFFSET = 2000, -- spostamento grezzo rimanente dopo split
VICE_MINH = 110, -- altezza minima della morsa
VICE_MAXH = 370, -- altezza massima zona pinzaggio orizzontale
OFFSET_DRILL_TENON = 0, -- offset fori su tenoni verso base degli stessi (0=non fare)
USER_HOLE_DIAM = 0, -- diametro foro per L20
MAX_TOOL_LEN_FOR_HOR_MACH = 311, -- massima lunghezza utensile per poter fare forature (fresature) oltre i 10 gradi dalla verticale
@@ -68,11 +69,12 @@ local BeamData = {
MAX_LEN_BH_FROM_BOTTOM = 195, -- massima lunghezza lavorabile da un lato di block haus da sotto
MAX_DIST_BH_FROM_BOTTOM = 395, -- massima distanza tra naso mandrino e sopra della trave senza collisione
BH_MACHINE = false, -- flag che indica la tipologia di macchina configurata BlockHaus
ANG_TRASM = false -- presenza rinvio angolare per lavorazioni da sotto
}
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fastrl.data"
local sData = EgtGetSourceDir().."\\Ts3Data.lua"
local sData = EgtGetCurrMachineDir().."\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
@@ -1,21 +1,12 @@
-- Processore macchina Essetre-FAST by EgalTech s.r.l. 2024/01/17
-- Processore standard macchine FAST by EgalWare s.r.l. 2024/02/23
-- Con controllo numerico NUM
-- 2021/04/23 DS ver 2.3d3 Se non c'è BtlInfo cerco il gruppo di lavoro corrente.
-- 2021/07/21 DS ver 2.3g5 Modifiche varie da TPA.
-- 2021/07/23 DS ver 2.3g6 Corretta gestione LOAD90.
-- 2021/07/23 DS ver 2.3g7 Completamento allineamento con TPA.
-- 2021/07/27 DS ver 2.3g8 Corretto carico senza taglio di testa per salto G79 N9.
-- 2021/07/27 DS ver 2.3g9 Nome in testa a CN (%NNNN.0) da PATTID di BtlInfo.
-- 2021/07/29 DS ver 2.3g10 Con testa H2 (lama) non si emettono assi rotanti nel corso della lavorazione.
-- 2021/08/03 DS ver 2.3h2 Nei commenti le parentesi sono sostituite con il carattere -.
-- 2021/08/05 DS ver 2.3h4 Nel rapido se non bHeadFirst ritardo anche l'emissione di G101 a dopo G112.
-- 2021/11/17 DS ver 2.3k1 Correzioni di Nicola su rotazioni verificate da GCT.
-- 2021/12/28 DS ver 2.3l2 Correzioni a G101 (ora sempre con EE ed ET).
-- 2021/12/29 DS ver 2.3l3 Altre correzioni a G101 (se già in alto EE3 e sempre ES).
-- 2023/04/19 DS ver 2.5d1 Al carico dopo rotazione su linea con EA75 messo EB110 invece di 112 (come FAST).
-- carico librerie
local INFO_STD_PP = require( 'Version')
-- Variabili di modulo
local MLE_INFO = 'Essetre-FASTrl.NUM.mlpe ver.'..PP_VER..' by EgalTech s.r.l.'
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
local MACHINE_INFO = 'PP_VER ver.'..PP_VER
local TEST_USE = false
---------------------------------------------------------------------
@@ -55,7 +46,8 @@ function OnProgramStart()
else
EmtOutput( '(Program Start)')
end
EmtOutput( '('.. MLE_INFO..')\n')
EmtOutput( '('.. CSP_INFO..')')
EmtOutput( '('.. MACHINE_INFO..')\n')
-- 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')
File diff suppressed because it is too large Load Diff
@@ -1,9 +1,12 @@
-- Processore macchina Essetre-FASTrl by EgalTech s.r.l. 2024/01/17
-- Processore standard macchine FAST by EgalWare s.r.l. 2024/02/23
-- Con controllo numerico TPA
-- 2023/04/19 DS ver 2.5d1 Al carico dopo rotazione su linea con P4=75 messo P5=110 invece di 112 (come FAST).
-- carico librerie
local INFO_STD_PP = require( 'Version')
-- Variabili di modulo
local MLE_INFO = 'Essetre-FASTrl.TPA.mlpe ver.'..PP_VER..' by EgalTech s.r.l.'
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
local MACHINE_INFO = 'PP_VER ver.'..PP_VER
local TEST_USE = false
---------------------------------------------------------------------
@@ -41,7 +44,9 @@ function OnProgramStart()
else
ParkLine( '(Program Start)')
end
ParkLine( '('.. MLE_INFO..')')
ParkLine( '('.. CSP_INFO..')')
ParkLine( '('.. MACHINE_INFO..')')
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then
ParkLine( 'M199')
@@ -134,6 +139,13 @@ function OnToolData()
ParkLine( 'M992 P1=113' .. sData)
ParkLine( 'M992 P1=114' .. sData)
end
-- emissione dati rinvio
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)
ParkLine( sOut)
-- altro non previsto
else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
@@ -160,6 +172,9 @@ function OnDispositionStart()
' P4='..EmtLenToString( MinV, 2)..' P5='..EmtLenToString( MaxV, 2)..' P6='..EmtLenToString( MillOffs, 2)..
' P7='..EmtLenToString( SawOffs, 2)..' P8='..EmtLenToString( ParkY, 2)..' P9='..EmtLenToString( ParkV, 2)..
' P10='..EmtLenToString( TurnerOffs, 2)..' P11='..EmtLenToString( -DeltaTabY, 2)..' P12='..EmtLenToString( DeltaTabZ - MillOffs, 2)
if SecondSupport >= 3 then
sOut = sOut ..' P13='..EmtLenToString( AngTr1Len, 2) ..' P14='..EmtLenToString( AngTr1Offs + MillOffs,2)
end
ParkLine( sOut)
-- carico barra
EMT.LOAD = true
@@ -405,9 +420,13 @@ function OnMachiningStart()
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam( MCH_MP.TYPE)
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES)
-- la speed della lama va moltiplicata per 6
-- sistemazione speed (la speed della lama va moltiplicata per 6)
if EMT.HEAD == 'H2' then
EMT.S = EMT.S * 6
elseif EMT.HEAD == 'H5' and EMT.EXIT == 1 then
EMT.S = -EMT.S
elseif EMT.HEAD == 'H6' and EMT.EXIT == 1 then
EMT.S = -EMT.S
end
-- determino subito se taglio di separazione di pezzo a caduta
EMT.PREFALLCUT = nil
@@ -1504,6 +1523,12 @@ function MyAdjustLinearAxes()
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H5' then
local Len = EMT.TLEN + AngTr1Len
local LenAux = MillOffs + AngTr1Offs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end
@@ -1536,6 +1561,10 @@ function AdjustToolKinematic()
return '01'
elseif EMT.HEAD == 'H2' then
return '02'
elseif EMT.HEAD == 'H5' then
return EgtIf( EMT.EXIT == 1, '11', '12')
elseif EMT.HEAD == 'H6' then
return EgtIf( EMT.EXIT == 1, '21', '22')
else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end
@@ -1544,7 +1573,15 @@ end
---------------------------------------------------------------------
function AdjustTcPos( bLen3)
local sPos = EMT.TCPOS:gsub( 'T', '')
if sPos == '101' and EMT.HEAD == 'H3' then
if sPos == '91' then
if EMT.EXIT == 2 then
sPos = '92'
end
elseif sPos == '93' then
if EMT.EXIT == 2 then
sPos = '94'
end
elseif sPos == '101' and EMT.HEAD == 'H3' then
if abs( EMT.R3 - 0) < 0.1 then
sPos = '101'
elseif abs( EMT.R3 - 270) < 0.1 then
+70 -28
View File
@@ -1,29 +1,25 @@
-- Processore macchina Essetre-FAST by EgalTech s.r.l. 2022/01/23
-- Funzioni generiche indipendenti dal controllo
-- 2020/09/22 DS ver 2.2i4 Distanza di sicurezza per collisioni da 2 a 4mm (inoltre allontanata flangia lama e aggiunto cilindro asse Z)
-- 2020/09/26 DS ver 2.2i5 Gestione cambio presa sega a catena tra due lavorazioni successive.
-- 2020/10/06 DS ver 2.2j1 Punta lunga da togliere basata su sua lunhezza totale e non più su T111.
-- 2021/01/08 DS ver 2.3a1 Gestione utensile di default da posizione e non da nome.
-- 2021/01/24 DS ver 2.3a2 Correzione deposito sega a catena con ripresa della stessa per angola A diverso.
-- 2021/01/31 DS ver 2.3a3 Altre correzioni per sega a catena.
-- 2021/06/28 DS ver 2.3f5 Correzioni per scarico punte lunghe con pezzi alti.
-- 2021/07/12 DS ver 2.3g2 Correzioni per verifica collisioni durante scarico utensili.
-- Processore macchina Essetre-FAST by EgalWare s.r.l. 2024/02/23
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
-- carico librerie
local BD = require( 'BeamData')
LONG_TOOL_MINLEN = 221
BIG_TOOL_DIAM = 300
---------------------------------------------------------------------
-- *** GENERATION ***
---------------------------------------------------------------------
local sBaseDir = EgtGetSourceDir()
local sBaseDir = EgtGetCurrMachineDir()
if NumericalControl == 'NUM' then
dofile( sBaseDir .. 'Essetre-FASTrl.NUM.mlpe')
dofile( sBaseDir .. '\\Common-FAST.NUM.mlpe')
elseif NumericalControl == 'TPA' then
dofile( sBaseDir .. 'Essetre-FASTrl.TPA.mlpe')
dofile( sBaseDir .. '\\Common-FAST.TPA.mlpe')
elseif NumericalControl == 'NUM_PLUS' then
dofile( sBaseDir .. '\\Common-FAST.NUM_PLUS.mlpe')
else
EmtSetLastError( 1201, 'Numerical Control error : unkwnown type')
end
@@ -33,6 +29,45 @@ end
---------------------------------------------------------------------
local COLL_SAFE_DIST = 3
---------------------------------------------------------------------
function OnSimulInit()
-- se macchina con carico destro, imposto offset direzioni di vista standard
if BD.RIGHT_LOAD then
local nOrigViewOffs = EgtGetViewOrizzOffsStep()
local dOrigViewAngV, dOrigViewAngH = EgtGetGenericView()
if nOrigViewOffs ~= 2 then
EgtSetViewOrizzOffsStep( 2)
if dOrigViewAngV < 0.1 then
EgtSetView( SCE_VD.TOP, false)
elseif dOrigViewAngV > 179.9 then
EgtSetView( SCE_VD.BOTTOM, false)
else
local dViewAngH = dOrigViewAngH + EgtIf( dOrigViewAngH > 180, 2 * 90, 0)
EgtSetGenericView( dOrigViewAngV, dViewAngH, false)
end
end
end
end
---------------------------------------------------------------------
function OnSimulExit()
-- se macchina con carico destro, annullo offset direzioni di vista standard
if BD.RIGHT_LOAD then
local nOrigViewOffs = EgtGetViewOrizzOffsStep()
local dOrigViewAngV, dOrigViewAngH = EgtGetGenericView()
if nOrigViewOffs == 2 then
EgtSetViewOrizzOffsStep( 0)
if dOrigViewAngV < 0.1 then
EgtSetView( SCE_VD.TOP, false)
elseif dOrigViewAngV > 179.9 then
EgtSetView( SCE_VD.BOTTOM, false)
else
EgtSetGenericView( dOrigViewAngV, dOrigViewAngH - 2 * 90, false)
end
end
end
end
---------------------------------------------------------------------
function OnSimulStart()
-- controllo versione programma
@@ -69,6 +104,7 @@ function OnSimulStart()
AddToCollisionCheck( 'Z', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'B', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'H5', 'COLLISION', EMT.COLLOBJ)
AddToolToCollisionCheck( 'H2', 1, EMT.COLLOBJ)
AddToolHolderToCollisionCheck( 'H2', 1, EMT.COLLOBJ)
DumpCollisionCheck( EMT.COLLOBJ, 'Collision Objects :', 4)
@@ -467,7 +503,7 @@ function OnSimulToolSelect( dPosA)
-- imposto il valore di A
EgtSetAxisPos( 'A', dPosA)
if abs( dPosA) < 0.1 then
EgtSetAxisPos( 'C', 180)
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
end
EgtSetAxisPos( 'B', 0)
end
@@ -492,8 +528,10 @@ end
function OnSimulToolDeselect()
-- se prossimo utensile non definito, è disposizione ed esco
if EMT.NEXTTOOL == '' then return end
-- se sega a catena o punta lunga, devo cambiare
if EMT.HEAD == 'H3' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then
-- se cambia uscita su rinvio non devo fare alcunché
if EMT.HEAD == 'H5' and EMT.NEXTHEAD == 'H5' then return end
-- se sega a catena o rinvio o punta lunga o utensile di grosso diametro, devo cambiare
if EMT.HEAD == 'H3' or EMT.HEAD == 'H5' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then
EgtOutText( 'Tool change in progress...')
local RapSimStep = 4 * EMT.SIMSTEP
local RapSimRotStep = RapSimStep / 10
@@ -502,11 +540,15 @@ function OnSimulToolDeselect()
if EMT.HEAD == 'H3' then
local dPosA = EgtGetAxisPos( 'A')
if abs( dPosA) < 0.1 then
SimulMoveAxes( 'B', 0, CollSimRotStep, 'C', 180, CollSimRotStep)
SimulMoveAxes( 'B', 0, CollSimRotStep, 'C', EgtIf( BD.RIGHT_LOAD, 180, 0), CollSimRotStep)
else
SimulMoveAxes( 'B', 0, CollSimRotStep, 'C', 90, CollSimRotStep)
SimulMoveAxes( 'B', 0, CollSimRotStep, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), CollSimRotStep)
end
SimulMoveAxis( 'X', 0, RapSimStep)
-- movimento scarico rinvio
elseif EMT.HEAD == 'H5' then
SimulMoveAxes( 'B', 0, CollSimRotStep, 'C', -90, CollSimRotStep)
SimulMoveAxis( 'X', 0, RapSimStep)
-- movimento scarico punta lunga su T111
elseif EMT.TOTLEN > LONG_TOOL_MINLEN then
-- se su cambio utensile T111
@@ -522,7 +564,7 @@ function OnSimulToolDeselect()
else
local dPosB = EgtGetAxisPos( 'B')
local dNewB = EgtIf( dPosB < 0, -90, 90)
SimulMoveAxes( 'B', dNewB, CollSimRotStep, 'C', 180, CollSimRotStep)
SimulMoveAxes( 'B', dNewB, CollSimRotStep, 'C', EgtIf( BD.RIGHT_LOAD, 180, 0), CollSimRotStep)
SimulMoveAxis( 'X', 0, RapSimStep)
end
-- breve pausa
@@ -531,10 +573,10 @@ function OnSimulToolDeselect()
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
ShowToolInTcPos( EMT.TCPOS_1, true)
-- movimento per carico utensile
if EMT.NEXTHEAD ~= 'H3' then
SimulMoveAxes( 'B', 90, RapSimRotStep, 'C', 90, RapSimRotStep)
if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' then
SimulMoveAxes( 'B', 90, RapSimRotStep, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), RapSimRotStep)
else
SimulMoveAxes( 'B', 0, RapSimRotStep, 'C', 90, RapSimRotStep)
SimulMoveAxes( 'B', 0, RapSimRotStep, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), RapSimRotStep)
end
-- se segue lama, carico utensile di default
if EMT.NEXTHEAD == 'H2' then
@@ -554,19 +596,19 @@ function OnSimulToolDeselect()
local RapSimRotStep = RapSimStep / 10
local CollSimRotStep = min( RapSimRotStep, 10)
-- simulo movimento
SimulMoveAxes( 'B', 90, CollSimRotStep, 'C', 90, CollSimRotStep)
SimulMoveAxes( 'B', 90, CollSimRotStep, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), CollSimRotStep)
SimulMoveAxis( 'X', 0, RapSimStep)
-- breve pausa
EgtPause( 100)
ShowToolInTcPos( EMT.TCPOS_1, true)
-- se segue sega a catena
if EMT.NEXTHEAD == 'H3' then
if EMT.NEXTHEAD == 'H3' or EMT.NEXTHEAD == 'H5' then
-- se non lama, nascondo l'utensile corrente
if EMT.HEAD ~= 'H2' then
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.OFF)
end
-- eseguo movimento opportuno
SimulMoveAxes( 'B', 0, RapSimRotStep, 'C', 90, RapSimRotStep)
SimulMoveAxes( 'B', 0, RapSimRotStep, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), RapSimRotStep)
-- se altrimenti lama su cambio utensile
elseif EMT.NEXTHEAD == 'H1' and SpecialBH and EMT.NEXTTCPOS == 'T111' then
-- se non lama, nascondo l'utensile corrente
@@ -861,14 +903,14 @@ function ExecUnloading()
-- li sposto per lasciare spazio al nuovo pezzo
local nId = EgtGetFirstInGroup( nVmGrpId)
while nId do
EgtMove( nId, Vector3d( 0, ( EMT.SB + 50.0), 0), GDB_RT.GLOB)
EgtMove( nId, Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.SB + 50.0), -( EMT.SB + 50.0)), 0), GDB_RT.GLOB)
nId = EgtGetNext( nId)
end
-- creo un nuovo layer e vi inserisco il nuovo pezzo
local nLayId = EgtGroup( nVmGrpId, EgtGetGlobFrame( vMillId))
EgtRelocate( vMillId, nLayId)
local vtMove = Vector3d( 0, 450, 0)
if EMT.FALL then vtMove = Vector3d( -500, 0, 750) end
local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 450, -450), 0)
if EMT.FALL then vtMove = Vector3d( -500, 0, EgtIf( BD.RIGHT_LOAD, 750, -750)) end
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
EgtSetLevel( vMillId, GDB_LV.USER)
-- aggiungo gli spigoli
+31 -29
View File
@@ -1,36 +1,29 @@
-- Special Operations macchina Essetre-FAST by EgalTech s.r.l. 2023/01/10
-- 2020/05/15 DS ver.2.2e1 Correzione a SpecAdjustCarrC3 per bFixedDelta.
-- 2020/05/16 DS ver 2.2e2 Aggiunta gestione rotazione 90deg.
-- 2020/05/21 DS ver 2.2e3 Aggiunto a SpecAdjustCarrC3 parametro bFixedPos (per lavorazioni Split e Cut precedute da Pre).
-- 2020/05/26 DS ver 2.2e4 Nuova gestione dei pezzi a caduta.
-- 2020/05/27 DS ver 2.2e5 Corretto blocco pinza V su presplit e precut.
-- 2020/05/28 DS ver 2.2e7 Correzione per mancanza EMC.HOVM allo scarico.
-- 2020/06/18 DS ver 2.2f3 Aumento ingombro fresatura opposta a cerrello per evitare extracorsa.
-- 2020/07/02 DS ver 2.2g1 Correzione quota di presa al carico per casi senza tagli in testa e lavorazioni solo in coda.
-- 2020/09/03 DS ver 2.2i1 Correzione in Load dopo rotazione deve tener conto dell'ingombro delle lavorazioni in coda.
-- 2020/09/09 DS ver 2.2i2 Nel calcolo pinzaggi ora si tiene conto anche della larghezza della sezione della barra.
-- 2020/09/25 DS ver 2.2i5 Migliorato calcolo ingombro lama con testa opposta al carrello.
-- 2020/09/29 DS ver 2.2i6 Migliorato calcolo ingombro fresa su tagli longitudinali di fianco.
-- 2020/10/13 DS ver 2.2j2 Aggiunta gestione sezione molto piccola (Very Small) per presa minima. Corretta gestione ingombri con fori a 30 deg.
-- 2020/12/09 DS ver 2.2l1 Migliorato calcolo ingombro con lama verticale inclinata di +/-45deg rispetto a X.
-- 2021/01/24 DS ver 2.3a2 Migliorato controllo assi rotanti definiti con sega a catena per SpecialCalcMachiningEncumbrance.
-- 2021/02/02 DS ver 2.3b1 Migliorato calcolo ingombro tagli di lama quasi verticale angolata.
-- 2021/02/17 DS ver 2.3b2 Corretta B3Ys-xs1 per accentrare V e T bisogna sottrarre dExtraY che è negativo e non sommare.
-- 2021/04/02 DS ver 2.3d1 Corretto calcolo ingombro con lama per non andare in extracorsa con le pinze quando lavorazione vicino a Y0.
-- 2021/06/01 DS ver 2.3f1 Aggiunta segnalazione pezzo scaricato a caduta.
-- 2021/06/25 DS ver 2.3f5 Corretta segnalazione tipo di scarico del pezzo.
-- 2023/01/10 SM ver 2.5a1 Affinato calcolo ingombro lavorazione con fresa quasi verticale.
-- Special Operations macchina Essetre-FAST by EgalWare s.r.l. 2024/02/23
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
-- Carico i dati globali
local sBaseDir = EgtGetSourceDir()
local BD = dofile( sBaseDir .. 'Beam\\BeamData.lua')
-- carico librerie
local BD = require( 'BeamData')
EgtOutLog ( '** Essetre-FAST '..PP_VER..' **', 1)
---------------------- OnSpecialMoveZup -----------------------------
---------------------------------------------------------------------
function OnSpecialMoveZup()
--EgtOutLog( 'OnSpecialMoveZup : ' .. EMC.HEAD .. '.' .. tostring( EMC.EXIT))
-- Inizializzazioni
EMC.ERR = 0
EMC.MODIF = false
-- se sega a catena
if EMC.HEAD == 'H3' then
end
end
---------- OnSpecialApplyDisposition & OnPostApplyMachining ---------
----------------------- Costanti ------------------------------------
local DELTA_TOL_V = 110
local DELTA_TOL_S = 210
@@ -800,6 +793,7 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
local nToolType = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
local bSaw = ( nToolType == MCH_TY.SAW_STD or nToolType == MCH_TY.SAW_FLAT)
local bChain = ( nToolType == MCH_TY.MORTISE_STD)
local bAngTrasm = ( sHead == 'H5' or sHead == 'H6')
local dTLen = EgtTdbGetCurrToolParam( MCH_TP.LEN)
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
-- Se sega a catena, devo correggere il versore Aux per farlo coincidere con la direzione del braccio C
@@ -810,6 +804,12 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
vtAux = vtTool ^ vtAux
end
end
-- Se rinvio da sotto, devo correggere il versore Aux per farlo coincidere con la direzione del braccio C
if bAngTrasm then
local nExit = EgtTdbGetCurrToolParam( MCH_TP.EXIT)
vtAux = vtTool ^ vtAux
if nExit == 2 then vtAux = -vtAux end
end
-- Calcolo limiti derivanti dalla lavorazione
local dDistFront, dDistBack = SpecCalcEncumbrance( vtTool, vtAux, ptMin, ptMax, bSaw, bChain, dTLen, dTDiam)
return dDistFront, dDistBack
@@ -963,7 +963,8 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
dHeadBack = EgtIf( EMC.CNT == 1, 180, 130)
end
-- per interferenza con triangolo di rinforzo sulla pinza Y
if vtTool:getZ() < 0.25 and vtTool:getX() < 0.10 and vtTool:getY() < 0 and vtArm:getX() < -0.707 then
if ( vtTool:getZ() < 0.25 and vtTool:getX() < 0.10 and vtTool:getY() > 0 and vtArm:getX() < -0.707 and not BD.RIGHT_LOAD) or
( vtTool:getZ() < 0.25 and vtTool:getX() < 0.10 and vtTool:getY() < 0 and vtArm:getX() < -0.707 and BD.RIGHT_LOAD)then
dHeadBack = dHeadBack + 90
end
end
@@ -1055,7 +1056,8 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
dHeadFront = 130
end
-- per interferenza con triangolo di rinforzo sulla pinza V
if vtTool:getZ() < 0.25 and vtTool:getX() > -0.10 and vtTool:getY() < 0 and vtArm:getX() > 0.707 then
if ( vtTool:getZ() < 0.25 and vtTool:getX() > -0.10 and vtTool:getY() > 0 and vtArm:getX() > 0.707 and not BD.RIGHT_LOAD) or
( vtTool:getZ() < 0.25 and vtTool:getX() > -0.10 and vtTool:getY() < 0 and vtArm:getX() > 0.707 and BD.RIGHT_LOAD) then
dHeadFront = dHeadFront + 90
end
end
@@ -2549,7 +2551,7 @@ function SpecAdjustCarrB2( dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDelta
dYDeltaA = dYPosA - dTPosA
dVDeltaA = dVPosA - dTPosA
-- aggiorno la verifica di spostamento significativo
bYDeltaS = ( dYDeltaF < dYDeltaA - dYDeltaTol or dYDeltaF > dYDeltaA + DELTA_SIC)
bYDeltaS = ( dYDeltaF < dYDeltaA - dYDeltaTol or dYDeltaF > dYDeltaA + DELTA_SIC)
bVDeltaS = ( dVDeltaF > dVDeltaA + dVDeltaTol or dVDeltaF < dVDeltaA - DELTA_SIC)
-- aggiorno ExtraV residuo
dExtraV = dExtraV - dCorsaYTr - dCorsaVr
+35 -11
View File
@@ -9,13 +9,33 @@
-- 2024/01/17 Ver.2.6a1 DS Aggiunta gestione BlockHouse come in FAST.
-- 2024/02/09 Ver 2.6b1 LM In BeamData aggiunta funzione GetBlockedAxis che sostituisce la GetChainSawBlockedAxis.
-- 2024/02/22 Ver 2.6b2 LM In mlse corretto calcolo pinzaggio quando testa vicina.
-- 2024/02/23 ver 2.6c1 Rimossa chiamata funzione EgtGetSourceDir
-- Prima versione post common
-- Allineamento con common ver. 2.6c3
-- 2024/02/23 ver 2.6c2 Aggiornamento BeamData per visualizzazione in simulazione
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6b2'
PP_VER = '2.6c2'
MIN_MACH_VER = '2.5k1'
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
-- Elimino direttori altre macchine e imposto direttorio macchina corrente per ricerca librerie
EgtRemoveBaseMachineDirFromPackagePath()
EgtAddToPackagePath( sMachDir .. '\\Beam\\?.lua')
EgtAddToPackagePath( sMachDir .. '\\?.lua')
local BD = require( 'BeamData')
local INFO_STD_PP = require( 'Version')
-- prendo la versione kernel minima necessaria pi nuova tra macchina e script comuni
if INFO_STD_PP.MIN_MACH_VER_PP_COMMON > MIN_MACH_VER then
MIN_MACH_VER = INFO_STD_PP.MIN_MACH_VER_PP_COMMON
end
EgtOutLog ( '**PP_VER ver.'..PP_VER..'**'..INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION, 1)
-- Parametri macchina
NumericalControl = 'TPA' -- NUM o TPA
MinX = -1350
@@ -40,6 +60,8 @@ SawOffs = -242.68
SawBOffs = 0
SawCOffs = 0
ChSawLen = 90.0
AngTr1Offs = 170
AngTr1Len = 150
TurnerOffs = 200.0
DeltaTabY = -898.0
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
@@ -56,18 +78,15 @@ MaxUnloadLen = 0
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
CoeffVM = 0.5
-- Aggiornamento con dati da BeamData.lua
local sBeamData = EgtGetSourceDir().."\\Beam\\BeamData.lua"
if EgtExistsFile( sBeamData) then
local BD = dofile( sBeamData)
if BD then
BeamHeightForFixRot = BD.MAX_HEIGHT_ROT_B_ABOVE or BeamHeightForFixRot
end
-- leggo e aggiorno con parametri da BeamData
if BD then
BeamHeightForFixRot = BD.MAX_HEIGHT_ROT_B_ABOVE or BeamHeightForFixRot
end
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fastrl.data"
local sData = EgtGetSourceDir().."\\Beam\\Ts3Data.lua"
local sData = sMachDir .. "\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
@@ -99,11 +118,16 @@ if EgtExistsFile( sData) then
if Machine.Offsets.PIVOTLAMA then SawOffs = - Machine.Offsets.PIVOTLAMA end
if Machine.Offsets.OFFSETBLAMA then SawBOffs= Machine.Offsets.OFFSETBLAMA end
if Machine.Offsets.OFFSETCLAMA then SawCOffs= Machine.Offsets.OFFSETCLAMA end
if Machine.Offsets.OFFSETZ_RINV_1 then AngTr1Offs = Machine.Offsets.OFFSETZ_RINV_1 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
AngTr1Len = Machine.Offsets.OFFSETX_RINV_1 or AngTr1Len
--if Machine.Offsets.OFFSETZ_RINV_2 then AngTr2Offs = Machine.Offsets.OFFSETZ_RINV_2 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
--AngTr2Len = Machine.Offsets.OFFSETX_RINV_2 or AngTr2Len
TurnerOffs = Machine.Offsets.OFFSETRIB or TurnerOffs
if Machine.Offsets.OFFSETX then DeltaTabY = -Machine.Offsets.OFFSETX end
if Machine.Offsets.OFFSETZ then DeltaTabZ = Machine.Offsets.OFFSETZ + EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
if Machine.Offsets.SECSUP then SecondSupport = ( Machine.Offsets.SECSUP == 1) end
if Machine.Offsets.BLOCKHAUS then SpecialBH = ( Machine.Offsets.BLOCKHAUS == 1) end
if Machine.Offsets.RIB_AUTO then AutomaticRotation = ( Machine.Offsets.RIB_AUTO == 1) end
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD end
if Machine.Offsets.DEFTCPOS then DefTcPos = ( 'T' .. Machine.Offsets.DEFTCPOS) end
end
@@ -119,8 +143,8 @@ EmtGeneral {
ExitMaxAdjust = 30,
ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 165,
Special = 'Essetre-FASTrl.mlse',
Processor = 'Essetre-FASTrl.mlpe'}
Special = 'Common-FAST.mlse',
Processor = 'Common-FAST.mlpe'}
local BaseId = EmtBase {
Name = 'Base',
Geo='BASE/GEO',
+15
View File
@@ -0,0 +1,15 @@
==== Common_FAST Update Log ====
Versione 2.6c1 (23/02/2024)
- (ALL) Prima versione post-proc comune FAST e FASTrl
- (ALL) "BeamData" caricato come libreria con 'require' anziché come file con 'dofile'
- (SIM) Aggiunta funzioni "OnSimulInit" e "OnSimulExit" per orientare vista corretta in caso di macchina con carico destro. N.B.= serve CAM5 2.6b4
- (ALL) In BeamData aggiunto flag per direzione carico RIGHT_LOAD
- (ALL) Aggiornamento 'Compile.bat' con nuovi nomi file
Versione 2.6c2 (23/02/2024)
- (ALL) Rimossa chiamata funzione EgtGetSourceDir
Versione 2.6c3 (23/02/2024)
- (SIM) Corretta lettura parametro RIGHT_LOAD
- (ALL) Rimossa chiamata funzione EgtGetSourceDir rimasta in MLPE
+10
View File
@@ -0,0 +1,10 @@
-- Version.lua by EgalWare s.r.l. 2024/02/23
-- 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.6c3', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}
return InfoCommon_STD_PP