Compare commits

...

5 Commits

Author SHA1 Message Date
andrea.villa 2300b6a148 Prima versione ufficiale pubblicata 2024-12-13 17:20:51 +01:00
andrea.villa fd58976c44 Merge remote-tracking branch 'origin/develop' 2024-12-13 17:20:16 +01:00
andrea.villa 6bbd572b5b - Versione utilizzata per accettazione del 12/12
- Allineamento con common ver. 2.6l1
2024-12-13 17:19:49 +01:00
andrea.villa 36636a9d80 Controllo esistenza terzo asse ausiliario 2024-12-11 17:07:48 +01:00
andrea.villa 97da4097f5 Corretta gestione asse ausiliario per posizione 121, non esiste più in quanto si montano utensili normali e nmon aggregati 2024-12-11 15:59:09 +01:00
5 changed files with 124 additions and 60 deletions
+81 -52
View File
@@ -885,11 +885,12 @@ function OnRapid()
else
-- selezione testa (posso muovere X solo a Zmax)
local MaxZ3 = EgtGetAxisMax( 'Z3')
local MyParkX3 = EgtGetAxisHomePos( 'X3')
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
EmitMoveDataHead( 3, { X=EMT.L2, Z=MaxZ3, B=ParkB3, C=ParkC3, S=Speed})
EmitMoveDataHead( 3, { X=MyParkX3, Z=MaxZ3, B=ParkB3, C=ParkC3, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=MaxZ3, S=Speed})
EmitMoveDataHead( 3, { X=MyParkX3, Z=MaxZ3, S=Speed})
end
EmitMoveStartHead( 3)
EmitMoveWaitHead( 3)
@@ -921,7 +922,9 @@ function OnRapid()
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
if ( EMT.L3 - SafeZ3RotAxis) > 100 * GEO.EPS_SMALL then
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
end
EmitMoveDataHead( 3, { X=EMT.L2, S=Speed})
end
-- muovo in posizione finale
@@ -1262,7 +1265,9 @@ function OnRapid()
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
if ( EMT.L3 - SafeZ3RotAxis) > 100 * GEO.EPS_SMALL then
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
end
EmitMoveDataHead( 3, { X=EMT.L2, S=Speed})
end
end
@@ -2302,44 +2307,53 @@ function AdjustTcPos( bLen3, sTcPos, dAxR3)
end
if sPos == '101' then
if not dAxR3 then dAxR3 = EMT.R3 end
if abs( dAxR3 - 0) < 0.1 then
sPos = '101'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '102'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '103'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '104'
else
EmtSetLastError( 1210, 'Chain saw orientation not allowed')
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
sPos = '101'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '102'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '103'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '104'
else
EmtSetLastError( 1210, 'Tool T101 orientation not allowed')
end
end
end
if sPos == '111' then
if not dAxR3 then dAxR3 = EMT.R3 end
if abs( dAxR3 - 0) < 0.1 then
sPos = '111'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '112'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '113'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '114'
else
EmtSetLastError( 1210, 'Chain saw orientation not allowed')
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
sPos = '111'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '112'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '113'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '114'
else
EmtSetLastError( 1210, 'Tool T111 orientation not allowed')
end
end
end
if sPos == '121' then
if not dAxR3 then dAxR3 = EMT.R3 end
if abs( dAxR3 - 0) < 0.1 then
sPos = '121'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '122'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '123'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '124'
else
EmtSetLastError( 1210, 'MultiDrill orientation not allowed')
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
sPos = '121'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '122'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '123'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '124'
else
EmtSetLastError( 1210, 'Tool T121 orientation not allowed')
end
end
end
if sPos == '201' then
@@ -2504,6 +2518,15 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome, bUsePrev
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
-- se ho degli aggregati e la prossima è la testa 3, scarico e prendo utensile di default
local nNextTopHSet = GetNextTopHSet( EMT.MCHID)
if IsHeadExisting( 3) and nNextTopHSet == 3 and ( EMT.TCPOS == 'T101' or EMT.TCPOS == 'T111' or EMT.TCPOS == 'T121') then
-- lascio la motosega a parcheggio. In caso di utilizzo della testa 3, la motosega viene scaricata automaticamente dalla macro.
local sDefToolToLoad = AdjustTcPos( false, DefTcPos1)
EmitMoveDataHead( 1, { X=-ParkX1, TPos=sDefToolToLoad, Fmt=1})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
-- se altrimenti testa 2
elseif nSetHead == 2 then
-- posizioni sicure
@@ -2788,26 +2811,32 @@ function PreselectNextDiffHead( nMchId, sHead)
end
-- altrimenti (testa 3)
else
-- se preselezione testa 1
if nNextHSet == 1 then
local nNextTc = GetTcForTopHeadTool( sNextTcPos) -- utensile da caricare
local nPrevTc = GetTcForTopHeadTool( EMT.PREVTCPOS_H1) -- utensile da depositare
-- se devo lasciare o prelevare da TC1 oppure non so cosa c'è montato, non posso preselezionare
if nNextTc == 1 or nPrevTc == 1 or nPrevTc == 0 then return
-- TC su montante sinistro
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
-- se preselezione testa 1
if nNextHSet == 1 then
local nNextTc = GetTcForTopHeadTool( sNextTcPos) -- utensile da caricare
local nPrevTc = GetTcForTopHeadTool( EMT.PREVTCPOS_H1) -- utensile da depositare
-- se devo lasciare o prelevare da TC1 oppure non so cosa c'è montato, non posso preselezionare
if nNextTc == 1 or nPrevTc == 1 or nPrevTc == 0 then return
-- TC su montante sinistro
else
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
end
-- se preselezione testa 2
else
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
end
-- se preselezione testa 2
else
-- se agregato lama speciale non preseleziono mai
if sNextHead == 'H22' or EMT.PREVHEAD_H2 == 'H22' then return end
-- se la Z di lavoro è più bassa del cambio utensili, verifico quota X (la nostra Y)
if EMT.MAXMIN[3] < MinZ1ToChangeH2 then
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
-- se agregato lama speciale non preseleziono mai
if sNextHead == 'H22' or EMT.PREVHEAD_H2 == 'H22' then return end
-- se la Z di lavoro è più bassa del cambio utensili, verifico quota X (la nostra Y)
if EMT.MAXMIN[3] < MinZ1ToChangeH2 then
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
end
end
-- se gruppo lama dedicato, senza cambio utensile non si preseleziona mai
elseif EgtGetHeadId( 'H38') then
return
end
end
+20 -4
View File
@@ -633,14 +633,28 @@ function OnSimulToolDeselect( dPrevA)
-- nascondo l'utensile sulla testa
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
end
-- se passo da testa 1 a 3 o viceversa
-- se passo da testa 1 a 3 scarico aggregato
if nNextSetHead == 3 then
-- deposito eventuale sega a catena
if EMT.PREVHEAD_H1 == 'H13' then
-- deposito utensile prelevato da posizioni speciali
if EMT.TCPOS == 'T101' or EMT.TCPOS == 'T111' or EMT.TCPOS == 'T121' then
-- visualizzo utensile su TcPos
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
-- nascondo l'utensile sulla testa
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
local sTool, sTcPos, sHead
local vTools = EgtGetToolsInCurrSetupPos( DefTcPos1)
if vTools and vTools[1] then
sTool = vTools[1]
sTcPos = DefTcPos1
sHead = GetAdjHeadFromTcPos( 1, sTcPos)
end
-- carico l'utensile
EgtLoadTool( sHead, 1, sTool)
ShowToolInTcPos( DefTcPos1, false)
EMT.PREVTOOL_H1 = sTool
EMT.PREVHEAD_H1 = sHead
EMT.PREVTCPOS_H1 = DefTcPos1
end
SimulMoveAxis( 'X1', ParkX1, MCH_SIM_STEP.RAPID)
end
@@ -1128,7 +1142,9 @@ function OnSimulMoveStart()
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
SimulMoveAxis( 'Z3', SafeZ3RotAxis, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B3', EMT.R2, MCH_SIM_STEP.COLLROT, 'C3', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'Z3', EMT.L3, MCH_SIM_STEP.RAPID)
if ( EMT.L3 - SafeZ3RotAxis) > 100 * GEO.EPS_SMALL then
SimulMoveAxis( 'Z3', EMT.L3, MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'X3', EMT.L2, MCH_SIM_STEP.RAPID)
end
end
+3 -3
View File
@@ -5,8 +5,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6k2_DEV9'
PP_NVER = '2.6.11.2'
PP_VER = '2.6l1'
PP_NVER = '2.6.12.1'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF1500MAXrl-3T'
@@ -93,7 +93,7 @@ ParkTc1X1 = 800
ParkZ1 = -525
ParkC1 = -90
ParkB1 = -90
ParkCSawX1 = 1700
ParkCSawX1 = 2500
ParkCSawZ1 = -100
ParkCSaw0Z1 = -400
ParkCSawC1 = -90
+19
View File
@@ -1,5 +1,24 @@
==== Common_PF1250 Update Log ====
Versione 2.6l1 (13/12/2024)
- (SIM) Gestione caricamento utensili in caso di testa con uscita multipla.
- (SIM) Corretto errore di collisione per errata simulazione cambio utensile da lama a motosega.
- (SIM-GEN) Corretta gestione in caso di prima lavorazione con motosega.
- (GEN) Non si fa preselezione della testa 3
- (GEN) Corretta emissione coordinata rotazione testa 3 in zona sicura
- (SIM-GEN) A fine barra, testa 3 sempre in home
- (GEN) Controllo esistenza terzo asse ausiliario
- (GEN) Corretto primo movimento in X quando si parte con testa 3. Ticket#2216
- (GEN) Se su testa 1 c'è un aggregato e si utilizzerà la testa 3, si pscarica aggregato e si prende utensile di default. Ticket#2222
- (GEN) Durante utilizzo della testa 3, non si preselezionano altre teste. Ticket#2220
- (SIM-GEN) Se lavorazione con testa dedicata lama e su testa 1 c'era aggregato, viene scaricato. Ticket#2216
Versione 2.6k3 (26/11/2024)
- (GEN) Corretta modifica fatta in versione 2.6k2. Ticket#2183
Versione 2.6k2 (25/11/2024)
- (GEN) Se si preseleziona su testa 1 un utensile lungo, non si va alla X successiva di lavoro ma si resta in home. Infatti potrebbe toccare le paratie in caso di scambio pezzo. Ticket#2183
Versione 2.6k1 (04/11/2024)
- (SIM-GEN) Gestione terza testa 5 assi dedicata lama (H38)
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '2.6k1', -- versione script
VERSION = '2.6l1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}