Aggiunta gestione sega a catena (MANCA generazione codice CN).
This commit is contained in:
+15
-9
@@ -20,7 +20,7 @@ local BeamData = {
|
|||||||
MINRAW_L = 1070, -- minimo grezzo in coda scaricabile per sezioni grandi
|
MINRAW_L = 1070, -- minimo grezzo in coda scaricabile per sezioni grandi
|
||||||
MAX_LEN_SCRAP = 270, -- massima lunghezza scarto di coda
|
MAX_LEN_SCRAP = 270, -- massima lunghezza scarto di coda
|
||||||
MAX_LEN_SCRAP_START = 270, -- massima lunghezza scarto di testa
|
MAX_LEN_SCRAP_START = 270, -- massima lunghezza scarto di testa
|
||||||
MAX_DIM_HTCUT = 205, -- larghezza massima taglio di testa o coda
|
MAX_DIM_HTCUT = 130, -- larghezza massima taglio di testa o coda
|
||||||
MAX_DIM_HTCUT_HBEAM = -195, -- larghezza massima taglio di testa o coda con trave alta
|
MAX_DIM_HTCUT_HBEAM = -195, -- larghezza massima taglio di testa o coda con trave alta
|
||||||
MIN_DIM_HBEAM = 621, -- altezza minima di trave alta
|
MIN_DIM_HBEAM = 621, -- altezza minima di trave alta
|
||||||
MAX_DIM_DICE = 155, -- dimensione trasversale massima cubetto
|
MAX_DIM_DICE = 155, -- dimensione trasversale massima cubetto
|
||||||
@@ -32,7 +32,7 @@ local BeamData = {
|
|||||||
CUT_EXTRA_MIN = 1, -- affondamento extra ridotto per tagli di lama e fresature
|
CUT_EXTRA_MIN = 1, -- affondamento extra ridotto per tagli di lama e fresature
|
||||||
NZ_MINA = -0.6, -- componente limite in Z normale di una faccia (-36.8deg)
|
NZ_MINA = -0.6, -- componente limite in Z normale di una faccia (-36.8deg)
|
||||||
NZ_MINB = -0.4, -- componente limite in Z normale di un insieme di facce (-23deg)
|
NZ_MINB = -0.4, -- componente limite in Z normale di un insieme di facce (-23deg)
|
||||||
DRILL_TOL = 0.2, -- tolleranza tra diametro foro e diametro punta
|
DRILL_TOL = 0.5, -- tolleranza tra diametro foro e diametro punta
|
||||||
DRILL_VZ_MIN = -0.51, -- componente limite in Z del versore di un foro
|
DRILL_VZ_MIN = -0.51, -- componente limite in Z del versore di un foro
|
||||||
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
|
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
|
||||||
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
|
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
|
||||||
@@ -43,7 +43,7 @@ local BeamData = {
|
|||||||
LONGCUT_MAXLEN = 1200, -- lunghezza massima sezione di taglio longitudinale (std=1200)
|
LONGCUT_MAXLEN = 1200, -- lunghezza massima sezione di taglio longitudinale (std=1200)
|
||||||
MAX_LEN_RIDGELAP_FROM_BOTTOM = 141, -- massima lunghezza ridgelap lavorabile da sotto
|
MAX_LEN_RIDGELAP_FROM_BOTTOM = 141, -- massima lunghezza ridgelap lavorabile da sotto
|
||||||
MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM = 96, -- massima lunghezza ridgelap lavorabile da sotto con trave alta
|
MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM = 96, -- massima lunghezza ridgelap lavorabile da sotto con trave alta
|
||||||
DIM_TO_CENTER_STRIP = 100, -- larghezza minima trave per inseriemento codolo nel centro del trave; 0 = automatico
|
DIM_TO_CENTER_STRIP = 50, -- larghezza minima trave per inserimento codolo nel centro del trave; 0 = automatico
|
||||||
DIM_STRIP = -1, -- dimensione codolo sostegno parti lasciate su contorno libero o archi (-1 = da Q...)
|
DIM_STRIP = -1, -- dimensione codolo sostegno parti lasciate su contorno libero o archi (-1 = da Q...)
|
||||||
DIM_STRIP_SMALL = 1, -- dimensione codolo piccolo (quando le parti sostenute sono sicuramente sulla parte sopra del pezzo)
|
DIM_STRIP_SMALL = 1, -- dimensione codolo piccolo (quando le parti sostenute sono sicuramente sulla parte sopra del pezzo)
|
||||||
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
|
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
|
||||||
@@ -57,7 +57,7 @@ local BeamData = {
|
|||||||
MAX_HEIGHT_ROT_B_ABOVE = 500, -- massima altezza della trave che permette di ruotare l'asse B sopra la stessa senza collisioni
|
MAX_HEIGHT_ROT_B_ABOVE = 500, -- massima altezza della trave che permette di ruotare l'asse B sopra la stessa senza collisioni
|
||||||
KIOTP = 3, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
|
KIOTP = 3, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
|
||||||
MAXDIAM_POCK_CORNER = 30, -- diametro massimo utensile ammesso per tasche con angoli interni
|
MAXDIAM_POCK_CORNER = 30, -- diametro massimo utensile ammesso per tasche con angoli interni
|
||||||
ADVANCE_TAIL_CUT = true, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con robabile caduta
|
ADVANCE_TAIL_CUT = true, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con probabile caduta
|
||||||
ADVANCE_TAIL_OFFS = 5, -- accorciamento taglio di coda avanzato (minimo 1)
|
ADVANCE_TAIL_OFFS = 5, -- accorciamento taglio di coda avanzato (minimo 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,13 +89,19 @@ if EgtExistsFile( sData) then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
local function GetNzLimDownUp( b3Raw, vtN, vtOrtho, bDiceCut)
|
||||||
|
return -0.173
|
||||||
|
end
|
||||||
|
BeamData.GetNzLimDownUp = GetNzLimDownUp
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function GetChainSawBlockedAxis( nInd)
|
local function GetChainSawBlockedAxis( nInd)
|
||||||
--if nInd == 1 then
|
if nInd == 1 then
|
||||||
-- return 'CS=-90'
|
return 'CS=0'
|
||||||
--else
|
else
|
||||||
return 'CS=0'
|
return 'CS=-90'
|
||||||
--end
|
end
|
||||||
end
|
end
|
||||||
BeamData.GetChainSawBlockedAxis = GetChainSawBlockedAxis
|
BeamData.GetChainSawBlockedAxis = GetChainSawBlockedAxis
|
||||||
|
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ function OnToolSelect()
|
|||||||
if sTool ~= EMT.TOOL then error( "Tool name mismatch") end
|
if sTool ~= EMT.TOOL then error( "Tool name mismatch") end
|
||||||
-- predefinite EMT.TCPOS EMT.HEAD EMT.EXIT
|
-- predefinite EMT.TCPOS EMT.HEAD EMT.EXIT
|
||||||
EMT.TOOLTYPE = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
|
EMT.TOOLTYPE = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
|
||||||
EMT.TOOLSEL = EMT.TCPOS..' M06'
|
EMT.TOOLSEL = string.sub( EMT.TCPOS, 2)
|
||||||
EMT.TDIAM = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
EMT.TDIAM = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||||
EMT.TTOTDIAM = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM)
|
EMT.TTOTDIAM = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM)
|
||||||
EMT.TLEN = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
EMT.TLEN = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||||
@@ -609,8 +609,7 @@ function OnRapid()
|
|||||||
local sStep = EgtNumToString( EMT.NSTEP, 0)
|
local sStep = EgtNumToString( EMT.NSTEP, 0)
|
||||||
EmtOutput( '_N'..sStep..':STOPRE')
|
EmtOutput( '_N'..sStep..':STOPRE')
|
||||||
end
|
end
|
||||||
local nTool = 100 + tonumber( string.sub( EMT.TCPOS, 2))
|
local sOut = 'PRE_WORK(1,1,' .. EMT.TOOLSEL .. ','..EgtNumToString( EMT.S, 0) ..',,,,)'
|
||||||
local sOut = 'PRE_WORK(1,1,' .. EgtNumToString( nTool, 0) .. ','..EgtNumToString( EMT.S, 0) ..',,,,)'
|
|
||||||
EmtOutput( sOut)
|
EmtOutput( sOut)
|
||||||
EMT.SPEED_ON = true
|
EMT.SPEED_ON = true
|
||||||
-- eventuali emissioni per ripartenza successiva al carico
|
-- eventuali emissioni per ripartenza successiva al carico
|
||||||
@@ -619,8 +618,7 @@ function OnRapid()
|
|||||||
EmtOutput( 'GOTOF '..'_N'..sStep1)
|
EmtOutput( 'GOTOF '..'_N'..sStep1)
|
||||||
local sStep = EgtNumToString( EMT.NSTEP, 0)
|
local sStep = EgtNumToString( EMT.NSTEP, 0)
|
||||||
EmtOutput( '_N'..sStep..':STOPRE')
|
EmtOutput( '_N'..sStep..':STOPRE')
|
||||||
local nTool = 100 + tonumber( string.sub( EMT.TCPOS, 2))
|
local sOut = 'PRE_WORK(1,1,' .. EMT.TOOLSEL .. ','..EgtNumToString( EMT.S, 0) ..',,,,)'
|
||||||
local sOut = 'PRE_WORK(1,1,' .. EgtNumToString( nTool, 0) .. ','..EgtNumToString( EMT.S, 0) ..',,,,)'
|
|
||||||
EmtOutput( sOut)
|
EmtOutput( sOut)
|
||||||
EMT.SPEED_ON = true
|
EMT.SPEED_ON = true
|
||||||
EmtOutput( '_N'..sStep1..':STOPRE')
|
EmtOutput( '_N'..sStep1..':STOPRE')
|
||||||
@@ -635,6 +633,11 @@ function OnRapid()
|
|||||||
sOut = 'SUPA G0 D0' .. EmtGetAxis( 'L3')
|
sOut = 'SUPA G0 D0' .. EmtGetAxis( 'L3')
|
||||||
end
|
end
|
||||||
EmtOutput( sOut)
|
EmtOutput( sOut)
|
||||||
|
-- sega a catena da gestire
|
||||||
|
if EMT.HEAD == 'H3' then
|
||||||
|
EmtOutput( '!!! Chainsaw start movements to be calculated !!!')
|
||||||
|
EgtOutLog( 'ERROR : CHAINSAW START MOVEMENTS TO BE CALCULATED !!!')
|
||||||
|
end
|
||||||
-- movimento YAC con interpolazione approssimata tramite F opportune per ogni asse
|
-- movimento YAC con interpolazione approssimata tramite F opportune per ogni asse
|
||||||
--EmtOutput( string.format( '; Y:%.3f->%.3f A:%.3f->%.3f C::%.3f->%.3f', EMT.L2opp, EMT.L2, EMT.R2pp, EMT.R2, EMT.R1pp, EMT.R1))
|
--EmtOutput( string.format( '; Y:%.3f->%.3f A:%.3f->%.3f C::%.3f->%.3f', EMT.L2opp, EMT.L2, EMT.R2pp, EMT.R2, EMT.R1pp, EMT.R1))
|
||||||
local dFeedY, dFeedA, dFeedC = CalcFeedYAC( EMT.L2opp - EMT.L2, EMT.R2pp - EMT.R2, EMT.R1pp - EMT.R1)
|
local dFeedY, dFeedA, dFeedC = CalcFeedYAC( EMT.L2opp - EMT.L2, EMT.R2pp - EMT.R2, EMT.R1pp - EMT.R1)
|
||||||
@@ -1643,23 +1646,6 @@ function MyAdjustLinearAxes()
|
|||||||
local MyL2o = EMT.L2
|
local MyL2o = EMT.L2
|
||||||
local MyL3o = EMT.L3
|
local MyL3o = EMT.L3
|
||||||
|
|
||||||
--if EMT.REFLOC then
|
|
||||||
-- local vtE
|
|
||||||
-- if EMT.HEAD ~= 'H3' then
|
|
||||||
-- local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( 0))
|
|
||||||
-- local LenRef = MillOffs
|
|
||||||
-- vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
|
|
||||||
-- else
|
|
||||||
-- local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
|
|
||||||
-- local LenRef = MillOffs
|
|
||||||
-- local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
|
|
||||||
-- vtE = vtAux * LenAux - Z_AX() * LenRef
|
|
||||||
-- end
|
|
||||||
-- EMT.L1 = EMT.L1 - vtE:getX()
|
|
||||||
-- EMT.L2 = EMT.L2 - vtE:getY()
|
|
||||||
-- EMT.L3 = EMT.L3 - vtE:getZ()
|
|
||||||
--end
|
|
||||||
|
|
||||||
if EMT.X_OFF then EMT.L1 = EMT.L1 + EMT.X_OFF end
|
if EMT.X_OFF then EMT.L1 = EMT.L1 + EMT.X_OFF end
|
||||||
|
|
||||||
EmtAdjustLinearAxes()
|
EmtAdjustLinearAxes()
|
||||||
|
|||||||
+1
-1
@@ -105,7 +105,7 @@ Default=Standard
|
|||||||
|
|
||||||
[Estimations]
|
[Estimations]
|
||||||
Enable=1
|
Enable=1
|
||||||
WinPlace=0,458,74,669,933
|
WinPlace=0,698,85,669,863
|
||||||
|
|
||||||
[VMill]
|
[VMill]
|
||||||
Enable=1
|
Enable=1
|
||||||
|
|||||||
+36
-38
@@ -1,12 +1,13 @@
|
|||||||
-- Descrizione macchina Saomad-KAIROS by EgalWare s.r.l. 2024/06/27
|
-- Descrizione macchina Saomad-KAIROS by EgalWare s.r.l. 2024/07/08
|
||||||
-- 2024/06/27 ver 2.6f1 Prima versione (derivata da Kairos023)
|
-- 2024/06/27 ver 2.6f1 Prima versione (derivata da Kairos023)
|
||||||
-- 2024/07/01 ver 2.6g1 Aggiornato 3D con nuovo gruppo testa
|
-- 2024/07/01 ver 2.6g1 Aggiornato 3D con nuovo gruppo testa
|
||||||
-- 2024/07/03 ver 2.6g2 Aggiornato 3D con modello reale e altre piccole modifiche
|
-- 2024/07/03 ver 2.6g2 Aggiornato 3D con modello reale e altre piccole modifiche
|
||||||
|
-- 2024/07/08 ver 2.6g3 Aggiunta gestione sega a catena (MANCA generazione codice CN).
|
||||||
|
|
||||||
require( 'EmtGenerator')
|
require( 'EmtGenerator')
|
||||||
EgtEnableDebug( false)
|
EgtEnableDebug( false)
|
||||||
|
|
||||||
PP_VER = '2.6g2'
|
PP_VER = '2.6g3'
|
||||||
MIN_MACH_VER = '2.5j1'
|
MIN_MACH_VER = '2.5j1'
|
||||||
|
|
||||||
EgtOutLog ( '** Saomad-KAIROS '..PP_VER..' (MinMach '.. MIN_MACH_VER ..') **', 1)
|
EgtOutLog ( '** Saomad-KAIROS '..PP_VER..' (MinMach '.. MIN_MACH_VER ..') **', 1)
|
||||||
@@ -177,7 +178,7 @@ EmtAxis {
|
|||||||
Type = MCH_AT.ROTARY,
|
Type = MCH_AT.ROTARY,
|
||||||
Dir = Z_AX(),
|
Dir = Z_AX(),
|
||||||
Pos = Point3d( 0, 0, 0),
|
Pos = Point3d( 0, 0, 0),
|
||||||
Stroke = { -90, 90},
|
Stroke = { -90, 0},
|
||||||
Home = 0,
|
Home = 0,
|
||||||
Geo = 'CS_AXIS/GEO'}
|
Geo = 'CS_AXIS/GEO'}
|
||||||
local H3Id = EmtHead {
|
local H3Id = EmtHead {
|
||||||
@@ -277,98 +278,98 @@ EmtTable {
|
|||||||
-- ToolChanger 10 posizioni verticale
|
-- ToolChanger 10 posizioni verticale
|
||||||
local ptTcCen = Point3d( -520.9759, -817, 1056.0424)
|
local ptTcCen = Point3d( -520.9759, -817, 1056.0424)
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T1',
|
Name = 'T101',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen,
|
Pos = ptTcCen,
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T1'}
|
Geo = 'BASE/T101'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T2',
|
Name = 'T102',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110),
|
Pos = ptTcCen - Vector3d( 0, 0, 110),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T2'}
|
Geo = 'BASE/T102'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T3',
|
Name = 'T103',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*2),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*2),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T3'}
|
Geo = 'BASE/T103'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T4',
|
Name = 'T104',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*3),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*3),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T4'}
|
Geo = 'BASE/T104'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T5',
|
Name = 'T105',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*4),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*4),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T5'}
|
Geo = 'BASE/T105'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T6',
|
Name = 'T106',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*5),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*5),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T6'}
|
Geo = 'BASE/T106'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T7',
|
Name = 'T107',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*6),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*6),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T7'}
|
Geo = 'BASE/T107'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T8',
|
Name = 'T108',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*7),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*7),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T8'}
|
Geo = 'BASE/T108'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T9',
|
Name = 'T109',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*8),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*8),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T9'}
|
Geo = 'BASE/T109'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T10',
|
Name = 'T110',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*9),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*9),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T10'}
|
Geo = 'BASE/T110'}
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T11',
|
Name = 'T111',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = ptTcCen - Vector3d( 0, 0, 110*10),
|
Pos = ptTcCen - Vector3d( 0, 0, 110*10),
|
||||||
TDir = X_AX(),
|
TDir = X_AX(),
|
||||||
ADir = Y_AX(),
|
ADir = Y_AX(),
|
||||||
Geo = 'BASE/T11'}
|
Geo = 'BASE/T111'}
|
||||||
-- ToolChanger lama
|
-- ToolChanger lama
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T21',
|
Name = 'T201',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = Point3d( 508.0241, -748.997, 271.8273),
|
Pos = Point3d( 508.0241, -748.997, 271.8273),
|
||||||
TDir = -X_AX(),
|
TDir = -X_AX(),
|
||||||
ADir = -Y_AX(),
|
ADir = -Y_AX(),
|
||||||
Geo = 'BASE/T21'}
|
Geo = 'BASE/T201'}
|
||||||
-- ToolChanger motosega
|
-- ToolChanger motosega
|
||||||
EmtTcPos {
|
EmtTcPos {
|
||||||
Name = 'T22',
|
Name = 'T202',
|
||||||
Parent = 'Base',
|
Parent = 'Base',
|
||||||
Pos = Point3d( 656.5865, -768.913, 715.2899),
|
Pos = Point3d( 656.5865, -768.913, 715.2899),
|
||||||
TDir = -X_AX(),
|
TDir = -X_AX(),
|
||||||
ADir = Z_AX(),
|
ADir = Z_AX(),
|
||||||
Geo = 'BASE/T22'}
|
Geo = 'BASE/T202'}
|
||||||
|
|
||||||
-- Aggiusto posizioni geometriche
|
-- Aggiusto posizioni geometriche
|
||||||
local vtMove = Vector3d( 0, ( DeltaTabY - 0), ( DeltaTabZ - 0))
|
local vtMove = Vector3d( 0, ( DeltaTabY - 0), ( DeltaTabZ - 0))
|
||||||
@@ -408,20 +409,17 @@ function OnSetHead()
|
|||||||
-- aggiustamenti per distanza
|
-- aggiustamenti per distanza
|
||||||
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
|
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
|
||||||
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
|
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
|
||||||
if not EMC.VER or EMC.VER < '2.5h2' then
|
|
||||||
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
|
|
||||||
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
|
|
||||||
EgtMove( ExitId, vtMove)
|
|
||||||
end
|
|
||||||
-- recupero valore asse CS bloccato
|
-- recupero valore asse CS bloccato
|
||||||
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
|
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
|
||||||
local dPosCS = tonumber( sVal:sub( 4) or '')
|
local dPosCS = tonumber( sVal:sub( 4) or '')
|
||||||
EmtModifyAxisHome( 'C', GetChainSawCHomeFromVirtualAxis( dPosCS))
|
EmtModifyAxisHome( 'C', GetChainSawCHomeFromVirtualAxis( dPosCS))
|
||||||
|
-- limiti asse A
|
||||||
|
EmtModifyAxisStroke( 'A', { -91, 91})
|
||||||
-- altrimenti
|
-- altrimenti
|
||||||
else
|
else
|
||||||
EmtModifyAxisHome( 'C', ParkC)
|
EmtModifyAxisHome( 'C', ParkC)
|
||||||
-- se lama
|
-- se lama
|
||||||
if EMC.TCPOS == 'T21' then
|
if EMC.TCPOS == 'T201' then
|
||||||
EmtModifyAxisStroke( 'A', { -100, 100})
|
EmtModifyAxisStroke( 'A', { -100, 100})
|
||||||
-- altrimenti
|
-- altrimenti
|
||||||
else
|
else
|
||||||
@@ -435,10 +433,10 @@ end
|
|||||||
function GetChainSawCHomeFromVirtualAxis( dPosCS)
|
function GetChainSawCHomeFromVirtualAxis( dPosCS)
|
||||||
-- se CS=0 -> HomeC = -90
|
-- se CS=0 -> HomeC = -90
|
||||||
if abs( dPosCS) < 0.1 then
|
if abs( dPosCS) < 0.1 then
|
||||||
return 90
|
return -90
|
||||||
-- altrimenti CS=90 -> HomeC = -180
|
-- altrimenti CS=-90 -> HomeC = -180
|
||||||
else
|
else
|
||||||
return 0
|
return -180
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+46
-24
@@ -36,6 +36,8 @@ function OnSimulStart()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- Carico l'utensile iniziale o di default sulla testa
|
||||||
|
LoadFirstTool()
|
||||||
-- Se reset o home, esco
|
-- Se reset o home, esco
|
||||||
if EMT.SIM1ST then return end
|
if EMT.SIM1ST then return end
|
||||||
-- Creo o svuoto gruppo per copia finale degli oggetti virtual milling
|
-- Creo o svuoto gruppo per copia finale degli oggetti virtual milling
|
||||||
@@ -128,17 +130,6 @@ function OnSimulDispositionStart()
|
|||||||
EMT.SB = b3Sol:getDimY()
|
EMT.SB = b3Sol:getDimY()
|
||||||
EMT.HB = b3Sol:getDimZ()
|
EMT.HB = b3Sol:getDimZ()
|
||||||
end
|
end
|
||||||
-- Carico primo utensile sulla testa 1
|
|
||||||
local sTool, nTlen = FindFirstToolOnHead( 'H1')
|
|
||||||
if sTool then
|
|
||||||
EMT.TOOL_1 = sTool
|
|
||||||
else
|
|
||||||
EMT.TOOL_1 = GetDefaultToolName()
|
|
||||||
end
|
|
||||||
EgtLoadTool( 'H1', 1, EMT.TOOL_1)
|
|
||||||
EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1)
|
|
||||||
ShowToolInTcPos( EMT.TCPOS_1, false)
|
|
||||||
EMT.LOAD = true
|
|
||||||
-- Se vero inizio e abilitato creo gli Zmap
|
-- Se vero inizio e abilitato creo gli Zmap
|
||||||
EMT.VMILL = {}
|
EMT.VMILL = {}
|
||||||
if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
|
if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
|
||||||
@@ -471,7 +462,12 @@ function OnSimulToolDeselect()
|
|||||||
-- movimento scarico sega a catena
|
-- movimento scarico sega a catena
|
||||||
if EMT.HEAD == 'H3' then
|
if EMT.HEAD == 'H3' then
|
||||||
local dPosCS = EgtGetAxisPos( 'CS')
|
local dPosCS = EgtGetAxisPos( 'CS')
|
||||||
SimulMoveAxes( 'A', ParkA, MCH_SIM_STEP.COLLROT, 'C', GetChainSawCHomeFromVirtualAxis( dPosCS), MCH_SIM_STEP.COLLROT)
|
if abs( dPosCS) > 0.1 then
|
||||||
|
SimulMoveAxis( 'A', ParkA, MCH_SIM_STEP.COLLROT)
|
||||||
|
SimulMoveAxis( 'C', GetChainSawCHomeFromVirtualAxis( dPosCS), MCH_SIM_STEP.COLLROT)
|
||||||
|
else
|
||||||
|
SimulMoveAxes( 'A', ParkA, MCH_SIM_STEP.COLLROT, 'C', GetChainSawCHomeFromVirtualAxis( dPosCS), MCH_SIM_STEP.COLLROT)
|
||||||
|
end
|
||||||
SimulMoveAxis( 'Y', ParkY, MCH_SIM_STEP.RAPID)
|
SimulMoveAxis( 'Y', ParkY, MCH_SIM_STEP.RAPID)
|
||||||
end
|
end
|
||||||
-- breve pausa
|
-- breve pausa
|
||||||
@@ -509,7 +505,7 @@ function OnSimulMachiningStart()
|
|||||||
if EMT.HEAD == 'H3' and EMT.HEAD == EMT.PREVHEAD then
|
if EMT.HEAD == 'H3' and EMT.HEAD == EMT.PREVHEAD then
|
||||||
local dPrevCS = EgtGetAxisPos( 'CS')
|
local dPrevCS = EgtGetAxisPos( 'CS')
|
||||||
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
|
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
|
||||||
local dPosCS = tonumber( sVal:sub( 3))
|
local dPosCS = tonumber( sVal:sub( 4))
|
||||||
if abs( dPosCS - dPrevCS) > 1 then
|
if abs( dPosCS - dPrevCS) > 1 then
|
||||||
OnSimulToolDeselect()
|
OnSimulToolDeselect()
|
||||||
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.ON)
|
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.ON)
|
||||||
@@ -654,6 +650,10 @@ function OnSimulMoveStart()
|
|||||||
VerifyX2Stroke( EMT.A2)
|
VerifyX2Stroke( EMT.A2)
|
||||||
-- se inizio lavorazione
|
-- se inizio lavorazione
|
||||||
if EMT.MCHFIRST then
|
if EMT.MCHFIRST then
|
||||||
|
if EMT.HEAD == 'H3' and abs( EgtGetAxisPos( 'CS')) > 0.1 and not EMT.R1p or abs( EMT.R1 - EMT.R1p) > 15 then
|
||||||
|
SimulMoveAxis( 'A', ParkA, MCH_SIM_STEP.COLLROT)
|
||||||
|
SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT)
|
||||||
|
end
|
||||||
EgtOutText( '')
|
EgtOutText( '')
|
||||||
EMT.MCHFIRST = false
|
EMT.MCHFIRST = false
|
||||||
EMT.POSTROT = nil
|
EMT.POSTROT = nil
|
||||||
@@ -969,22 +969,38 @@ function GetToolTcPos( sTool)
|
|||||||
return sTcPos
|
return sTcPos
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
function LoadFirstTool()
|
||||||
|
-- Carico primo utensile sulla testa 1
|
||||||
|
local sTool, nTlen = FindFirstToolOnHead( 'H1')
|
||||||
|
if sTool then EMT.TOOL_1 = sTool else EMT.TOOL_1 = GetDefaultToolName() end
|
||||||
|
EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1)
|
||||||
|
local OrigEMC = EMC
|
||||||
|
EMC = { HEAD = 'H1', TOOL = EMT.TOOL_1, TCPOS = EMT.TCPOS_1}
|
||||||
|
OnSetHead()
|
||||||
|
EMC = OrigEMC
|
||||||
|
EgtResetAxisPos( 'C') ; EgtResetAxisPos( 'A')
|
||||||
|
EgtLoadTool( 'H1', 1, EMT.TOOL_1)
|
||||||
|
ShowToolInTcPos( EMT.TCPOS_1, false)
|
||||||
|
EMT.LOAD = true
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
-- *** ESTIMATION T&L ***
|
-- *** ESTIMATION T&L ***
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local RAPID_X_FEED = 75000 -- mm/min
|
local RAPID_X_FEED = FmaxX1 -- mm/min
|
||||||
local RAPID_Y_FEED = 100000 -- mm/min
|
local RAPID_Y_FEED = FmaxY -- mm/min
|
||||||
local RAPID_Z_FEED = 50000 -- mm/min
|
local RAPID_Z_FEED = FmaxZ -- mm/min
|
||||||
local RAPID_C_FEED = 15000 -- deg/min
|
local RAPID_C_FEED = FmaxC -- deg/min
|
||||||
local RAPID_B_FEED = 15000 -- deg/min
|
local RAPID_B_FEED = FmaxA -- deg/min
|
||||||
local RAPID_MIN_T = 0.1 -- s
|
local RAPID_MIN_T = 0.2 -- s
|
||||||
local LOAD_T = 6 -- s
|
local TOOL_CHANGE = 14 -- s
|
||||||
local CHAR_ONE_MOVE_T = 1 -- s
|
local LOAD_T = 16 -- s
|
||||||
|
local CHAR_ONE_MOVE_T = 2 -- s
|
||||||
local ROTATION_T = 40 -- s
|
local ROTATION_T = 40 -- s
|
||||||
local SPLIT_T = 6 -- s
|
local SPLIT_T = 9 -- s
|
||||||
local UNLOAD_T = 6 -- s
|
local UNLOAD_T = 12 -- s
|
||||||
local FALL_T = 2 -- s
|
local FALL_T = 4 -- s
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function OnEstimStart()
|
function OnEstimStart()
|
||||||
@@ -1076,6 +1092,8 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function OnEstimToolSelect()
|
function OnEstimToolSelect()
|
||||||
|
-- flag di utensile cambiato
|
||||||
|
EMT.NEWTOOL = true
|
||||||
-- reset indice utensile in tabella lunghezze
|
-- reset indice utensile in tabella lunghezze
|
||||||
EMT.TCLIND = 0
|
EMT.TCLIND = 0
|
||||||
-- verifico che l'utensile sia definito
|
-- verifico che l'utensile sia definito
|
||||||
@@ -1108,6 +1126,10 @@ function OnEstimMachiningStart()
|
|||||||
EMT.MCHCUTTIME = 0
|
EMT.MCHCUTTIME = 0
|
||||||
EMT.MCHEXTLEN = 0
|
EMT.MCHEXTLEN = 0
|
||||||
EMT.MCHEXTTIME = 0
|
EMT.MCHEXTTIME = 0
|
||||||
|
if EMT.NEWTOOL then
|
||||||
|
EMT.NEWTOOL = nil
|
||||||
|
EMT.MCHEXTTIME = EMT.MCHEXTTIME + TOOL_CHANGE
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|||||||
Binary file not shown.
+13
-13
@@ -27,19 +27,19 @@ local POS = "Pos"
|
|||||||
local GS = {}
|
local GS = {}
|
||||||
|
|
||||||
-- Configurazione posizioni
|
-- Configurazione posizioni
|
||||||
local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
|
local PositionTable={{Pos = "Pos1", TcPos = "T101", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos2", TcPos = "T2", Head = "H1", Group = "G1"},
|
{Pos = "Pos2", TcPos = "T102", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos3", TcPos = "T3", Head = "H1", Group = "G1"},
|
{Pos = "Pos3", TcPos = "T103", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos4", TcPos = "T4", Head = "H1", Group = "G1"},
|
{Pos = "Pos4", TcPos = "T104", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos5", TcPos = "T5", Head = "H1", Group = "G1"},
|
{Pos = "Pos5", TcPos = "T105", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos6", TcPos = "T6", Head = "H1", Group = "G1"},
|
{Pos = "Pos6", TcPos = "T106", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos7", TcPos = "T7", Head = "H1", Group = "G1"},
|
{Pos = "Pos7", TcPos = "T107", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos8", TcPos = "T8", Head = "H1", Group = "G1"},
|
{Pos = "Pos8", TcPos = "T108", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos9", TcPos = "T9", Head = "H1", Group = "G1"},
|
{Pos = "Pos9", TcPos = "T109", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos10", TcPos = "T10", Head = "H1", Group = "G1"},
|
{Pos = "Pos10", TcPos = "T110", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos11", TcPos = "T11", Head = "H1", Group = "G1"},
|
{Pos = "Pos11", TcPos = "T111", Head = "H1", Group = "G1"},
|
||||||
{Pos = "Pos12", TcPos = "T21", Head = "H1", Group = "G2"},
|
{Pos = "Pos12", TcPos = "T201", Head = "H1", Group = "G2"},
|
||||||
{Pos = "Pos13", TcPos = "T22", Head = "H3", Group = "G3"}}
|
{Pos = "Pos13", TcPos = "T202", Head = "H3", Group = "G3"}}
|
||||||
if EgtGetHeadId( 'H3') then
|
if EgtGetHeadId( 'H3') then
|
||||||
PositionTable[13].Head = 'H3'
|
PositionTable[13].Head = 'H3'
|
||||||
end
|
end
|
||||||
|
|||||||
+7
-4
@@ -1,20 +1,23 @@
|
|||||||
; Commento per evitare BOM con UTF-8
|
; Commento per evitare BOM con UTF-8
|
||||||
; Index, Type, Description, Value
|
; Index, Type, Description, Value
|
||||||
; Index = 0,1,..,n
|
; Index = 0,1,..,n
|
||||||
; Type : d=double, l=lenght, s=string, b=boolean, dr=double recalc, sr= string recalc, lr=lenght recalc, br=boolean recalc
|
; Type : d=double, l=lenght, s=string, b=boolean, dr=double recalc, sr= string recalc, lr=lenght recalc, br=boolean recalc, th=toolholder
|
||||||
; Description : STEP, SIDESTEP, ...
|
; Description : STEP, SIDESTEP, ...
|
||||||
|
|
||||||
[DRILL_STD]
|
[DRILL_STD]
|
||||||
0=sr,TH,
|
0=th,TH,
|
||||||
|
|
||||||
[SAW_STD]
|
[SAW_STD]
|
||||||
|
0=th,TH,
|
||||||
|
|
||||||
[SAW_FLAT]
|
[SAW_FLAT]
|
||||||
|
0=th,TH,
|
||||||
|
|
||||||
[MILL_STD]
|
[MILL_STD]
|
||||||
0=sr,TH,
|
0=th,TH,
|
||||||
|
|
||||||
[MILL_NOTIP]
|
[MILL_NOTIP]
|
||||||
0=sr,TH,
|
0=th,TH,
|
||||||
|
|
||||||
[MORTISE_STD]
|
[MORTISE_STD]
|
||||||
|
0=th,TH,
|
||||||
|
|||||||
Reference in New Issue
Block a user