Compare commits

...

15 Commits

Author SHA1 Message Date
andrea.villa e6e0c3118e Cambio versione per rilascio a cliente 2026-02-13 08:21:16 +01:00
andrea.villa b1103550fa UnloadOnLoadPos trasformata da globale a locale 2026-02-13 08:20:54 +01:00
andrea.villa 9be7a2c081 Scarico al carico se viene settato valore 1 o -1 2026-02-12 15:45:58 +01:00
andrea.villa 084bf57416 Cambio nome nota per decidere se scarico pezzo lato scarico o lato carico 2026-02-12 11:59:09 +01:00
daniele.nicoli a1c8505868 Aggiornata versione 2026-02-11 17:19:07 +01:00
daniele.nicoli 6238241446 Merge branch 'Test/Scarico_al_carico' into develop 2026-02-11 17:18:10 +01:00
daniele.nicoli ff036cd017 - Modifica scarico al carico con variabile globale nel file mlde.
- Corretta generazione con M77.
2026-02-11 17:16:08 +01:00
luca.mazzoleni 6e8b1ab97d - correzione BeamData USE_PART_OFFSET 2026-02-11 10:26:46 +01:00
luca.mazzoleni f69c4259c3 - in BeamData aggiunto USE_PART_OFFSET per abilitare lettura PARTOFFSET da btl 2026-02-11 10:03:57 +01:00
daniele.nicoli 6be500cf38 Prime modifiche di test per scarico al carico 2026-02-10 11:36:51 +01:00
andrea.villa 85944dc2da Cambio versione 2026-02-10 10:11:02 +01:00
daniele.nicoli 8ac8d2d2c2 Merge manuale tra scarico in linea e Common 2026-02-05 15:52:19 +01:00
daniele.nicoli a1a4f230ae Allineamento a Common 3.1a2 e cambio versione 2026-01-30 15:04:30 +01:00
daniele.nicoli db6c8c0689 - Modifica delle quote a cui portare la trave durante lo scarico pezzo in linea
- Aggiunta gestione del piano ferma pezzo durante lo scarico pezzo in linea.
2026-01-30 15:01:14 +01:00
daniele.nicoli 60bc26fc3c - Aggiunta gestione trave in linea con scarico lineare da variabile globale in mlde che può essere impostato a valore minimo della trave da scaricare
- Aggiunta visualizzazione dello scarico in linea e ottimizzata quella normale
- Allineato approccio in simulazione a generazione in caso di lavorazione in doppio verticale
2026-01-22 10:04:59 +01:00
7 changed files with 236 additions and 39 deletions
+4 -2
View File
@@ -73,10 +73,11 @@ local BeamData = {
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda
ADVANCE_TAIL_CUT = true, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con robabile caduta
ADVANCE_TAIL_OFFS = 5, -- accorciamento taglio di coda avanzato (minimo 1)
ADVANCE_TAIL_OFFS = 5, -- accorciamento taglio di coda avanzato (minimo 1)
DOUBLE_HEAD_DOVETAIL = true, -- flag abilitazione lavorazione mortase a coda di rondine in doppio
DOUBLE_HEAD_MORTISE = true, -- flag abilitazione lavorazione mortase in doppio
DOUBLE_HEAD_DRILLING = true -- flag abilitazione forature in doppio
DOUBLE_HEAD_DRILLING = true, -- flag abilitazione forature in doppio
USE_PART_OFFSET = false -- flag abilitazione lettura PART_OFFSET da btl
}
---------------------------------------------------------------------
@@ -116,6 +117,7 @@ if EgtExistsFile( sDataBeam) then
if Machine.Offsets.SECONDSAW then SecondSaw = ( Machine.Offsets.SECONDSAW == 1) end
BeamData.USE_LONGCUT = SecondSaw or BeamData.USE_LONGCUT
if Machine.Offsets.CUT_SIC then BeamData.CUT_SIC = EgtClamp( Machine.Offsets.CUT_SIC, 15, 50) end
if Machine.Offsets.USE_PART_OFFSET then BeamData.USE_PART_OFFSET = ( Machine.Offsets.USE_PART_OFFSET == 1) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
+75 -12
View File
@@ -32,6 +32,10 @@ function OnStart()
EMT.MAXACC = MaxAcc or 6000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
EMT.MINACC = MinAcc or 600 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
SetToParkLine() -- si inizia con linee da parcheggiare su stack
-- se il pezzo dev'essere scaricato al carico
local dUnloadType = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'UNLOAD', 'd')
EMT.UNLOAD = dUnloadType == 1 or dUnloadType == -1
end
---------------------------------------------------------------------
@@ -289,13 +293,22 @@ function OnDispositionEnd()
-- altrimenti disposizione finale, eventuale scarico pezzo lavorato se non ci sono lavorazioni
else
if #EMT.MDCHAR > 0 then
EmitRemark( 'PART UNLOAD')
if EMT.AUXTYPE == 'R' and EMT.UNLOAD then
EmitRemark( 'PART UNLOAD ON LOAD POSITION')
else
EmitRemark( 'PART UNLOAD')
end
end
for i = 1, #EMT.MDCHAR do
EmitMoveDataChars( EMT.MDCHAR[i])
if EMT.MDCHAR[i].Y1 then EMT.CHY_ON = true end
if EMT.MDCHAR[i].V1 then EMT.V1POS = EMT.MDCHAR[i].V1 end
if EMT.MDCHAR[i].V2 then EMT.V2POS = EMT.MDCHAR[i].V2 end
-- Se è un'istruzione del piano ferma pezzo
if EMT.MDCHAR[i].StopBeamStat then
EmitStopBeam( EMT.MDCHAR[i])
else
EmitMoveDataChars( EMT.MDCHAR[i])
if EMT.MDCHAR[i].Y1 then EMT.CHY_ON = true end
if EMT.MDCHAR[i].V1 then EMT.V1POS = EMT.MDCHAR[i].V1 end
if EMT.MDCHAR[i].V2 then EMT.V2POS = EMT.MDCHAR[i].V2 end
end
end
if #EMT.MDCHAR > 0 then
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
@@ -311,6 +324,9 @@ function OnDispositionEnd()
local sEnd= 'M113 P1='..tostring( EMT.PRODID)..' P2='..tostring( EMT.PATTID)..' P3='..tostring( EMT.CUTID)..' P4=2'
MyOutput( sEnd)
end
if EMT.UNLOAD then
MyOutput('M77')
end
end
EMT.MDCHAR = {}
EMT.AUXTYPE = nil
@@ -489,6 +505,10 @@ function OnMachiningEnd()
elseif EMT.AUXTYPE == 'U' then
EmitRemark( 'PART UNLOAD')
elseif EMT.AUXTYPE == 'P' then
local nNextPathId
local nNextMchId
if EMT.PATHID then nNextPathId = EgtGetNextActiveOperation( EMT.PATHID) end
if EMT.MCHID then nNextMchId = EgtGetNextActiveOperation( EMT.MCHID) end
if EMT.PREROT then
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
@@ -500,6 +520,10 @@ function OnMachiningEnd()
EMT.TO_ZMAX = nil
end
EmitRemark( 'PART FALL')
elseif EMT.UNLOAD and not nNextPathId and not nNextMchId then
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EmitRemark( 'PART UNLOAD ON LOAD POSITION')
else
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
@@ -508,7 +532,12 @@ function OnMachiningEnd()
end
end
for i = 1, #EMT.MDCHAR do
EmitMoveDataChars( EMT.MDCHAR[i])
-- Se è un'istruzione del piano ferma pezzo
if EMT.MDCHAR[i].StopBeamStat then
EmitStopBeam( EMT.MDCHAR[i])
else
EmitMoveDataChars( EMT.MDCHAR[i])
end
end
if #EMT.MDCHAR > 0 then
if EMT.AUXTYPE == 'S' then
@@ -538,6 +567,7 @@ function OnMachiningEnd()
local sEnd= 'M113 P1='..tostring( EMT.PRODID)..' P2='..tostring( EMT.PATTID)..' P3='..tostring( EMT.CUTID)..' P4=2'
MyOutput( sEnd)
end
EMT.FALL = nil
elseif not EMT.PREROT then
MyOutput( 'M77')
end
@@ -2063,17 +2093,41 @@ function PrepareUnload( sCmd, nInd)
-- non interessa
elseif Cmd[1] == '1' then
if Cmd[2] == 'Y2' then
-- se non è ultima fase e non è fase successiva a scarico su carico c'è una barra sulla pinza Y1
local bBarOnY = ( EMT.PHASE < EgtGetPhaseCount() and not IsEnd2Phase( EMT.PHASE))
local MDChar = { Y2=tonumber(Cmd[3]), V2=ParkV2, IniStatY2=1, FinStatY2=-84, BeamVise=EgtIf( bBarOnY, 1, 0), MovType=EgtIf( EMT.CHY_ON, 3, 2)}
table.insert( EMT.MDCHAR, MDChar)
-- Se scarico in linea con abbassamento piano ferma pezzo allo scarico
if Cmd[4] == 'UnBrakeBeam' then
-- Muove carrello aperto e lo chiude
local MDChar = { Y2=tonumber(Cmd[3]), V2=ParkV2, IniStatY2=1, FinStatY2=-1, BeamVise=EgtIf( bBarOnY, 1, 0), MovType=EgtIf( EMT.CHY_ON, 3, 2)}
table.insert( EMT.MDCHAR, MDChar)
-- Abbassa ferma pezzo
local MDStopBeam = { StopBeamStat=2}
table.insert( EMT.MDCHAR, MDStopBeam)
-- Se non è ultima fase e non è fase successiva a scarico su carico c'è una barra sulla pinza Y1
else
local nFinStatY2 = EgtIf( Cmd[4] == 'NoWaitUnload', -84, -1)
local MDChar = { Y2=tonumber(Cmd[3]), V2=ParkV2, IniStatY2=1, FinStatY2=nFinStatY2, BeamVise=EgtIf( bBarOnY, 1, 0), MovType=EgtIf( EMT.CHY_ON, 3, 2)}
table.insert( EMT.MDCHAR, MDChar)
end
end
elseif Cmd[1] == '2' then
if Cmd[4] == 'Y2' then
-- se non è ultima fase c'è una barra sulla pinza Y1
local bBarOnY = ( EMT.PHASE < EgtGetPhaseCount() and not IsEnd2Phase( EMT.PHASE))
local MDChar = { Y2=tonumber(Cmd[5]), IniStatY1=EgtIf( bBarOnY, -1, 1), FinStatY1=EgtIf( bBarOnY, -1, 1), IniStatY2=-1, FinStatY2=1, IniStatV2=1, BeamVise=2, MovType=EgtIf( EMT.CHY_ON, 3, 2)}
table.insert( EMT.MDCHAR, MDChar)
-- Se scarico in linea con alzata piano ferma pezzo allo scarico
if Cmd[6] == 'BrakeBeam' then
-- Muove carrello e lo mantiene in presa
local MDChar = { Y2=tonumber(Cmd[5]), IniStatY1=EgtIf( bBarOnY, -1, 1), FinStatY1=EgtIf( bBarOnY, -1, 1), IniStatY2=-1, FinStatY2=-1, IniStatV2=1, BeamVise=2, MovType=EgtIf( EMT.CHY_ON, 3, 2)}
table.insert( EMT.MDCHAR, MDChar)
-- Alza ferma pezzo
local MDStopBeam = { StopBeamStat=1}
table.insert( EMT.MDCHAR, MDStopBeam)
-- Ribadisce le quote del carrello appena mosso e Apre la pinza
MDChar = { Y2=tonumber(Cmd[5]), IniStatY1=EgtIf( bBarOnY, -1, 1), FinStatY1=EgtIf( bBarOnY, -1, 1), IniStatY2=-1, FinStatY2=1, IniStatV2=1, BeamVise=2, MovType=EgtIf( EMT.CHY_ON, 3, 2)}
table.insert( EMT.MDCHAR, MDChar)
-- se non è ultima fase c'è una barra sulla pinza Y1
else
local MDChar = { Y2=tonumber(Cmd[5]), IniStatY1=EgtIf( bBarOnY, -1, 1), FinStatY1=EgtIf( bBarOnY, -1, 1), IniStatY2=-1, FinStatY2=1, IniStatV2=1, BeamVise=2, MovType=EgtIf( EMT.CHY_ON, 3, 2)}
table.insert( EMT.MDCHAR, MDChar)
end
end
elseif Cmd[1] == '3' then
-- non interessa
@@ -3025,6 +3079,15 @@ function EmitMoveWaitHead( nHead)
MyOutput( sOut)
end
---------------------------------------------------------------------
-- Emette i movimenti di esecuzione movimenti trave e alzata o discesa del piano ferma pezzo
function EmitStopBeam( MoData)
EmitMoveStartChars(2)
EmitMoveWaitChars(2)
if MoData.StopBeamStat then sOut = 'M125 P2=' .. EgtNumToString( MoData.StopBeamStat, 0) end
MyOutput( sOut)
end
---------------------------------------------------------------------
function EmitMoveDataChars( MoData)
local sOut = 'M111'
+28 -3
View File
@@ -1302,6 +1302,12 @@ function OnSimulMoveStart()
local sErr = 'Z1 Z2 tools in collision (distance=' .. EgtNumToString( dDistToolZ1Z2, 1) .. ')'
EmtSetLastError( 1208, sErr)
end
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local B2Home = EgtGetAxisHomePos( 'B2')
local C2Home = EgtGetAxisHomePos( 'C2')
SimulMoveAxes( 'X2', SafeX2, MCH_SIM_STEP.RAPID, 'C2', C2Home, MCH_SIM_STEP.RAPROT, 'B2', B2Home, MCH_SIM_STEP.RAPROT)
SimulMoveAxis( 'X2', X2, MCH_SIM_STEP.RAPID)
end
end
end
-- se necessario ...
@@ -1741,17 +1747,36 @@ function ExecUnloading()
local vMillId = EMT.VMILL[1]
-- gruppo dei Vmill
local nVmGrpId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill')
local sUnloadType = ''
local sUnloadTypeOld = ''
local vtMove = Vector3d( 0, 0, 0)
local vtMoveOldElements = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.HB + 50.0), -( EMT.HB + 50.0)), 0)
-- Se scarico in linea
if MinBeamLenUnloadInLine and EMT.LT >= MinBeamLenUnloadInLine then
sUnloadType = 'LINE'
vtMove = Vector3d( EgtIf( BD.RIGHT_LOAD, -MinBeamLenUnloadInLine, MinBeamLenUnloadInLine), EgtIf( BD.RIGHT_LOAD, ( EMT.HB + 50.0), -( EMT.HB + 50.0)), 0)
else
if EMT.FALL then
sUnloadType = 'FALL'
vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 3200, -2600), -1150)
else
sUnloadType = 'STD'
vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 1600, -1600), 0)
end
end
-- li sposto per lasciare spazio al nuovo pezzo
local nId = EgtGetFirstInGroup( nVmGrpId)
while nId do
EgtMove( nId, Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.HB + 50.0), -( EMT.HB + 50.0)), 0), GDB_RT.GLOB)
sUnloadTypeOld = EgtGetInfo( nId, 'UNLOAD_TYPE')
if sUnloadTypeOld == sUnloadType then
EgtMove( nId, vtMoveOldElements, GDB_RT.GLOB)
end
nId = EgtGetNext( nId)
end
-- creo un nuovo layer e vi inserisco il nuovo pezzo
local nLayId = EgtGroup( nVmGrpId, EgtGetGlobFrame( vMillId))
EgtRelocate( vMillId, nLayId)
local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 1600, -1600), 0)
if EMT.FALL then vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 3200, -2600), -1150) end
EgtSetInfo( nLayId, 'UNLOAD_TYPE', sUnloadType)
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
EgtSetLevel( vMillId, GDB_LV.USER)
-- aggiungo gli spigoli
+119 -19
View File
@@ -567,6 +567,14 @@ function OnSpecialApplyDisposition()
end
-- eseguo scarico
SpecSetCarrPosFromCmds( vCmd2)
-- determino posizione testa trave
local nLastEntId = EgtGetLastInGroup( EgtGetLastInGroup( EgtGetFirstNameInGroup( EgtGetPrev( EMC.DISPID), 'CL')))
if nLastEntId then
local vAxes = EmtGetAxesPos( nLastEntId)
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
else
EMC.TPOS = EgtGetInfo( EMC.DISPID, 'TPOS', 'd')
end
local vCmd3 = SpecCalcUnload()
-- unisco ed emetto i comandi
vCmd = EgtJoinTables( vCmd, vCmd2)
@@ -732,7 +740,10 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
-- Verifico se lavorazione pareti
local bWall = ( EgtGetInfo( EgtGetCurrMachGroup() or GDB_ID.NULL, 'Wall', 'd') == 1)
-- se il pezzo dev'essere scaricato al carico
local dUnloadType = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'UNLOAD', 'd')
local bUnloadOnLoadPos = dUnloadType == 1 or dUnloadType == -1
-- mi salvo info lavorazione su una lista
local AuxInfoMach = {}
AuxInfoMach.bPreSplit = bPreSplit
@@ -740,7 +751,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
AuxInfoMach.bPreCut = bPreCut
AuxInfoMach.bCutting = bCutting
AuxInfoMach.bUnload = bUnload
-- Assegno flag di pezzo separato dal resto del grezzo
SPLIT = IsEndPhase( EMC.PHASE)
@@ -748,6 +759,8 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
local b3Tot = BBox3d()
local b3Raw = BBox3d()
local nNextOddPhase = GetNextStartOrRestPhase( EMC.PHASE)
-- se esistono più grezzi toglie l'impostazione di scarico al carico
if bUnloadOnLoadPos and ( nNextOddPhase and nNextOddPhase <= EgtGetPhaseCount()) then bUnloadOnLoadPos = false end
local nRawId = EgtGetFirstRawPart()
local nCurrRawId = GDB_ID.NULL
while nRawId do
@@ -798,6 +811,10 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
elseif bPreCut or bCutting then
local dDistF, dDistB, dRollF, dRollB = SpecialCalcPhaseEncumbrance( EMC.PHASE + 1)
dDistFront = min( dDistFront, dDistF)
-- Se è previsto lo scarico al carico aumenta l'ingombro dell'area di lavoro
if bUnloadOnLoadPos then
dDistFront = dDistFront -( MinDeltaYV*2 + AGG_V)
end
dDistBack = min( dDistBack, dDistB)
end
@@ -896,11 +913,10 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
EgtSetInfo( NextDispId, 'V1POS', EMC.V1POS)
EgtSetInfo( NextDispId, 'V2POS', EMC.V2POS)
end
end
end
-- Se previsto scarico, lo eseguo
if bUnload then
EMC.LB = b3Raw:getDimX()
local vCmdTmp = SpecCalcUnload()
vCmd = EgtJoinTables( vCmd, vCmdTmp)
end
@@ -1326,8 +1342,70 @@ function SpecCalcSplit( dLenRaw, dMaxLenLeft)
return vCmd
end
---------------------------------------------------------------------
-- Scarica il pezzo in zona di carico
function SpecCalcUnloadOnLoadPos()
local vCmdPre = {}
EgtOutLog( ' *[UL]', 1)
-- Se pinza Y2 chiusa, devo effettuare uno scambio
local dY1DeltaMaxSP = MaxY1 - LoadT - TurnerOffs - 10 * GEO.EPS_SMALL
if EMC.Y2DELTA or EMC.Y1DELTA > dY1DeltaMaxSP then
-- imposto quote aggancio per avere solo pinza Y
local dDistFront = 0
local dDistBack = EMC.LB - MinOther - EMC.HOVM + 10 * GEO.EPS_SMALL
-- effettuo scambio
vCmdPre = SpecCalcCarriages( dDistFront, dDistBack, 0, 0, dY1DeltaMaxSP)
-- recupero nuova posizione carrelli
SpecSetCarrPosFromCmds( vCmdPre)
EgtOutLog( ' [UL1]', 1)
end
-- porto il pezzo alla zona di rotazione con il carro Y1
local vCmd = {}
-- Commento
table.insert( vCmd, { 0, 'Unload-On-Load'})
-- posizionamento sicuro teste e rulli
if #vCmdPre > 0 then
EnsureZmax( true, vCmdPre, 2)
else
EnsureZmax( true, vCmd)
end
-- Se pinza V chiusa, la apro
if EMC.Y2DELTA then
table.insert( vCmd, { 12, 0})
end
-- riporto la trave al carico
local dRotT = LoadT + TurnerOffs
table.insert( vCmd, { 2, 'Y1', dRotT + EMC.Y1DELTA, 'T', dRotT})
-- apro la morsa
table.insert( vCmd, { 11, 0})
EMC.CNT = nil
-- riporto il carrello in home
table.insert( vCmd, { 1, 'Y1', ParkY1})
-- eventuale unione tabelle
if #vCmdPre > 0 then
vCmd = EgtJoinTables( vCmdPre, vCmd)
end
return vCmd
end
---------------------------------------------------------------------
function SpecCalcUnload()
-- In caso di condizioni rispettate richiama lo scarico al carico e ritorna
local nNextPathId
local nNextMchId
if EMC.PATHID then nNextPathId = EgtGetNextActiveOperation( EMC.PATHID) end
if EMC.MCHID then nNextMchId = EgtGetNextActiveOperation( EMC.MCHID) end
-- se il pezzo dev'essere scaricato al carico
local dUnloadType = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'UNLOAD', 'd')
local bUnloadOnLoadPos = dUnloadType == 1 or dUnloadType == -1
-- Opzione attiva, è l'ultimo path, è l'ultima lavorazione e non c'è rimanenza
if bUnloadOnLoadPos and not nNextPathId and not nNextMchId and not IsStartOrRestPhase(EMC.PHASE) then
local vCmd = SpecCalcUnloadOnLoadPos()
return vCmd
end
local vCmdPre = {}
EgtOutLog( ' *[U]', 1)
if not EMC.Y1DELTA and not EMC.Y2DELTA then
@@ -1376,15 +1454,37 @@ function SpecCalcUnload()
if bStdUl then
local dFinT = EgtIf( EMC.LB < MaxLenSmT, UnloadSmT, UnloadT) - EMC.LB
local dFinY2 = dFinT + EMC.Y2DELTA
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
local dBeamTailY2 = dFinY2 + ( EMC.LB - EMC.Y2DELTA) - ( EMC.TCING or 0)
-- Se scarico in linea scrivo una nota in più per l'attivazione del piano ferma pezzo (M125)
if MinBeamLenUnloadInLine and EMC.LB >= MinBeamLenUnloadInLine then
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2, 'BrakeBeam'})
else
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
end
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dFinY2), 1)
-- Se scarico in "linea"
if MinBeamLenUnloadInLine and EMC.LB >= MinBeamLenUnloadInLine then
-- apro la morsa
table.insert( vCmd, { 12, 0})
local dY2MoveMax = MinY2
if dBeamTailY2 >= ( dY2MoveMax + ( EMC.TCING or 0)) then
local dTMove = dY2MoveMax - EMC.LB + ( EMC.TCING or 0)
-- riporto il carrello in fondo alla trave
table.insert( vCmd, { 1, 'Y2', dBeamTailY2, 'UnBrakeBeam'})
-- chiudo la morsa
table.insert( vCmd, { 12, 1})
-- finisco scarico trave
table.insert( vCmd, { 2, 'T', dTMove, 'Y2', dY2MoveMax})
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dY2MoveMax), 1)
end
end
else
table.insert( vCmd, { 1, 'Y2', MaxY2})
end
-- apro la morsa
table.insert( vCmd, { 12, 0})
-- riporto il carrello in home
table.insert( vCmd, { 1, 'Y2', ParkY2})
table.insert( vCmd, { 1, 'Y2', ParkY2, 'NoWaitUnload'})
-- eventuale unione tabelle
if #vCmdPre > 0 then
@@ -1611,7 +1711,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- allontano (Y1+T) e (Y2)
dY1a = MaxY1
dY2a = MinY2
dTa = ( dY1a - TabI.dY1PosI) + dTa
dTa = ( dY1a - TabI.dY1PosI) + dTa
-- **[M2]** = allontanamento dei trascinatori con Y2 in presa
elseif sType == 'M2' then
EmitComment( vCmd, '[M2]')
@@ -1622,7 +1722,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- allontano (Y2+T) e (Y1)
dY1a = MaxY1
dY2a = MinY2
dTa = ( dY2a - TabI.dY2PosI) + dTa
dTa = ( dY2a - TabI.dY2PosI) + dTa
-- **[M3]** = accentramento dei trascinatori con Y1 in presa
elseif sType == 'M3' then
EmitComment( vCmd, '[M3]')
@@ -1632,7 +1732,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- accentro (Y1+T) e (Y2)
dY1a = TabI.MyMinY1V1
dY2a = TabI.MaxY2V2
dTa = ( dY1a - TabI.dY1PosI) + dTa
dTa = ( dY1a - TabI.dY1PosI) + dTa
-- **[M4]** = accentramento dei trascinatori con Y2 in presa
elseif sType == 'M4' then
EmitComment( vCmd, '[M4]')
@@ -1643,7 +1743,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- accentro (Y2+T) e (Y1)
dY1a = TabI.MyMinY1V1
dY2a = TabI.MaxY2V2
dTa = ( dY2a - TabI.dY2PosI) + dTa
dTa = ( dY2a - TabI.dY2PosI) + dTa
end
--
table.insert( vCmd, { 3, 'Y1', dY1a, 'Y2', dY2a, 'T', dTa, EMC.CNT})
@@ -1931,7 +2031,7 @@ local function PosY1Y2B( TabI, vCmd)
PosY2FromY1B( TabI, vCmd)
end
end
bXW = false
bXW = false
-- se posso posizionare 'direttamente' Y2 all'interno dell'intervallo I2 (casi [rp] o [ri])
else
-- |POSIZIONO MORSA 2| e poi MORSA 1
@@ -1942,7 +2042,7 @@ local function PosY1Y2B( TabI, vCmd)
TabI.dY1PosI < TabI.dTPosI + EMC.LB - MinJoin - EgtIf( SPLIT, EMC.TCING, 0) + 10 * GEO.EPS_SMALL then
PosY2FromY1A( TabI, vCmd)
PosY1FromY2B( TabI, vCmd)
bXW = false
bXW = false
end
-- in **accentramento**
else
@@ -1951,9 +2051,9 @@ local function PosY1Y2B( TabI, vCmd)
TabI.dY1PosI <= TabI.dTPosI + EMC.LB - MinJoin - EgtIf( SPLIT, EMC.TCING, 0) + 10 * GEO.EPS_SMALL then
PosY2FromY1B( TabI, vCmd)
PosY1FromY2B( TabI, vCmd)
bXW = false
end
end
bXW = false
end
end
end
if bXW then
-- Massimo trascinamento della trave in direzione positiva (casi **[xw]** )
@@ -1963,10 +2063,10 @@ local function PosY1Y2B( TabI, vCmd)
TabI.dY1PosI < TabI.dTPosI + EMC.LB - MinJoin - EgtIf( SPLIT, EMC.TCING, 0) + 10 * GEO.EPS_SMALL then
-- allontanamento morse, trascinamento trave con Y1
MaxDispl( TabI, vCmd, 'M1')
else
else
-- accentramento morse, trascinamento trave con Y2
MaxDispl( TabI, vCmd, 'M4')
end
end
end
nCnt = nCnt + 1
if nCnt > 10 then return end
@@ -2509,11 +2609,11 @@ function SpecOutputCmds( vCmd, bEnd)
EgtSetInfo( EMC.PATHID, sKey, sInfo)
-- movimento di 1 asse
elseif Cmd[1] == 1 then
local sInfo = '1,'..Cmd[2]..','..EgtNumToString( Cmd[3],3)..EgtIf( Cmd[4], ',*', '')
local sInfo = '1,'..Cmd[2]..','..EgtNumToString( Cmd[3],3)..EgtIf( Cmd[4], ','..tostring(Cmd[4]), '')
EgtSetInfo( EMC.PATHID, sKey, sInfo)
-- movimento di 2 assi
elseif Cmd[1] == 2 then
local sInfo = '2,'..Cmd[2]..','..EgtNumToString( Cmd[3],3)..','..Cmd[4]..','..EgtNumToString( Cmd[5],3)..EgtIf( Cmd[6], ',*', '')
local sInfo = '2,'..Cmd[2]..','..EgtNumToString( Cmd[3],3)..','..Cmd[4]..','..EgtNumToString( Cmd[5],3)..EgtIf( Cmd[6], ','..tostring(Cmd[6]), '')
EgtSetInfo( EMC.PATHID, sKey, sInfo)
-- movimento di 3 assi
elseif Cmd[1] == 3 then
+4 -2
View File
@@ -5,8 +5,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '3.1a1_DEV1'
PP_NVER = '3.1.1.1'
PP_VER = '3.1a2_DEV7'
PP_NVER = '3.1.1.2'
MIN_MACH_VER = '2.7d2'
MACH_NAME = EgtGetCurrMachineName()
@@ -172,6 +172,7 @@ Motors23KW = true
EstimationRapidMultiplier = 1
DistZClampToTable = 5 -- distanza tra la tavola e il punto più basso della morsa
ClampingCoeffMin = nil -- coefficiente di fissaggio, se 0 o nil non fa controllo, per il momento da inizializzare da Ts3Data
MinBeamLenUnloadInLine = 2400 -- se lo scarico è su una linea deve scaricare il pezzo al massimo e deve essere maggiore del valore della variabile
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250-3T_5Ax.data"
@@ -270,6 +271,7 @@ if EgtExistsFile( sDataBeam) then
if Machine.Offsets.MOTORS23KW then Motors23KW = Machine.Offsets.MOTORS23KW == 1 end
if Machine.Offsets.LEN_STEM_H2 then LenStemH2 = Machine.Offsets.LEN_STEM_H2 end
if Machine.Offsets.COEFF_CLAMP_CHECK then ClampingCoeffMin = Machine.Offsets.COEFF_CLAMP_CHECK end
if Machine.Offsets.MIN_BEAM_LEN_UNLOAD_IN_LINE then MinBeamLenUnloadInLine = Machine.Offsets.MIN_BEAM_LEN_UNLOAD_IN_LINE end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
+5
View File
@@ -1,4 +1,9 @@
==== Common_PF1250 Update Log ====
Versione 3.1a2 (30/01/2026)
- (SIM) Allineato approccio simulazione a generazione in caso di lavorazione in doppio verticale. Ticket#2781
- (GEN) Simulazione non allineata a generazione. Mancava reset flag di pezzo a caduta. Ticket#2798
Versione 3.1a1 (16/01/2026)
- (SIM-GEN) Corretto movimento di approccio con sega a catena e allineati Simulazione e Generazione. Ticket#2771
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '3.1a1', -- versione script
VERSION = '3.1a2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.7k1' -- versione minima kernel
}