- Prima versione funzionante (DA VALIDARE!)

- Allineamento con common 2.6k1
- Pezzo massimo a 30metri
- Aggiunta aggregato foratore multiplo 6 uscite
This commit is contained in:
andrea.villa
2024-11-19 15:08:16 +01:00
parent 54f453c079
commit 31404c02bc
11 changed files with 463 additions and 281 deletions
+138 -60
View File
@@ -5,8 +5,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6j1'
PP_NVER = '2.6.10.1'
PP_VER = '2.6k2'
PP_NVER = '2.6.11.2'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF1500MAXrl-3T'
@@ -77,7 +77,7 @@ Mill3Offs = 163.0
MinX1 = 0
MaxX1 = 4750
MinZ1 = -1850
MaxZ1 = -50
MaxZ1 = 0
MaxZ1Blade = -100
MinC1 = -275
MaxC1 = 275
@@ -113,13 +113,18 @@ MinZ1ToChangeH2 = -1400
MinZ3 = -1550
MaxZ3 = 0
MinX3 = 0
MaxX3 = 3300
MaxX3 = 4000
MinC3 = -181
MaxC3 = 181
MinB3 = 0
MaxB3 = 180
ParkX3 = 0
ParkZ3 = 0
ParkC3 = 0
ParkB3 = 0
MinX2 = -2760
SafeX3RotAxis = 1300
SafeZ3RotAxis = -600
MinX2 = -3060
MaxX2 = 0
MinZ2 = 0
MaxZ2 = 1450
@@ -148,7 +153,7 @@ DeltaTabY = 1915.5
DeltaTabZ = -1491.0 + MillOffs -- per TPA : -1228.0 + MillOffs -- per NUM : -1058.0
DeltaRulliTraveZ = -1266
DimTabY = 1600
DimTabX = 24000
DimTabX = 30000
Delta2TabY = -2907.4
Delta2TabZ = 693.0 - Mill2Offs -- per TPA : 543.0 - Mill2Offs -- per NUM : 373.0
Delta3TabY = 1915.5
@@ -165,9 +170,11 @@ CoeffVM = 0.5
MinForzaPinze = 400 -- [Kgf]
MaxForzaPinze = 1000 -- [Kgf]
Tc2Active = true
FirstSaw = false
SecondSaw = true
SecondChain = true -- magazzino seconda sega a catena
TcSpecialTools = true -- magarzzino per utensili speciali. In genere truciolatore
TcSpecialTools = true -- magazzino per utensili speciali. In genere truciolatore
DrillingAggregate = true -- aggregato foratura multipla dipende dal magazzino utensili speciali. Viene montato li
TcAggreBladeUnder = true -- lama su aggregato per testa da sotto
EmitAccClamps = true
WriteAllCoordsOnFirstM101 = true
@@ -185,7 +192,7 @@ if EgtExistsFile( sTs3Data) then
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if false and EgtExistsFile( sDataBeam) then
if EgtExistsFile( sDataBeam) then
local Machine = dofile( sDataBeam)
if Machine then
if Machine.Offsets then
@@ -267,7 +274,7 @@ if false and EgtExistsFile( sDataBeam) then
if Machine.Offsets.MAXPRESS then MaxForzaPinze = Machine.Offsets.MAXPRESS end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.MOTORS23KW then Motors23KW = Machine.Offsets.MOTORS23KW end
if Machine.Offsets.MOTORS23KW then Motors23KW = Machine.Offsets.MOTORS23KW == 1 end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
@@ -279,7 +286,7 @@ if false and EgtExistsFile( sDataBeam) then
ParkV2 = MinV2
ParkY2 = ParkV2 - MinDeltaYV
UnloadSmT = UnloadT - 300
MaxZ1Blade = min( MaxZ1Blade, MaxZ1)
MaxZ1Blade = min( MaxZ1Blade, -100)
ParkX1 = EgtClamp( ParkX1, MinX1, MaxX1)
ParkTc1X1 = EgtClamp( ParkTc1X1, MinX1, MaxX1)
ParkZ1 = EgtClamp( ParkZ1, MinZ1, MaxZ1)
@@ -380,19 +387,21 @@ local H11Id = EmtHead {
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H11_HEAD/GEO'}
-- 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, 'ZMAXONROT', '1,190')
if FirstSaw then
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, 'ZMAXONROT', '1,190')
end
-- Lama 2
if SecondSaw then
local H16Id = EmtHead {
@@ -435,6 +444,35 @@ local H13Id = EmtHead {
Geo = 'H13_HEAD/GEO'}
EgtSetInfo( H13Id, 'ZSAFEDELTA', '60')
EgtSetInfo( H13Id, 'ZMAXONROT', '1,80')
-- Eventuale rinvio angolare
if DrillingAggregate then
local H14Id = EmtHead {
Name = 'H14',
Parent = 'A1',
HSet = 'H11',
Type = MCH_HT.MULTI,
ExitNbr = 6,
Pos1 = Point3d( 0, 0, -206),
TDir1 = Z_AX(),
Pos2 = Point3d( -40, 0, -206),
TDir2 = Z_AX(),
Pos3 = Point3d( -80, 0, -206),
TDir3 = Z_AX(),
Pos4 = Point3d( 40, 0, -206),
TDir4 = Z_AX(),
Pos5 = Point3d( 80, 0, -206),
TDir5 = Z_AX(),
Pos6 = Point3d( 120, 0, -206),
TDir6 = Z_AX(),
ADir = X_AX(),
Rot1W = 0.2,
Rot2Stroke = { -91, 90},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H14_HEAD/GEO',
Aux = {'H14_HEAD/SOLID', 'H14_HEAD/COLLISION'}}
end
-- *** Testa 3 ***
local X3Id = EmtAxis {
Name = 'X3',
@@ -442,7 +480,7 @@ local X3Id = EmtAxis {
Token = 'X',
Type = MCH_AT.LINEAR,
Dir = Y_AX(),
Pos = Point3d( -163, 0, 109.0),
Pos = Point3d( 207, -300, 104),
Stroke = {MinX3, MaxX3},
Home = ParkX3,
Invert = true,
@@ -454,7 +492,7 @@ local Z3Id = EmtAxis {
Token = 'Z',
Type = MCH_AT.LINEAR,
Dir = Z_AX(),
Pos = Point3d( 0, 0, -140),
Pos = Point3d( 0, -140, 563),
Stroke = {MinZ3, MaxZ3},
Home = ParkZ3,
Geo = 'Z3_AXIS/GEO',
@@ -466,7 +504,7 @@ local C3Id = EmtAxis {
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d( Head3X+163, Head3Y, 503.0),
Stroke = {-181, 1},
Stroke = {MinC3, MaxC3},
Home = 0,
Geo = 'C3_AXIS/GEO',
Aux = {'C3_AXIS/SOLID', 'C3_AXIS/COLLISION'}}
@@ -492,16 +530,17 @@ EgtMove( EgtGetFirstNameInGroup( B3Id, 'SOLID'), vtMoveZ3, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( B3Id, 'COLLISION'), vtMoveZ3, GDB_RT.GLOB)
-- Frese
local H31Id = EmtHead {
Name = 'H31',
Name = 'H38',
Parent = 'B3',
HSet = 'H31',
HSet = 'H38',
Type = MCH_HT.STD,
Pos = Point3d( Head3X, Head3Y, Head3Z),
TDir = X_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB1, MaxB1},
Rot2Stroke = {MinB3, MaxB3},
OthColl = {'B3/SOLID', 'C3/SOLID'},
Geo = 'H31_HEAD/GEO'}
Geo = 'H38_HEAD/GEO'}
-- *** Testa 2 ***
local Z2Id = EmtAxis {
Name = 'Z2',
@@ -711,7 +750,7 @@ EmtAxis {
Type = MCH_AT.LINEAR,
Dir = - X_AX(),
Pos = Point3d(0.0,2450.0,-958.0),
Stroke = {-20000, 20000},
Stroke = {-30000, 30000},
Home = LoadT,
Geo = 'T_AXIS/GEO'}
EmtTable {
@@ -722,12 +761,12 @@ EmtTable {
Geo = 'TABLE/GEO',
Aux = 'TABLE/SOLID'}
-- *** ToolChanger ***
local ptTc1 = Point3d( 150, 351, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc1 = Point3d( 150, 351, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
local vtDt1 = Vector3d( 0, 0, - 102.5)
EmtTcPos {
Name = 'T1',
Parent = 'Base',
Pos = ptTc1 + Vector3d( SawOffsX, SawOffsZ, 0),
Pos = ptTc1 + EgtIf( FirstSaw, Vector3d( SawOffsX, SawOffsZ, 0), V_NULL()),
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T1'}
@@ -817,7 +856,7 @@ EmtTcPos {
Geo = 'BASE/T13'}
if Tc2Active then
local ptTc2 = Point3d( 150, 5018.75, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc2 = Point3d( 150, 5018.75, -221 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
local vtDt2 = Vector3d( 0, 0, - 102.5)
EmtTcPos {
Name = 'T21',
@@ -890,7 +929,7 @@ if Tc2Active then
ADir = X_AX(),
Geo = 'BASE/T30'}
end
local ptTc3 = Point3d( 600, 1031, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc3 = Point3d( 600, 1031, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T101',
Parent = 'Base',
@@ -898,7 +937,7 @@ EmtTcPos {
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
local ptTc4 = Point3d( 750, 1411, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc4 = Point3d( 750, 1411, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T111',
Parent = 'Base',
@@ -906,15 +945,28 @@ EmtTcPos {
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111'}
local ptTc5 = Point3d( 750, 1811, -115 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTc5 = Point3d( 750, 1811, -321 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T121',
Parent = 'Base',
Pos = ptTc5,
TDir = Z_AX(),
Type = MCH_HT.MULTI,
ExitNbr = 6,
Pos1 = ptTc5 + Vector3d( 0, 0, 0),
TDir1 = Z_AX(),
Pos2 = ptTc5 + Vector3d( -40, 0, 0),
TDir2 = Z_AX(),
Pos3 = ptTc5 + Vector3d( -80, 0, 0),
TDir3 = Z_AX(),
Pos4 = ptTc5 + Vector3d( 40, 0, 0),
TDir4 = Z_AX(),
Pos5 = ptTc5 + Vector3d( 80, 0, 0),
TDir5 = Z_AX(),
Pos6 = ptTc5 + Vector3d( 120, 0, 0),
TDir6 = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T121'}
local ptTcS = Point3d( -1, 369.75, -1675 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
Geo = 'BASE/T121',
Aux = 'BASE/T121_HS'}
local ptTcS = Point3d( -1, 369.75, -1675 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T201',
Parent = 'Base',
@@ -922,7 +974,7 @@ EmtTcPos {
TDir = -Z_AX(),
ADir = Y_AX(),
Geo = 'BASE/T201'}
local ptTcR = Point3d( -0.5, 5202, -1973 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) + vtOffset23KW
local ptTcR = Point3d( -0.5, 5202, -1973 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T220',
Parent = 'Base',
@@ -1003,22 +1055,23 @@ EmtTcPos {
-- Aggiusto posizioni geometriche
local vtMovB = Vector3d( 0, 0, ( DeltaTabZ - DeltaRulliTraveZ + 55))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SOLID'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SIGN') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC1') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC2') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB) end
if SecondChain then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB + vtOffset23KW, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'COLLISION'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
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, 'TC2') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
if SecondChain then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'T121') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'COLLISION'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Z1Id, 'SOLID'), vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Z1Id, 'COLLISION'), vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'SOLID'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'COLLISION'), vtMovB + vtOffset23KW, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X3Id, 'COLLISION'), vtMovB, GDB_RT.GLOB)
local vtMove = Vector3d( 0, ( DeltaTabY - 1915.5), ( DeltaTabZ + 1321.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'..sGeomConvoyer), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
@@ -1115,6 +1168,8 @@ function OnSetHead()
else
EmtModifyAxisStroke( 'B2', {MinB2, MaxB2})
end
elseif EMC.HEAD == 'H38' then
;
end
end
@@ -1136,10 +1191,12 @@ end
---------------------------------------------------------------------
function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H14' or sHead == 'H16' then
return 1
elseif sHead == 'H21' or sHead == 'H22' then
return 2
elseif sHead == 'H39' or sHead == 'H38' then
return 3
else
return 0
end
@@ -1173,7 +1230,21 @@ function GetHeadSetFromTcPos( sTcPos)
end
return 0, 0
end
---------------------------------------------------------------------
-- Funzione che ritorna bool per dire se esiste o meno al testa richiesta
function IsHeadExisting( nHeadSet)
if nHeadSet == 1 then
return H11Id ~= nil
elseif nHeadSet == 2 then
return H21Id ~= nil
elseif nHeadSet == 3 then
return H31Id ~= nil
else
return ''
end
end
---------------------------------------------------------------------
-- Funzione che ritorna il nome della testa in base alla posizione utensile (ATT: deve rispecchiare il setup)
function GetAdjHeadFromTcPos( nHeadSet, sTcPos)
@@ -1183,7 +1254,11 @@ function GetAdjHeadFromTcPos( nHeadSet, sTcPos)
return 'H16'
-- utensili speciali
elseif TcSpecialTools and sTcPos == 'T121' then
return 'H11'
if DrillingAggregate then
return 'H14'
else
return 'H11'
end
-- motoseghe
elseif sTcPos == 'T101' or sTcPos == 'T111' then
return 'H13'
@@ -1200,7 +1275,7 @@ function GetAdjHeadFromTcPos( nHeadSet, sTcPos)
return 'H21'
end
elseif nHeadSet == 3 then
return 'H31'
return 'H38'
else
return ''
end
@@ -1303,6 +1378,9 @@ function GetZExtra( sHead, dAngV)
else
return 0
end
-- altri casi
else
return 0
end
end