Compare commits

...

1 Commits

4 changed files with 18 additions and 66 deletions
+1 -1
View File
@@ -1925,7 +1925,7 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut)
EmitResetMachining()
end
-- se testa 1
if EMT.HEAD ~= 'H21' and EMT.HEAD ~= 'H22' then
if EMT.HEAD ~= 'H21' then
-- posizioni sicure
local dMaxZ1 = EgtGetAxisMax( 'Z1')
local dSafeX1 = EgtGetAxisHomePos( 'X1')
+4 -23
View File
@@ -408,19 +408,6 @@ function OnSimulToolSelect( dPosA)
-- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end
-- se lama su aggregato da sotto, imposto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H22' then
-- valore dell'asse virtuale
dPosA = dPosA or GetNextSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
EgtSetAxisPos( 'A2', dPosA)
-- imposto home dell'asse C1 (A=0 -> T101, A=90 -> T104)
local MyParkSawC2 = GetSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkSawC2)
EgtSetAxisPos( 'C2', MyParkSawC2)
-- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end
-- carico utensile, con breve pausa
EgtPause( 100)
EgtOutText( '')
@@ -1662,13 +1649,7 @@ function LoadFirstTool( nHSet, sTcPosDef)
sHead = EgtIf( sTcPos == 'T1', 'H12', 'H11')
end
else
-- lama su aggregato da sotto
if sTcPos == 'T201' then
sHead = 'H22'
-- utensili standard da sotto
else
sHead = 'H21'
end
sHead = 'H21'
end
end
end
@@ -2092,7 +2073,7 @@ end
function GetHeadSet( sHead)
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
elseif sHead == 'H21' then
return 2
else
return 0
@@ -2223,7 +2204,7 @@ function GetNextSawingVirtualAxis( MchId)
NextMchId = EgtGetNextActiveOperation( NextMchId)
end
-- verifico sia un taglio o fresatura con lama su aggregato da sotto
if EgtGetOperationType( NextMchId) ~= MCH_OY.MILLING and EgtGetOperationType( NextMchId) ~= MCH_OY.SAWING and EMT.HEAD ~= 'H22' then
if EgtGetOperationType( NextMchId) ~= MCH_OY.MILLING and EgtGetOperationType( NextMchId) ~= MCH_OY.SAWING then
return nil
end
-- la imposto come lavorazione corrente
@@ -2252,7 +2233,7 @@ end
function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2)
if sHead == 'H11' or sHead == 'H14' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
elseif sHead == 'H21' or sHead == 'H22' then
elseif sHead == 'H21' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
end
end
+1 -28
View File
@@ -126,7 +126,6 @@ Tc2Active = true -- magazzino prima sega a caten
SecondSaw = true -- seconda lama su aggregato su TC3 presente
SecondChain = true -- magazzino seconda sega a catena
TcSpecialTools = true -- magarzzino per utensili speciali. In genere truciolatore
TcAggreBladeUnder = true -- lama su aggregato per testa da sotto
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250.data"
@@ -228,7 +227,7 @@ local sBaseAux = {'BASE/SOLID', 'BASE/CONVOYER', 'BASE/COLLISION', 'BASE/TC1', '
if Tc2Active then table.insert( sBaseAux, 5, 'BASE/TC2') end
if TcSpecialTools then table.insert( sBaseAux, 'BASE/TC4') end
if SecondChain then table.insert( sBaseAux, 'BASE/TC5') end
if TcAggreBladeUnder then table.insert( sBaseAux, 'BASE/TCS') end
local BaseId = EmtBase {
Name = 'Base',
Geo = 'BASE/GEO',
@@ -450,23 +449,6 @@ local H21Id = EmtHead {
Geo = 'H21_HEAD/GEO'}
EgtSetInfo( H21Id, 'ABOVE', '0')
EgtSetInfo( H21Id, 'ZHOMEDOWN', '1')
-- Lama
if TcAggreBladeUnder then
local H22Id = EmtHead {
Name = 'H22',
Parent = 'A2',
HSet = 'H21',
Type = MCH_HT.STD,
Pos = Point3d( SawUnderOffsX+Head2X, SawUnderOffsY+Head2Y, SawUnderOffsZ+Head2Z),
TDir = Vector3d( 0, sin( SawUnderB2Offs), -cos( SawUnderB2Offs)),
ADir = Y_AX(),
Rot1W = 0.5,
Rot2Stroke = { MinB2b, MaxB2b},
OthColl = {'B2/SOLID', 'C2/SOLID'},
Geo = 'H22_HEAD/GEO'}
EgtSetInfo( H22Id, 'ZEXTRA', '160,60')
EgtSetInfo( H22Id, 'ZMAXONROT', '1,190')
end
-- *** Carrelli ***
-- Morse
local Y1Id = EmtAxis {
@@ -781,14 +763,6 @@ EmtTcPos {
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111'}
local ptTcS = Point3d( -1, -22.3, -1723 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T201',
Parent = 'Base',
Pos = ptTcS + EgtIf( TcAggreBladeUnder, Vector3d( 0, SawUnderOffsY, SawUnderOffsZ), V_NULL()),
TDir = -Z_AX(),
ADir = Y_AX(),
Geo = 'BASE/T201'}
local ptTcR = Point3d( -0.5, 4115, -1871.15 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T220',
@@ -879,7 +853,6 @@ EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.G
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
local vtMove = Vector3d( 0, ( DeltaTabY - 2750.0), ( DeltaTabZ + 1258.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'), vtMove, GDB_RT.GLOB)
+12 -14
View File
@@ -33,9 +33,8 @@ local bTc2Active = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC2') ~= ni
local SecondSaw = ( EgtGetHeadId( 'H16') ~= nil)
local SecondChain = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC5') ~= nil)
local TcSpecialTools = ( EgtGetHeadId( 'H14') ~= nil)
local TcAggreBladeUnder = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TCS') ~= nil)
local bFullOpt = bTc2Active and SecondSaw and SecondChain and TcSpecialTools and TcAggreBladeUnder -- se ha tutti gli optional attivati
local bFullOpt = bTc2Active and SecondSaw and SecondChain and TcSpecialTools -- se ha tutti gli optional attivati
if bFullOpt then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"}, -- TC 1
{Pos = "Pos2", TcPos = "T2", Head = "H11", Group = "G1"},
@@ -63,18 +62,17 @@ if bFullOpt then
{Pos = "Pos24", TcPos = "T28", Head = "H11", Group = "G3"},
{Pos = "Pos25", TcPos = "T29", Head = "H11", Group = "G3"},
{Pos = "Pos26", TcPos = "T30", Head = "H11", Group = "G3"},
{Pos = "Pos27", TcPos = "T201", Head = "H22", Group = "G4"}, -- lama con aggregatop da sotto
{Pos = "Pos28", TcPos = "T220", Head = "H21", Group = "G4"}, -- TC margherita
{Pos = "Pos29", TcPos = "T221", Head = "H21", Group = "G4"},
{Pos = "Pos30", TcPos = "T222", Head = "H21", Group = "G4"},
{Pos = "Pos31", TcPos = "T223", Head = "H21", Group = "G4"},
{Pos = "Pos32", TcPos = "T224", Head = "H21", Group = "G4"},
{Pos = "Pos33", TcPos = "T225", Head = "H21", Group = "G4"},
{Pos = "Pos34", TcPos = "T226", Head = "H21", Group = "G4"},
{Pos = "Pos35", TcPos = "T227", Head = "H21", Group = "G4"},
{Pos = "Pos36", TcPos = "T228", Head = "H21", Group = "G4"},
{Pos = "Pos37", TcPos = "T229", Head = "H21", Group = "G4"},
{Pos = "Pos38", TcPos = "T230", Head = "H21", Group = "G4"}}
{Pos = "Pos27", TcPos = "T220", Head = "H21", Group = "G4"}, -- TC margherita
{Pos = "Pos28", TcPos = "T221", Head = "H21", Group = "G4"},
{Pos = "Pos29", TcPos = "T222", Head = "H21", Group = "G4"},
{Pos = "Pos30", TcPos = "T223", Head = "H21", Group = "G4"},
{Pos = "Pos31", TcPos = "T224", Head = "H21", Group = "G4"},
{Pos = "Pos32", TcPos = "T225", Head = "H21", Group = "G4"},
{Pos = "Pos33", TcPos = "T226", Head = "H21", Group = "G4"},
{Pos = "Pos34", TcPos = "T227", Head = "H21", Group = "G4"},
{Pos = "Pos35", TcPos = "T228", Head = "H21", Group = "G4"},
{Pos = "Pos36", TcPos = "T229", Head = "H21", Group = "G4"},
{Pos = "Pos37", TcPos = "T230", Head = "H21", Group = "G4"}}
elseif bTc2Active then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"},
{Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"},