Compare commits

...

3 Commits

Author SHA1 Message Date
andrea.villa 502a4a1de6 Piccole modifiche simulazione se prima lavorazione con motosega 2024-12-04 08:17:24 +01:00
andrea.villa a9c4f72a8a - In simulazione, non si carica mai la motosega come primo utensile
- corretto calcolo per apertura rulliere
- posizione parcheggio asse C con motosega portato a +90
2024-12-03 14:46:13 +01:00
andrea.villa 510e9f026a - Piccole correzioni alla simulazione
- Quota rotazione sicurezza assi rotanti portato a 1600
2024-12-03 09:13:18 +01:00
3 changed files with 33 additions and 12 deletions
+7 -4
View File
@@ -738,9 +738,12 @@ function OnRapid()
local MyMaxZ1 = EgtGetAxisMax( 'Z1')
-- in caso di rotazione della lama lontano dalla posizione di home degli assi rotanti
local bXSpec = EgtIf( BD.RIGHT_LOAD, ( EMT.L2 > -DeltaTabY), ( EMT.L2 < -DeltaTabY))
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, EMT.L2), Z=MyMaxZ1, S=Speed})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
-- se non è aggregato, posso preselezionare testa e andare in posizione
if EMT.HEAD ~= 'H13' and EMT.HEAD ~= 'H14' then
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, EMT.L2), Z=MyMaxZ1, S=Speed})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
-- se necessario allargo le cabine
if RollerParkingNeeded( EMT.HEAD, PrevR1, PrevR2, EMT.R1, EMT.R2) or
@@ -2494,7 +2497,7 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome, bUsePrev
-- salgo in Z sicurezza raddrizzando la B
local dSafeZ1 = EgtIf( EMT.TTOTLEN < MinLengthLongCSaw, ParkCSawZ1, ParkLongCSawZ1)
EmitMoveDataHead( 1, { Z=dSafeZ1, B=dHomeB1, Fmt=1})
EmitMoveDataHead( 1, { X=-dHomeX1, C=dHomeC1, Fmt=1})
EmitMoveDataHead( 1, { X=-ParkX1, C=dHomeC1, Fmt=1})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
+21 -3
View File
@@ -181,6 +181,12 @@ function OnSimulDispositionStarting()
EgtSetAxisPos( 'T', ParkT)
end
end
-- sulla prima fase dichiaro carico barra
if EMT.PHASE == 1 then
EMT.LOAD = true
else
EMT.LOAD = false
end
end
---------------------------------------------------------------------
@@ -474,6 +480,10 @@ function OnSimulToolSelect( dPosA)
end
-- se sega a catena, imposto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H13' then
-- se prima lavorazioen con motosega, parto dalla sua posizione di parcheggio
if EMT.LOAD then
EgtSetAxisPos( 'X1', ParkCSawX1)
end
-- valore dell'asse virtuale
dPosA = dPosA or GetNextChainSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
@@ -552,8 +562,9 @@ function OnSimulToolDeselect( dPrevA)
-- se devo deselezionare testa 3, la mando a parcheggio
if nSetHead == 3 then
SimulMoveAxis( 'X3', ParkX3, MCH_SIM_STEP.RAPID)
end
-- per testa gruppo 2
elseif nNextSetHead == 2 then
if nNextSetHead == 2 then
-- deposito lama su aggregato testa sotto
if EMT.PREVHEAD_H2 == 'H22' then
-- simulo movimento
@@ -659,7 +670,7 @@ function OnSimulToolDeselect( dPrevA)
-- simulo movimento
SimulMoveAxes( 'B1', ParkCSawB1, MCH_SIM_STEP.RAPROT, 'C1', EgtGetAxisHomePos( 'C1'), MCH_SIM_STEP.RAPROT)
SimulMoveAxes( 'X1', ParkCSawX1, MCH_SIM_STEP.RAPID, 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID)
-- prendo utensile sega a catena
-- prendo aggregato multi drill
elseif EMT.NEXTHEAD == 'H14' then
-- simulo movimento
SimulMoveAxes( 'B1', ParkMultiDrillB1, MCH_SIM_STEP.RAPROT, 'C1', EgtGetAxisHomePos( 'C1'), MCH_SIM_STEP.RAPROT)
@@ -902,6 +913,9 @@ function OnSimulPathStartAux()
EMT.Y1DELTA = nil
ExecMovePY1( false)
end
if EMT.LOAD then
EMT.LOAD = false
end
end
---------------------------------------------------------------------
@@ -2039,6 +2053,10 @@ function LoadFirstTool( nHSet, sTcPosDef)
EgtUnloadTool( EgtIf( nHSet == 1, 'H11', 'H21'), 1)
if GetHeadSetFromTcPos( sTcPosDef) ~= nHSet then return end
local sTool, sHead, sTcPos, sTTotLen, sTotDiam, sBlockedAxis = FindFirstToolOnHeadSet( nHSet)
-- se primo utensile motosega, non lo carico e visualizzo quello di default
if sHead == 'H13' then
sTool = nil
end
if not sTool then
local vTools = EgtGetToolsInCurrSetupPos( sTcPosDef)
if vTools and vTools[1] then
@@ -2645,7 +2663,7 @@ function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2)
elseif sHead == 'H21' or sHead == 'H22' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
elseif sHead == 'H38' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
return ( abs( dAng1 - dAng1p) > 1 or abs( dAng2 - dAng2p) > 1)
end
end
+5 -5
View File
@@ -5,7 +5,7 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6k2_DEV3'
PP_VER = '2.6k2_DEV6'
PP_NVER = '2.6.11.2'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF1500MAXrl-3T'
@@ -94,7 +94,7 @@ ParkB1 = -90
ParkCSawX1 = 1700
ParkCSawZ1 = -100
ParkCSaw0Z1 = -400
ParkCSawC1 = -90
ParkCSawC1 = 90
ParkCSaw0C1 = 0
ParkCSawB1 = 0
MinLengthLongCSaw = 580 -- gestione speciale per motosega molto lunga. Lunghezza al di sopra della quale e' considerata motosega lunga
@@ -127,8 +127,8 @@ ParkX3 = 0
ParkZ3 = 0
ParkC3 = 0
ParkB3 = 0
SafeX3RotAxis = 1300
SafeZ3RotAxis = -600
SafeX3RotAxis = 1600
SafeZ3RotAxis = -530
MinX2 = -3060
MaxX2 = 0
MinZ2 = 0
@@ -1113,7 +1113,7 @@ function OnSetHead()
EmtModifyAxisHome( 'X1', ParkTc2X1)
end
EmtModifyAxisStroke( 'Z1', {MinZ1, MaxZ1})
if EMC.TOTLEN < LongTool then
if EMC.TOTLEN and EMC.TOTLEN < LongTool then
EmtModifyAxisHome( 'Z1', ParkZ1)
EmtModifyAxisStroke( 'C1', {MinC1, MaxC1})
EmtModifyAxisHome( 'C1', ParkC1)