Essetre-ONE 2.5b2 :

- primo commit.
This commit is contained in:
DarioS
2023-03-03 10:12:20 +01:00
commit f2a4163b4b
21 changed files with 8493 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
/Tools
/Machinings
/SetUp
/Beam/Ts3Data.bak
/Beam/CutData.lua
/Beam/DrillData.lua
/Beam/MillingData.lua
/Beam/PocketingData.lua
/Beam/SawingData.lua
/Beam/Ts3Data.lua
/Wall/Ts3Data.bak
/Wall/CutData.lua
/Wall/DrillData.lua
/Wall/MillingData.lua
/Wall/PocketingData.lua
/Wall/SawingData.lua
/Wall/Ts3Data.lua
+169
View File
@@ -0,0 +1,169 @@
-- BeamData.lua by Egaltech s.r.l. 2021/11/10
-- Raccolta dati generali per Travi
EgtOutLog( ' ONE-BeamData started')
-- Tabella per definizione modulo
local BeamData = {
RIGHT_LOAD = false, -- flag carico da destra
SIMUL_VIEW_DIR = 2, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
ROT90 = false, -- flag abilitazione rotazione 90 gradi
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 400, -- larghezza massima del grezzo
MAX_HEIGHT = 800, -- altezza massima del grezzo
LEN_SHORT_PART = 1200, -- lunghezza massima pezzo piccolo
MAX_RAW = 20000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET)
STD_RAW = 14000, -- lunghezza standard della barra di grezzo
OVM_HEAD = 10, -- sovramateriale testa
OVM_MID = 5.0, -- sovramateriale intermedio (spessore lama)
MIN_JOIN_S = 100, -- minima presa pinza per pezzo piccolo
MIN_JOIN_L = 450, -- minima presa pinza per pezzo grande
MINRAW_S = 930, -- minimo grezzo in coda scaricabile per sezioni piccole
MINRAW_L = 1570, -- minimo grezzo in coda scaricabile per sezioni grandi
CHAR_EXTRA_DIST = 400, -- distanza aggiuntiva per minimizzare scambi di carrelli
MAX_LEN_SCRAP = 150, -- massima lunghezza scarto di coda
MAX_LEN_SCRAP_START = 150, -- massima lunghezza scarto di testa
MAX_DIM_HTCUT = 175, -- larghezza massima taglio di testa o coda
MAX_DIM_HTCUT_HBEAM = -145, -- larghezza massima taglio di testa o coda con trave alta
MIN_DIM_HBEAM = 680, -- altezza minima di trave alta
OVM_CHAIN_HBEAM = 8, -- sovramateriale per split con sega a catena
MAX_DIM_DICE = 155, -- dimensione trasversale massima cubetto
MAX_LEN_DICE = 400, -- lunghezza massima cubetto
DECR_VERT_CUT = 20, -- riduzione profondità per affondamento verticale in taglio orizzontale
COLL_SIC = 5, -- distanza di sicurezza per collisioni
CUT_SIC = 20, -- distanza di sicurezza per tagli
CUT_EXTRA = 5, -- affondamento extra standard per tagli di lama e fresature
CUT_EXTRA_MIN = 2, -- affondamento extra ridotto per tagli di lama e fresature
NZ_MINA = -0.6, -- componente limite in Z normale di una faccia (-30deg)
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_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_OVERLAP = 5, -- sovrapposizione tra due mezze forature
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
MAX_DIST_HTFEA = 50.0, -- massima distanza di feature da testa o coda per essere considerata tale
MAX_LEN_HTFEA = 2550.0, -- massima lunghezza di feature di testa o coda
LONGCUT_ENDLEN = 1500, -- lunghezza lavoro estremi iniziale e finale
LONGCUT_MAXLEN = 4000, -- lunghezza massima sezione di taglio longitudinale
MAX_LEN_RIDGELAP_FROM_BOTTOM = 0, -- massima lunghezza ridgelap lavorabile da sotto
MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM = 0, -- massima lunghezza ridgelap lavorabile da sotto con trave alta
DIM_TO_CENTER_STRIP = 0, -- larghezza minima trave per inserimento codolo nel centro della trave; 0 = automatico
DIM_STRIP = 3, -- dimensione codolo sostegno parti lasciate su contorno libero o archi
DIM_STRIP_SMALL = 1.5, -- dimensione codolo piccolo (quando le parti sostenute sono sicuramente sulla parte sopra del pezzo)
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
RAW_OFFSET = 2000, -- spostamento grezzo rimanente dopo split
VICE_MINH = 110, -- altezza minima della morsa
OFFSET_DRILL_TENON = 0, -- offset fori su tenoni verso base degli stessi (0=non fare)
USER_HOLE_DIAM = 14, -- diametro foro per L20
MAX_TOOL_LEN_FOR_HOR_MACH = 500, -- massima lunghezza ingombro per poter fare forature (fresature) oltre i 10 gradi dalla verticale
DRILL_VZ_MIN_LONG_TOOL = 0.984, -- componente limite per lavorazioni con punta lunga
MAX_TOOL_LEN_BACK_HOR_MACH = 500, -- massima lunghezza utensile per poter eseguire lavorazioni (forature/svuotature) da dietro (faccia 4)
PRESS_ROLLER = true, -- dichiarazione presenza rulli pressori
C_SIMM = true, -- dichiarazione simmetria mensola asse C
C_SIMM_ENC = 180, -- ingombro semi-forcella in X da naso mandrino (compresa sicurezza)
KIOTP = 6, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
MAXDIAM_POCK_CORNER = 31, -- diametro massimo utensile ammesso per tasche con angoli interni
USE_LONGCUT = false, -- per i tagli longitudinali usare solo la lavorazione di lama LongCut
ADVANCE_TAIL_CUT = false, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con robabile caduta
ADVANCE_TAIL_OFFS = 10 -- accorciamento taglio di coda avanzato (minimo 1)
}
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-ONE.data"
local sData = EgtGetSourceDir().."\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
BeamData.MIN_HEIGHT = Machine.Trave.ZMIN or BeamData.MIN_HEIGHT
BeamData.MAX_WIDTH = Machine.Trave.XMAX or BeamData.MAX_WIDTH
BeamData.MAX_HEIGHT = Machine.Trave.ZMAX or BeamData.MAX_HEIGHT
end
if Machine.User then
BeamData.OFFSET_DRILL_TENON = Machine.User.L040_OFFSET_P1 or BeamData.OFFSET_DRILL_TENON
if Machine.User.OPTIMIZATIONS_ENABLE_SLICES_F5 == 1 then
BeamData.MAX_LEN_SCRAP = Machine.User.OPTIMIZATIONS_LENGTH_SLICES or BeamData.MAX_LEN_SCRAP
else
BeamData.MAX_LEN_SCRAP = 100000
end
if Machine.User.OPTIMIZATIONS_ENABLE_SLICES_F6 == 1 then
BeamData.MAX_LEN_SCRAP_START = Machine.User.OPTIMIZATIONS_LENGTH_SLICES or BeamData.MAX_LEN_SCRAP_START
else
BeamData.MAX_LEN_SCRAP_START = 100000
end
BeamData.USER_HOLE_DIAM = Machine.User.L020_DIAM_HOLE or BeamData.USER_HOLE_DIAM
end
end
end
---------------------------------------------------------------------
local function GetMaxLenRidgeLapFromBottom( dHRaw)
if dHRaw < BeamData.MIN_DIM_HBEAM then
return BeamData.MAX_LEN_RIDGELAP_FROM_BOTTOM + 0.01
else
return BeamData.MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM + 0.01
end
end
BeamData.GetMaxLenRidgeLapFromBottom = GetMaxLenRidgeLapFromBottom
---------------------------------------------------------------------
local function GetSectionCoeff( dW, dH, dL)
local SEZ_L = 80000
local SEZ_S = 20000
local LEN_SMALL = 2000
local dSez = dW * dH
if dSez <= SEZ_S then
return 0.0
elseif dSez < SEZ_L then
if dL and dL < LEN_SMALL then dSez = max( 0.6 * dSez, SEZ_S) end
local dCoeff = ( dSez - SEZ_S) / ( SEZ_L - SEZ_S)
return dCoeff
else
return 1.0
end
end
---------------------------------------------------------------------
local function GetMinJoin( dW, dH, dL)
local dCoeff = GetSectionCoeff( dW, dH, dL)
return ( 1 - dCoeff) * BeamData.MIN_JOIN_S + dCoeff * BeamData.MIN_JOIN_L
end
BeamData.GetMinJoin = GetMinJoin
---------------------------------------------------------------------
local function GetMinUnloadableRaw( dW, dH)
local dCoeff = GetSectionCoeff( dW, dH)
return BeamData.MINRAW_S + dCoeff * ( BeamData.MINRAW_L - BeamData.MINRAW_S)
end
BeamData.GetMinUnloadableRaw = GetMinUnloadableRaw
---------------------------------------------------------------------
local function GetChainSawBlockedAxis( nInd)
if nInd == 1 then
return 'A=-90'
else
return 'A=0'
end
end
BeamData.GetChainSawBlockedAxis = GetChainSawBlockedAxis
---------------------------------------------------------------------
local function GetChainSawInitAngs( vtN, vtO, nInd)
if abs( vtN:getY()) < 0.5 then
return EgtIf( vtO:getY() > 0, 'C=180', 'C=0')
else
return EgtIf( vtN:getY() > 0, 'C=180', 'C=0')
end
end
BeamData.GetChainSawInitAngs = GetChainSawInitAngs
---------------------------------------------------------------------
return BeamData
+9
View File
@@ -0,0 +1,9 @@
-- %TABLE_NAME%.lua by Egaltech s.r.l. %DATE_TIME%
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local %TABLE_NAME% = {
}
---------------------------------------------------------------------
return %TABLE_NAME%
+30
View File
@@ -0,0 +1,30 @@
-- GetTs3Data.lua by Egaltech s.r.l. 2022/04/07
-- Recupero dati da file Ts3Data.lua di macchina
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
-- Per test
--GTSD = {}
--GTSD.TS3PATH = 'Essetre-FAST\\Ts3Data.lua'
local sLog = 'GetTs3Data : ' .. GTSD.TS3PATH
EgtOutLog( sLog)
if EgtExistsFile( GTSD.TS3PATH) then
local Machine = dofile( GTSD.TS3PATH)
-- Assegno valori di interesse
Offsets = Machine.Offsets
_G.Offsets = Offsets
Trave = Machine.Trave
_G.Trave = Trave
User = Machine.User
_G.User = User
end
-- Tutto ok
GTSD.ERR = 0
EgtOutLog( ' +++ GetTs3Data completed')
+59
View File
@@ -0,0 +1,59 @@
; PIndex = Type, PName, Default, Description
; Type : d=double, l=length, s=string
[1]
Name=Offsets
1=d,PROGRESS,0,0=ONE 1=PROGRESS
2=d,MORTISER,0,ONLY_FOR_ONE
3=l,X1_NEG,-2728.0,MIN_X1
4=l,X1_POS,-650.0,MAX_X1
5=l,Z1_NEG,-1570.0,MIN_Z1
6=l,Z1_POS,-20,MAX_Z1
7=l,PARK_Z1,-535.0,PARK_Z1
8=l,PARK_SAWZ1,-150.0,---
9=d,C1_NEG,-275,MIN_C1
10=d,C1_POS,275,MAX_C1
11=d,B1_NEG,-127,MIN_B1
12=d,B1_POS,127,MAX_B1
13=d,B1_NEG1,-119,MIN_B1_SAW
14=d,B1_POS1,119,MAX_B1_SAW
15=l,PIVOT_T1,170.0,PIVOT_HEAD1
16=l,MIN_Y1,295,MIN_Y1
17=l,MAX_Y1,5712,MAX_Y1
18=l,PARK_Y1,967,PARK_Y1
19=l,MIN_V1,0.0,MIN_V1
20=l,MAX_V1,679.0,MAX_V1
21=l,MIN_Y2,-5719,MIN_Y2
22=l,MAX_Y2,-295,MAX_Y2
23=l,PARK_Y2,-974,PARK_Y2
24=l,MIN_V2,-679.0,MIN_V2
25=l,MAX_V2,0.0,MAX_V2
26=l,MIN_DELTAVY,295,MIN_DELTA_VY
27=d,CLAMP5,0,SMALL_CLAMP
28=l,MINWOPEN,38,MIN_OPEN_SMALL_CLAMP
29=l,MAXWOPEN,160,MAX_OPEN_SMALL_CLAMP
30=l,MAXWHEIGHT,305,MAX_BEAM_HEIGHT_ON_SMALL_CLAMP
31=l,DIST_FTZERO,2144.4,DIST_LASER
32=l,DELTA_CARICZERO,40.0,DELTA_LASER_LOAD
33=l,DIST_UNLOAD,-2300,DIST_UNLOAD
34=l,OFFSETXT1,-1555.3,OFFSETX_HEAD1
35=l,OFFSETZT1,-1054.4,OFFSETZ_HEAD1
36=l,OFFSETZSOTTOTRAVE,981,DELTAZ_RULLI_SOTTOTRAVE
37=l,OFFSETZTAPPETO,485,DELTAZ_RULLI_TAPPETO
38=d,OFFSETCLAMAT1,0,OFFSETCLAMA_HEAD1
39=d,OFFSETBLAMAT1,0,OFFSETBLAMA_HEAD1
[2]
Name=Trave
1=l,XMIN,50,XMIN
2=l,XMAX,401,XMAX
3=l,ZMIN,50,ZMIN
4=l,ZMAX,801,ZMAX
[3]
Name=User
1=d,OPTIMIZATIONS_ENABLE_SLICES_F5,1,ENABLE_SLICES_ON_END
2=d,OPTIMIZATIONS_ENABLE_SLICES_F6,1,ENABLE_SLICES_ON_START
3=d,OPTIMIZATIONS_LENGTH_SLICES,100,SLICES_LENGTH
4=l,L020_DIAM_HOLE,20,L020_HOLE_DIAM
5=l,L040_OFFSET_P1,0,L040_ON_TENON_OFFSET
+37
View File
@@ -0,0 +1,37 @@
[Cut]
1=HeadSide
2=TailSide
3=LongCut
[Drill]
1=Drill
2=Pocket
[Milling]
1=Prof
2=FreeContour
3=Tenon
4=DtTenon
5=DtMortise
6=BirdsMouth
7=Chamfer
8=Mark
9=Text
10=Decor01
11=Long2Cut
12=Long2CutDown
13=Long2CutSide
14=LongSmallCut
15=BHSideMill
16=CleanCorner
17=ProfTCone
18=SmallToolContour
19=AntiSplintMillCut
[Pocketing]
1=Pocket
2=OpenPocket
3=Mortise
[Sawing]
1=Sawing
+2249
View File
File diff suppressed because it is too large Load Diff
+92
View File
@@ -0,0 +1,92 @@
; Commento per evitare BOM con UTF-8
[General]
Material=Beam
NCType=2 ; 1=Tpa, 2=Num Flexium
[Axes]
; 1 = Type, Id, Name
; Type => l=linear;r=rotational
1=l,0,X
2=l,1,Y
3=l,2,Z
4=l,3,U
5=l,4,V
6=r,7,B
7=r,8,C
[Variables]
; 1 = Name, Variable Path, ReadType, Type
; ReadType => o=one time;c=continuous
; Type => plc;cn
1=Ingresso1,Application.IoConfig_Globals_Mapping.A0,c,plc
2=Ingresso2,Application.IoConfig_Globals_Mapping.A1,c,plc
3=Ingresso3,Application.IoConfig_Globals_Mapping.A2,c,plc
4=Ingresso4,Application.IoConfig_Globals_Mapping.A3,c,plc
5=P_Prod,E81295,c,cn
6=P_Machgroup,E81296,c,cn
7=P_Part,E81297,c,cn
8=P_State,E81298,c,cn
9=Reset_State,E80048,c,cn
10=Uscita1,Application.IoConfig_Globals_Mapping.E0,c,plc
11=Uscita2,Application.IoConfig_Globals_Mapping.E1,c,plc
12=Uscita3,Application.IoConfig_Globals_Mapping.E2,c,plc
13=Uscita4,Application.IoConfig_Globals_Mapping.E3,c,plc
[Tools]
Drillbit=1
Sawblade=1
Mill=1
Mortise=1
Chisel=0
DrillMaker=MakeWoodDrill.lua
SawbladeMaker=MakeSawblade.lua
MillMaker=MakeWoodCylMill.lua
MortiseMaker=MakeMortise.lua
ChiselMaker=MakeChisel.lua
Active=1
[ToolHolder]
H11.1=Standard.nge
H11.1:MILL_NOTIP=MillNoTip.nge
H12.1=Saw.nge
H13.1=ChainSaw.nge
H15.1=ChainSaw.nge
[Machinings]
Drilling=1
Sawing=1
Milling=1
Pocketing=1
Mortising=1
Chiseling=0
SawRoughing=0
SawFinishing=0
[Machining]
InitScript=InitMach.lua
ExitScript=ExitMach.lua
[Disposition]
;InitScript=InitDisp.lua
[Heads]
; 5 axis head
H11=6608
; 5 axis saw
H12=6615
; Chainsaw
H13=6616
; Chainsaw
H15=6616
[SetUp]
Default=Standard
[Estimations]
Enable=1
WinPlace=0,514,138,628,810
[VMill]
Enable=1
Save=0
+856
View File
@@ -0,0 +1,856 @@
-- Descrizione macchina Essetre-ONE by EgalTech s.r.l. 2023/02/18
-- 2021/05/18 ver 2.3e5 Prima versione (in comune con PF).
-- 2021/09/02 ver 2.3h1 Diverse correzioni per gestione carrelli con rotazione pezzo.
-- 2021/09/27 ver 2.3i2 Recupero modifiche PF1250.
-- 2021/10/14 ver 2.3j3 Recupero modifiche PF1250 + gestione pezzi medio-alti.
-- 2021/10/18 ver 2.3j6 Sistemata apertura rulli V2 (EJ=3) e V1. Modificato movimento testa/coda pezzo all'apertura pareti.
-- 2021/10/27 ver 2.3j7 Correzioni per rotazioni e per deposito sega a catena.
-- 2021/11/04 ver 2.3k1 Riportata da PF1250 correzione errore movimento carrelli in ParkRoller.
-- 2021/12/03 ver 2.3l3 Correzione per emissione posizione V2 con grande sovramateriale di testa. Aggiunte per G157.
-- 2021/12/20 ver 2.3l4 Allineamento con PF.
-- 2022/02/18 ver 2.4b3 Allineamento con PFrl.
-- 2022/02/21 ver 2.4b5 In generazione CN, con G157 gestione aperture prima di primo rapido e chiusure dopo.
-- 2022/03/03 ver 2.4c1 In generazione CN, aggiornata chiusura rulli con G157 che non li fa muovere.
-- 2022/03/04 ver 2.4c2 In generazione CN, aggiunta gestione movimento pinze rulli alla pre-rotazione.
-- 2022/03/04 ver 2.4c3 In generazione CN, per EmitZmax in OnMachiningEnd aggiunta gestione posizione precedente carrelli.
-- 2022/03/04 ver 2.4c5 In generazione CN, correzioni varie per rotazione pezzo.
-- 2022/03/08 ver 2.4c6 Riportate ultime modifiche Sidler per rotazione pezzi.
-- 2022/03/10 ver 2.4c7 In simulazione apertura paratie al carico sega a catena quando ONE vera, in generazione CN riportate modifiche da PFrl per primo rapido.
-- 2022/03/22 Mettere Zmax -20.
-- 2022/03/25 ver 2.4c8 Modificata generazione CN postrotazione con anche scambio carrelli.
-- 2022/05/03 ver 2.4e1 Si aggiorna ParkX1 al variare degli estremi di X1.
-- 2022/05/23 ver 2.4e2 In generazione CN, in OnLinear correzione impostazione EMT.L?o precedente in calcolo piano di interpolazione (non va tolto EMT.X_OFF).
-- 2022/05/28 ver 2.4e3 In simulazione movimenti iniziali con sega a catena uniformati con generazione.
-- 2022/10/24 ver 2.4j1 Correzione gestione Z di primo movimento di prima lavorazione come primo movimento di lavorazioni successive.
-- 2022/11/10 ver 2.4k1 Riportate modifiche PF.
-- 2023/02/18 ver 2.5b2 Riportato da PF gestione speciale movimento in rapido solo a inizio lavorazione (corr. #817). Aggiunto solido collisione per eventuale segacatena sotto trave.
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.5b2'
-- Parametri macchina
NumericalControl = 'NUM' -- NUM o TPA
SmallVise = false
Progress = false
Mortiser = false -- solo per One (nella Progress la stessa posizione è per ChainSaw)
MinMchY1 = 335
MaxMchY1 = 5700.0
ParkMchY1 = 960.0
MinMchY2 = -5700.0
MaxMchY2 = -335
ParkMchY2 = -975.0
MinV1 = 20.0
MaxV1 = 682.0
ParkV1 = 670.0
MinV2 = -682.0
MaxV2 = -20.0
ParkV2 = -670.0
MinDeltaYV = 280 + 0.1
ExtraParkV = 600
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
MaxY2 = MaxV2 - MinDeltaYV
MinY2 = MinMchY2
ParkY1 = ParkV1 + MinDeltaYV
ParkY2 = ParkV2 - MinDeltaYV
MaxHoOpen = 420
MaxVeOpen = 820
RollCageMin = 120
RollCageMax = 250
LoadT = 2131.2
UnloadT = -2400
MillOffs = 170.0
SawOffsX = 111.0
SawOffsY = 0
SawOffsZ = -149.5
SawC1Offs = 0
SawB1Offs = 0
ChSawLen = 94.0
MinX1 = 0
MaxX1 = 2735
MinZ1 = -1550
MaxZ1 = -20 -- per evitare problemi con striscia led
MinC1 = -275
MaxC1 = 275
MinB1 = -127
MaxB1 = 127
MinB1b = -119
MaxB1b = 119
ParkX1 = MaxX1
ParkFrnX1 = MinX1
ParkZ1 = -535
ParkC1 = 90
ParkFrnC1 = -90
ParkB1 = 90
ParkFrnB1 = -90
LimX1RotSaw = 2900
ParkCSawX1 = 1350
ParkCSawX1S = MinX1
ParkCSawZ1 = -150
ParkCSaw0Z1 = -400
ParkCSawC1 = 90
ParkCSaw0C1 = 0
ParkCSawB1 = 0
TurnerOffs = 50.0
AggLoad = 50
DeltaTabY = 1550.0
DeltaTabZ = -1060.0 -- per TPA la quota è dal centro di rotazione (va aggiunto MillOffs)
DeltaRulliTraveZ = 980
DeltaRulliTappetoZ = -485
DimTabY = 500
DimTabX = 24000
AutomaticRotation = true
AutoRotMinLen = 0
DefTcPos1 = 'T3'
CoeffVM = 0.5
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-ONE.data"
local sData = EgtGetSourceDir().."\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Offsets then
--NumericalControl = EgtIf( Machine.Offsets.TIPO_CN == 0, 'NUM', 'TPA')
if Machine.Offsets.X1_POS then MinX1 = -Machine.Offsets.X1_POS end
if Machine.Offsets.X1_NEG then MaxX1 = -Machine.Offsets.X1_NEG end
if Machine.Offsets.Z1_NEG then MinZ1 = Machine.Offsets.Z1_NEG end
if Machine.Offsets.Z1_POS then MaxZ1 = min( MaxZ1, Machine.Offsets.Z1_POS) end
if Machine.Offsets.PARK_Z1 then ParkZ1 = Machine.Offsets.PARK_Z1 end
if Machine.Offsets.C1_NEG then MinC1 = Machine.Offsets.C1_NEG end
if Machine.Offsets.C1_POS then MaxC1 = Machine.Offsets.C1_POS end
if Machine.Offsets.B1_NEG then MinB1 = Machine.Offsets.B1_NEG end
if Machine.Offsets.B1_POS then MaxB1 = Machine.Offsets.B1_POS end
if Machine.Offsets.B1_NEG1 then MinB1b = Machine.Offsets.B1_NEG1 end
if Machine.Offsets.B1_POS1 then MaxB1b = Machine.Offsets.B1_POS1 end
if Machine.Offsets.MIN_Y1 then MinMchY1 = Machine.Offsets.MIN_Y1 end
if Machine.Offsets.MAX_Y1 then MaxMchY1 = Machine.Offsets.MAX_Y1 end
if Machine.Offsets.PARK_Y1 then ParkMchY1 = Machine.Offsets.PARK_Y1 end
if Machine.Offsets.MIN_V1 then MinV1 = Machine.Offsets.MIN_V1 end
if Machine.Offsets.MAX_V1 then MaxV1 = Machine.Offsets.MAX_V1 end
if Machine.Offsets.MIN_Y2 then MinMchY2 = Machine.Offsets.MIN_Y2 end
if Machine.Offsets.MAX_Y2 then MaxMchY2 = Machine.Offsets.MAX_Y2 end
if Machine.Offsets.PARK_Y2 then ParkMchY2 = Machine.Offsets.PARK_Y2 end
if Machine.Offsets.MIN_V2 then MinV2 = Machine.Offsets.MIN_V2 end
if Machine.Offsets.MAX_V2 then MaxV2 = Machine.Offsets.MAX_V2 end
if Machine.Offsets.DIST_FTZERO then LoadT = Machine.Offsets.DIST_FTZERO end
if Machine.Offsets.DELTA_CARICZERO then TurnerOffs = Machine.Offsets.DELTA_CARICZERO end
if Machine.Offsets.MIN_DELTAVY then MinDeltaYV = Machine.Offsets.MIN_DELTAVY + 0.1 end
if Machine.Offsets.DIST_UNLOAD then UnloadT = Machine.Offsets.DIST_UNLOAD end
if Machine.Offsets.PIVOT_T1 then MillOffs = Machine.Offsets.PIVOT_T1 end
if Machine.Offsets.OFFSETCLAMAT1 then SawC1Offs= Machine.Offsets.OFFSETCLAMAT1 end
if Machine.Offsets.OFFSETBLAMAT1 then SawB1Offs= Machine.Offsets.OFFSETBLAMAT1 end
if Machine.Offsets.OFFSETXT1 then DeltaTabY = -Machine.Offsets.OFFSETXT1 end
if Machine.Offsets.OFFSETZT1 then DeltaTabZ = Machine.Offsets.OFFSETZT1 + EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
if Machine.Offsets.OFFSETZSOTTOTRAVE then DeltaRulliTraveZ = abs( Machine.Offsets.OFFSETZSOTTOTRAVE) end
if Machine.Offsets.OFFSETZTAPPETO then DeltaRulliTappetoZ = -abs( Machine.Offsets.OFFSETZTAPPETO) end
if Machine.Offsets.RIB_AUTO then AutomaticRotation = ( Machine.Offsets.RIB_AUTO == 1) end
if Machine.Offsets.PROGRESS then Progress = ( Machine.Offsets.PROGRESS == 1) end
if Machine.Offsets.MORTISER then Mortiser = ( Machine.Offsets.MORTISER == 1) end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
ParkY1 = ParkV1 + MinDeltaYV
MinY2 = MinMchY2
MaxY2 = MaxV2 - MinDeltaYV
ParkY2 = ParkV2 - MinDeltaYV
ParkV1 = min( ParkV1, MaxV1, abs( MinV2))
ParkV2 = -ParkV1
ParkX1 = MaxX1
ParkFrnX1 = MinX1
ParkCSawZ1 = min( ParkCSawZ1, MaxZ1)
ParkCSaw0Z1 = min( ParkCSaw0Z1, MaxZ1)
Mortiser = ( Mortiser and not Progress)
end
end
end
EmtGeneral {
File='Essetre-ONE.nge',
Offset = Vector3d(0.0,1360.0,-1730.0),
AxisMaxAdjust = 300,
AxisMaxRotAdj = 0.5,
ExitMaxAdjust = 300,
ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 80,
Special = 'Essetre-ONE.mlse',
Processor = 'Essetre-ONE.mlpe'}
local sBaseAux = {'BASE/SOLID', 'BASE/SIGN', 'BASE/CONVOYER', 'BASE/BELT', 'BASE/COLLISION', 'BASE/TC1'}
if Progress then
table.insert( sBaseAux, 'BASE/TC1S')
table.insert( sBaseAux, 'BASE/TC2')
table.insert( sBaseAux, 'BASE/TC3')
else
table.insert( sBaseAux, 'BASE/MTC')
if Mortiser then table.insert( sBaseAux, 'BASE/TC3') end
end
local BaseId = EmtBase {
Name = 'Base',
Geo = 'BASE/GEO',
Aux = sBaseAux}
local X1Id = EmtAxis {
Name = 'X1',
Parent = 'Base',
Token = 'X',
Type = MCH_AT.LINEAR,
Dir = Y_AX(),
Pos = Point3d(207.0,-300.0,104.0),
Stroke = {MinX1, MaxX1},
Home = ParkX1,
Invert = true,
Geo = 'X1_AXIS/GEO',
Aux = 'X1_AXIS/SOLID'}
-- *** Testa 1 ***
EmtAxis {
Name = 'Z1',
Parent = 'X1',
Token = 'Z',
Type = MCH_AT.LINEAR,
Dir = Z_AX(),
Pos = Point3d(0.0,-140.1,113.0),
Stroke = {MinZ1, MaxZ1},
Home = ParkZ1,
Geo = 'Z1_AXIS/GEO',
Aux = {'Z1_AXIS/SOLID', 'Z1_AXIS/COLLISION'}}
EmtAxis {
Name = 'C1',
Parent = 'Z1',
Token = 'C',
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d(0.0,0.0,503.0),
Stroke = {MinC1, MaxC1},
Home = ParkC1,
Geo = 'C1_AXIS/GEO',
Aux = {'C1_AXIS/SOLID', 'C1_AXIS/COLLISION'}}
EmtAxis {
Name = 'B1',
Parent = 'C1',
Token = 'B',
Type = MCH_AT.ROTARY,
Dir = X_AX(),
Pos = Point3d(-108.4,0.0,MillOffs),
Stroke = {MinB1, MaxB1},
Home = ParkB1,
Geo = 'B1_AXIS/GEO',
Aux = {'B1_AXIS/SOLID', 'B1_AXIS/COLLISION'}}
-- Frese
local H11Id = EmtHead {
Name = 'H11',
Parent = 'B1',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d(0,0,0),
TDir = Z_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB1, MaxB1},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H11_HEAD/GEO'}
EgtSetInfo( H11Id, 'ZEXTRA', '400,30,290,60,180,90')
-- Lama
local H12Id = EmtHead {
Name = 'H12',
Parent = 'B1',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d(SawOffsX,SawOffsY,SawOffsZ),
TDir = Vector3d( 0, sin( SawB1Offs), cos( SawB1Offs)),
ADir = -X_AX(),
Rot1W = 0.5,
Rot2Stroke = { MinB1b, MaxB1b},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H12_HEAD/GEO'}
EgtSetInfo( H12Id, 'ZEXTRA', '400,30,300,45,200,60,10,90')
EgtSetInfo( H12Id, 'ZMAXONROT', '1,190')
-- Dummy
EmtHead {
Name = 'H14',
Parent = 'B1',
HSet = 'H14',
Type = MCH_HT.STD,
Pos = Point3d(0,0,0),
TDir = Z_AX(),
ADir = X_AX(),
Rot1W = 0.2,
Geo = 'H14_HEAD/GEO'}
-- Sega a catena
EmtAxis {
Name = 'A',
Parent = 'B1',
Token = '**',
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d( 0, 0, 0),
Stroke = { -90.1, 90.1},
Home = 0,
Geo = 'A1_AXIS/GEO'}
local H13Id
if Progress then
H13Id = EmtHead {
Name = 'H13',
Parent = 'A',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, -ChSawLen),
TDir = -X_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
Rot2Stroke = { -90.1, 90.1},
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H15_HEAD/GEO',
Aux = 'H15_HEAD/SOLID'}
else
H13Id = EmtHead {
Name = 'H13',
Parent = 'A',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, -ChSawLen),
TDir = X_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
Rot2Stroke = { -90.1, 90.1},
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H13_HEAD/GEO',
Aux = 'H13_HEAD/SOLID'}
end
EgtSetInfo( H13Id, 'ZEXTRA', '200')
EgtSetInfo( H13Id, 'ZSAFEDELTA', '60')
EgtSetInfo( H13Id, 'ZMAXONROT', '1,80')
-- Mortasatrice sotto la traversa (solo per One)
local H15Id
if not Progress and Mortiser then
H15Id = EmtHead {
Name = 'H15',
Parent = 'A',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, -ChSawLen),
TDir = -X_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
Rot2Stroke = { -90.1, 90.1},
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H15_HEAD/GEO',
Aux = 'H15_HEAD/SOLID'}
end
-- *** Carrelli ***
-- Morse
local Y1Id = EmtAxis {
Name = 'Y1',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d(-865.7,2626.8,-866.0),
Stroke = { MinY1, MaxY1},
Home = ParkY1,
Geo = 'Y1_AXIS/GEO',
Aux = 'Y1_AXIS/SOLID'}
local PY1Id = EmtAxis {
Name = 'PY1',
Parent = 'Y1',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d(-469.6,2367.5,-751.6),
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PY1_AXIS/GEO',
Aux = 'PY1_AXIS/SOLID'}
local Y2Id = EmtAxis {
Name = 'Y2',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d(865.7,2626.8,-866.0),
Stroke = { MinY2, MaxY2},
Home = ParkY2,
Geo = 'Y2_AXIS/GEO',
Aux = 'Y2_AXIS/SOLID'}
local PY2Id = EmtAxis {
Name = 'PY2',
Parent = 'Y2',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d(469.6,2367.5,-751.6),
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PY2_AXIS/GEO',
Aux = 'PY2_AXIS/SOLID'}
-- Rulli
local V1Id = EmtAxis {
Name = 'V1',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d(-875.5,1072.0,-1509.1),
Stroke = { MinV1, MaxV1},
Home = ParkV1,
Geo = 'V1_AXIS/GEO',
Aux = {'V1_AXIS/SOLID', 'V1_AXIS/COLLISION'}}
local PV1Id = EmtAxis {
Name = 'PV1',
Parent = 'V1',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d(-194.0,2364.7,-879.1),
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PV1_AXIS/GEO',
Aux = 'PV1_AXIS/SOLID'}
local QV1Id = EmtAxis {
Name = 'QV1',
Parent = 'V1',
Type = MCH_AT.LINEAR,
Dir = Z_AX(),
Pos = Point3d(-287.0,2481.0,-943.0),
Stroke = {0, MaxVeOpen},
Home = MaxVeOpen,
Geo = 'QV1_AXIS/GEO',
Aux = 'QV1_AXIS/SOLID'}
local V2Id = EmtAxis {
Name = 'V2',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d(875.5,1072.0,-1509.1),
Stroke = { MinV2, MaxV2},
Home = ParkV2,
Geo = 'V2_AXIS/GEO',
Aux = {'V2_AXIS/SOLID', 'V2_AXIS/COLLISION'}}
local PV2Id = EmtAxis {
Name = 'PV2',
Parent = 'V2',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d(194.0,2364.7,-879.1),
Stroke = {0, MaxHoOpen},
Home = MaxHoOpen,
Geo = 'PV2_AXIS/GEO',
Aux = 'PV2_AXIS/SOLID'}
local QV2Id = EmtAxis {
Name = 'QV2',
Parent = 'V2',
Type = MCH_AT.LINEAR,
Dir = Z_AX(),
Pos = Point3d(287.0,2481.0,-943.0),
Stroke = {0, MaxVeOpen},
Home = MaxVeOpen,
Geo = 'QV2_AXIS/GEO',
Aux = 'QV2_AXIS/SOLID'}
-- *** Tavola ***
EmtAxis {
Name = 'T',
Parent = 'Base',
--Token = '**',
Type = MCH_AT.LINEAR,
Dir = - X_AX(),
Pos = Point3d(0.0,2450.0,-958.0),
Stroke = {-20000, 20000},
Home = LoadT,
Geo = 'T_AXIS/GEO'}
EmtTable {
Name = 'Tab',
Parent = 'T',
Type = MCH_TT.FLAT,
Ref1 = Point3d( - DimTabX, DeltaTabY - DimTabY, DeltaTabZ),
Geo = 'TABLE/GEO',
Aux = 'TABLE/SOLID'}
-- *** ToolChanger ***
local ptTc1 = Point3d( 150, 2890, -217 + ( DeltaTabZ + DeltaRulliTraveZ + 29))
local vtDt1 = Vector3d( 0, 0, - 102.5)
if Progress then
EmtTcPos {
Name = 'T1',
Parent = 'Base',
Pos = ptTc1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T1b'}
EmtTcPos {
Name = 'T2',
Parent = 'Base',
Pos = ptTc1 + 1 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T2'}
else
EmtTcPos {
Name = 'T1',
Parent = 'Base',
Pos = ptTc1 + Vector3d( SawOffsX, -SawOffsZ, 0),
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T1'}
end
EmtTcPos {
Name = 'T3',
Parent = 'Base',
Pos = ptTc1 + 2 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T3'}
EmtTcPos {
Name = 'T4',
Parent = 'Base',
Pos = ptTc1 + 3 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T4'}
EmtTcPos {
Name = 'T5',
Parent = 'Base',
Pos = ptTc1 + 4 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T5'}
EmtTcPos {
Name = 'T6',
Parent = 'Base',
Pos = ptTc1 + 5 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T6'}
EmtTcPos {
Name = 'T7',
Parent = 'Base',
Pos = ptTc1 + 6 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T7'}
EmtTcPos {
Name = 'T8',
Parent = 'Base',
Pos = ptTc1 + 7 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T8'}
EmtTcPos {
Name = 'T9',
Parent = 'Base',
Pos = ptTc1 + 8 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T9'}
EmtTcPos {
Name = 'T10',
Parent = 'Base',
Pos = ptTc1 + 9 * vtDt1,
TDir = -Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T10'}
if Progress then
local ptTc2 = Point3d( 150, -170, -217 + ( DeltaTabZ + DeltaRulliTraveZ + 29))
local vtDt2 = Vector3d( 0, 0, - 102.5)
EmtTcPos {
Name = 'T11',
Parent = 'Base',
Pos = ptTc2 + Vector3d( SawOffsX, SawOffsZ, 0),
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T11'}
EmtTcPos {
Name = 'T13',
Parent = 'Base',
Pos = ptTc2 + 2 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T13'}
EmtTcPos {
Name = 'T14',
Parent = 'Base',
Pos = ptTc2 + 3 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T14'}
EmtTcPos {
Name = 'T15',
Parent = 'Base',
Pos = ptTc2 + 4 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T15'}
EmtTcPos {
Name = 'T16',
Parent = 'Base',
Pos = ptTc2 + 5 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T16'}
EmtTcPos {
Name = 'T17',
Parent = 'Base',
Pos = ptTc2 + 6 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T17'}
EmtTcPos {
Name = 'T18',
Parent = 'Base',
Pos = ptTc2 + 7 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T18'}
EmtTcPos {
Name = 'T19',
Parent = 'Base',
Pos = ptTc2 + 8 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T19'}
EmtTcPos {
Name = 'T20',
Parent = 'Base',
Pos = ptTc2 + 9 * vtDt2,
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T20'}
else
local ptTc2a = Point3d( 0.5, 19.7, -216.5 + ( DeltaTabZ + DeltaRulliTraveZ + 29))
local ptTc2b = Point3d( 0.5, 199.7, -364.0 + ( DeltaTabZ + DeltaRulliTraveZ + 29))
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = ptTc2a,
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
EmtTcPos {
Name = 'T201',
Parent = 'Base',
Pos = ptTc2b,
TDir = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T201'}
end
if Progress or Mortiser then
local ptTc3 = Point3d( 480, 506.1, -200.8 + ( DeltaTabZ + DeltaRulliTraveZ + 29))
local sName = EgtIf( Progress, 'T101', 'T301')
EmtTcPos {
Name = sName,
Parent = 'Base',
Pos = ptTc3,
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T301'}
end
-- Aggiusto posizioni geometriche
local vtMovB = Vector3d( 0, 0, ( DeltaTabZ + DeltaRulliTraveZ + 80)) -- -( -1060 + 980)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SIGN') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC1') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC1S') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC2') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'MTC') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
local vtMovC = Vector3d( 0, 0, ( DeltaTabZ + DeltaRulliTappetoZ + 1545)) -- -( -1060 - 485)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'BELT'), vtMovC, GDB_RT.GLOB)
local vtMove = Vector3d( 0, ( DeltaTabY - 1550.0), ( DeltaTabZ + 1060.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( V1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PV1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( QV1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( V2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PV2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( QV2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
-- Assegno identificativi alle spie delle morse
PY1LightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PY1Id, 'SOLID') or GDB_ID.NULL, 'Light')
PY2LightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PY2Id, 'SOLID') or GDB_ID.NULL, 'Light')
---------------------------------------------------------------------
-- Funzioni richiamate per modificare i dati macchina in casi particolari
--function OnSetTable()
--end
---------------------------------------------------------------------
function OnSetHead()
-- se testa H11 (fresa) o H12 (lama)
if EMC.HEAD == 'H11' or EMC.HEAD == 'H12' then
if EMC.HEAD == 'H11' then
local dRawH = GetRawHeight()
EmtModifyAxisHome( 'Z1', ParkZ1 + EgtIf( dRawH > 650, 235, 0))
EmtModifyAxisDirection( 'B1', X_AX())
else
EmtModifyAxisHome( 'Z1', ParkZ1)
EmtModifyAxisDirection( 'B1', Vector3d( cos( SawC1Offs), -sin( SawC1Offs), 0))
end
local nPos = tonumber( string.sub( EMC.TCPOS, 2)) or 0
if nPos <= 10 then
EmtModifyAxisHome( 'X1', ParkX1)
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyAxisHome( 'B1', ParkB1)
else
EmtModifyAxisHome( 'X1', ParkFrnX1)
EmtModifyAxisHome( 'C1', ParkFrnC1)
EmtModifyAxisHome( 'B1', ParkFrnB1)
end
-- se testa H13 (sega a catena)
elseif EMC.HEAD == 'H13' then
-- recupero valore asse A bloccato
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
local CSawPosA = tonumber( sVal:sub( 3) or '')
EmtModifyAxisHome( 'X1', ParkCSawX1)
EmtModifyAxisHome( 'Z1', GetChainSawZHomeFromVirtualAxis( CSawPosA))
EmtModifyAxisHome( 'C1', GetChainSawCHomeFromVirtualAxis( CSawPosA))
EmtModifyAxisHome( 'B1', ParkCSawB1)
-- se testa H15 (mortasatrice di One)
elseif EMC.HEAD == 'H15' then
error( 'Error : Mortiser not yet managed')
end
end
---------------------------------------------------------------------
-- Funzione che restituisce l'altezza del pezzo in lavorazione
function GetRawHeight()
local nRawId = EgtGetFirstRawPart()
if not nRawId then
local vLnkRawId = EmtGetAllLinkedRawParts()
if vLnkRawId and #vLnkRawId >0 then nRawId = vLnkRawId[1] end
end
local b3Raw = EgtGetRawPartBBox( nRawId or GDB_ID.NULL)
if not b3Raw or b3Raw:isEmpty() then return 0 end
return b3Raw:getDimZ()
end
---------------------------------------------------------------------
-- Funzione che riconosce testa per sega a catena
function HeadIsChainSaw( sHead)
return ( sHead == 'H13' or sHead == 'H15')
end
---------------------------------------------------------------------
-- Funzione che calcola la posizione Home di Z per la sega a catena dal valore dell'asse virtuale
function GetChainSawZHomeFromVirtualAxis( dPosA)
-- se A=0 -> T101 -> HomeZ = -400
if abs( dPosA) < 0.1 then
return ParkCSaw0Z1
-- altrimenti A=-90 -> T102 o A=90 -> T104 -> HomeZ = -100
else
return ParkCSawZ1
end
end
---------------------------------------------------------------------
-- Funzione che calcola l'angolo Home di C per la sega a catena dal valore dell'asse virtuale
function GetChainSawCHomeFromVirtualAxis( dPosA)
-- se A=0 -> T101 -> HomeC = 0
if abs( dPosA) < 0.1 then
return ParkCSaw0C1
-- altrimenti A=-90 -> T102 -> HomeC = 90
elseif abs( dPosA + 90) < 0.1 then
return 90
-- altrimenti A=90 -> T104 -> HomeC = -90
elseif abs( dPosA - 90) < 0.1 then
return -90
end
end
---------------------------------------------------------------------
-- Funzione che ritorna ZExtra partendo dalla testa e dall'angolo verticale
function GetZExtra( sHead, dAngV)
if sHead == 'H11' then
if abs( dAngV) < 30.1 then
return 400
elseif abs( dAngV) < 45.1 then
return 300
elseif abs( dAngV) < 60.1 then
return 200
elseif abs( dAngV) < 90.1 then
return 10
else
return 0
end
elseif sHead == 'H12' then
if abs( dAngV) < 30.1 then
return 400
elseif abs( dAngV) < 45.1 then
return 300
elseif abs( dAngV) < 60.1 then
return 200
elseif abs( dAngV) < 90.1 then
return 10
else
return 0
end
end
end
---------------------------------------------------------------------
-- Funzione per impostare spia stato morsa carrello Y1
function SetPY1Light( bClosed)
if not PY1LightId then return end
EgtSetColor( PY1LightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then
EgtSetInfo( PY1LightId, 'On', '1')
else
EgtRemoveInfo( PY1LightId, 'On')
end
end
---------------------------------------------------------------------
-- Funzione per leggere lo stato della morsa carrello Y1
function GetPY1Light()
if not PY1LightId then return false end
return ( EgtGetInfo( PY1LightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per impostare spia stato morsa carrello Y2
function SetPY2Light( bClosed)
if not PY2LightId then return end
EgtSetColor( PY2LightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then
EgtSetInfo( PY2LightId, 'On', '1')
else
EgtRemoveInfo( PY2LightId, 'On')
end
end
---------------------------------------------------------------------
-- Funzione per leggere lo stato della morsa carrello Y2
function GetPY2Light()
if not PY2LightId then return false end
return ( EgtGetInfo( PY2LightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine()
EmtUnlinkAllRawPartsFromGroups()
EmtUnlinkAllFixturesFromGroups()
SetPY1Light( false)
SetPY2Light( false)
-- nascondo Vmill
local nRawId = EgtGetFirstRawPart()
while nRawId do
local nVmId = EgtGetFirstNameInGroup( nRawId, 'VMill')
local nId = EgtGetFirstInGroup( nRawId)
while nId do
EgtSetStatus( nId, EgtIf( nId ~= nVmId, GDB_ST.ON, GDB_ST.OFF))
nId = EgtGetNext( nId)
end
nRawId = EgtGetNextRawPart( nRawId)
end
EgtSetStatus( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill') or GDB_ID.NULL, GDB_ST.OFF)
end
+2002
View File
File diff suppressed because it is too large Load Diff
+2665
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+36
View File
@@ -0,0 +1,36 @@
-- 2018/11/21 17:30:00
-- Machining Exit for Essetre-FAST machine
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
--------------------------------------------------------------------------------
-- *** Uscita da Lavorazioni ***
-- Nascondo il pezzo così marcato e le geometrie aggiunte, visualizzo il Box
local function ProcessPart( PartId)
-- visualizzo il Box
EgtSetStatus( EgtGetFirstNameInGroup( PartId, 'Box') or GDB_ID.NULL, GDB_ST.ON)
end
-- Disabilito segnalazione modifica progetto
local bEnMod = EgtGetEnableModified()
EgtDisableModified()
-- Processo i pezzi nella radice (già chiusi tutti i gruppi di lavoro)
local PartId = EgtGetFirstPart()
while PartId do
ProcessPart( PartId)
PartId = EgtGetNextPart( PartId)
end
EgtZoom( SCE_ZM.ALL, false)
-- Ripristino segnalazione modifica progetto
if bEnMod then
EgtEnableModified()
end
MACH.ERR = 0
+44
View File
@@ -0,0 +1,44 @@
-- 2018/11/21 16:30:00
-- Machining Init for Essetre-FAST machine
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
--------------------------------------------------------------------------------
-- *** Ingresso in Lavorazioni ***
-- Rendo visibile il pezzo e le geometrie aggiunte, nascondo il Box
local function ProcessPart( PartId)
-- nascondo il Box
EgtSetStatus( EgtGetFirstNameInGroup( PartId, 'Box') or GDB_ID.NULL, GDB_ST.OFF)
end
-- Disabilito segnalazione modifica progetto
local bEnMod = EgtGetEnableModified()
EgtDisableModified()
-- Processo i pezzi nella radice
local PartId = EgtGetFirstPart()
while PartId do
ProcessPart( PartId)
PartId = EgtGetNextPart( PartId)
end
-- Processo i pezzi già nei gruppi di lavoro (quando appena lanciata Process)
local GhostId = EgtGetFirstGhostPart()
while GhostId do
local PartId = EgtGetInfo( GhostId, GDB_SI.SOURCE, 'i')
if PartId then
ProcessPart( PartId)
end
GhostId = EgtGetNextGhostPart( GhostId)
end
-- Ripristino segnalazione modifica progetto
if bEnMod then
EgtEnableModified()
end
MACH.ERR = 0
+228
View File
@@ -0,0 +1,228 @@
-- 2021/06/10
-- Gestione attrezzaggio per Essetre-PF
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
-- Tavola di passaggio valori
local STU = {}
STU.TUUID = ""
STU.TCPOS = ""
STU.HEAD = ""
STU.GROUP = ""
STU.POS = ""
STU.EXIT = 0
STU.INDEX = 0
STU.HEAD1 = ""
STU.HEAD2 = ""
STU.ISVALID = false
STU.ERR = 0
_G.STU = STU
local INVALIDPOS = ""
local POS = "Pos"
-- Geom Set
local GS = {}
-- Configurazione posizioni (con o senza TC2)
local PositionTable = {}
-- se Progress
if EgtGetTcPosId( 'T11') then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H11", Group = "G1"},
{Pos = "Pos2", TcPos = "T2", Head = "H11", Group = "G1"},
{Pos = "Pos3", TcPos = "T3", Head = "H11", Group = "G1"},
{Pos = "Pos4", TcPos = "T4", Head = "H11", Group = "G1"},
{Pos = "Pos5", TcPos = "T5", Head = "H11", Group = "G1"},
{Pos = "Pos6", TcPos = "T6", Head = "H11", Group = "G1"},
{Pos = "Pos7", TcPos = "T7", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T8", Head = "H11", Group = "G1"},
{Pos = "Pos9", TcPos = "T9", Head = "H11", Group = "G1"},
{Pos = "Pos10", TcPos = "T10", Head = "H11", Group = "G1"},
{Pos = "Pos11", TcPos = "T11", Head = "H12", Group = "G2"},
{Pos = "Pos12", TcPos = "T13", Head = "H11", Group = "G2"},
{Pos = "Pos13", TcPos = "T14", Head = "H11", Group = "G2"},
{Pos = "Pos14", TcPos = "T15", Head = "H11", Group = "G2"},
{Pos = "Pos15", TcPos = "T16", Head = "H11", Group = "G2"},
{Pos = "Pos16", TcPos = "T17", Head = "H11", Group = "G2"},
{Pos = "Pos17", TcPos = "T18", Head = "H11", Group = "G2"},
{Pos = "Pos18", TcPos = "T19", Head = "H11", Group = "G2"},
{Pos = "Pos19", TcPos = "T20", Head = "H11", Group = "G2"},
{Pos = "Pos20", TcPos = "T101", Head = "H13", Group = "G3"}}
-- altrimenti One
else
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"},
{Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"},
{Pos = "Pos3", TcPos = "T4", Head = "H11", Group = "G1"},
{Pos = "Pos4", TcPos = "T5", Head = "H11", Group = "G1"},
{Pos = "Pos5", TcPos = "T6", Head = "H11", Group = "G1"},
{Pos = "Pos6", TcPos = "T7", Head = "H11", Group = "G1"},
{Pos = "Pos7", TcPos = "T8", Head = "H11", Group = "G1"},
{Pos = "Pos8", TcPos = "T9", Head = "H11", Group = "G1"},
{Pos = "Pos9", TcPos = "T10", Head = "H11", Group = "G1"},
{Pos = "Pos10", TcPos = "T101", Head = "H13", Group = "G2"},
{Pos = "Pos11", TcPos = "T201", Head = "H11", Group = "G2"}}
-- mortasatrice sotto la traversa
if EgtGetTcPosId( 'T301') then
table.insert( PositionTable, {Pos = "Pos12", TcPos = "T301", Head = "H15", Group = "G3"})
end
end
local UsePositionHead = true
local function IsInGeomSet( ToolHead, PosHead)
for GsIndex = 1, #GS do
local bToolHead = false
local bPosHead = false
for HIndex = 1, #GS[GsIndex] do
if GS[GsIndex][HIndex] == ToolHead then
bToolHead = true
elseif GS[GsIndex][HIndex] == PosHead then
bPosHead = true
end
if bToolHead and bPosHead then
return true
end
end
if bToolHead and bPosHead then
return true
end
end
return false
end
function STU.IsCompatibleHeads()
STU.ISVALID = false
if IsInGeomSet(STU.HEAD1, STU.HEAD2) then
STU.ISVALID = true
else
STU.ISVALID = false
end
end
function STU.GetValidHeadExitForPos()
-- se TUUID non valido restituisco errore
local ToolName = EgtTdbGetToolFromUUID( STU.TUUID)
if ToolName == nill then
STU.ERR = 1
return
end
EgtTdbSetCurrTool( ToolName)
local CurrToolHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
STU.EXIT = EgtTdbGetCurrToolParam( MCH_TP.EXIT)
-- recupero testa predefinita per la posizione corrente
local CurrPosHead
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
CurrPosHead = PositionTable[i].Head
break
end
end
-- verifico se la testa è quella della posizione predefinita
if CurrPosHead == CurrToolHead then
STU.HEAD = CurrToolHead
STU.ERR = 0
return
-- verifico se la testa è compatibile con quella della posizione predefinita
elseif IsInGeomSet( CurrToolHead, CurrPosHead) then
if UsePositionHead then
STU.HEAD = CurrPosHead
STU.ERR = 0
return
else
STU.HEAD = CurrToolHead
STU.ERR = 0
return
end
-- la testa non è compatibile con quella della posizione predefinita
else
STU.HEAD = INVALIDPOS
STU.ERR = 0
return
end
end
function STU.IsValidTcPosFromHead()
STU.ISVALID = false
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
if PositionTable[i].Head == STU.HEAD then
STU.ISVALID = true
STU.ERR = 0
return
elseif IsInGeomSet(PositionTable[i].Head, STU.HEAD) then
STU.ISVALID = true
STU.ERR = 0
return
end
STU.ISVALID = false
STU.ERR = 0
return
end
end
end
function STU.GetTcPosHeadGroupFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.TCPOS = PositionTable[i].TcPos
STU.HEAD = PositionTable[i].Head
STU.GROUP = PositionTable[i].Group
STU.ERR = 0
return
end
end
STU.TCPOS = INVALIDPOS
STU.HEAD = INVALIDPOS
STU.GROUP = INVALIDPOS
STU.ERR = 1
end
function STU.GetPosFromTcPos()
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
STU.POS = PositionTable[i].Pos
STU.ERR = 0
return
end
end
STU.POS = INVALIDPOS
STU.ERR = 1
end
function STU.GetGroupFromTcPos()
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
STU.GROUP = PositionTable[i].Group
STU.ERR = 0
return
end
end
STU.GROUP = INVALIDPOS
STU.ERR = 1
end
function STU.GetHeadFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.HEAD = PositionTable[i].Head
STU.ERR = 0
return
end
end
STU.HEAD = INVALIDPOS
STU.ERR = 1
end
function STU.GetTcPosFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.TCPOS = PositionTable[i].TcPos
STU.ERR = 0
return
end
end
STU.TCPOS = INVALIDPOS
STU.ERR = 1
end
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.