Compare commits

...

3 Commits

Author SHA1 Message Date
andrea.villa 11c3e0c3e5 Allineamento a common ver.3.1b1 2026-02-20 16:29:23 +01:00
luca.mazzoleni a7824bf0c8 - in mlde ParkCSawX1 portata a 1700 2026-02-20 16:14:39 +01:00
daniele.nicoli 0f036d5be5 Se attivo scarico al carico, ma il pezzo non soddisfa le condizioni restituisce errore e non permette la generazione. 2026-02-16 15:21:16 +01:00
5 changed files with 39 additions and 13 deletions
+6
View File
@@ -605,6 +605,9 @@ end
---------------------------------------------------------------------
function OnPathStart()
if EMT.OPEISDISP then
return
end
-- non ancora iniziata la lavorazione
EMT.MCHFIRST = true
EMT.MCHFIRSTFEED = true
@@ -634,6 +637,9 @@ end
---------------------------------------------------------------------
function OnPathEnd()
if EMT.OPEISDISP then
return
end
if not EMT.ZMAX then
EmitResetMachining()
end
+27 -10
View File
@@ -687,7 +687,7 @@ function OnPostApplyMachining()
local OriY2Delta = EMC.Y2DELTA
local OriV1Pos = EMC.V1POS
local OriV2Pos = EMC.V2POS
local OriCnt = EMC.CNT
local OriCnt = EMC.CNT
-- eseguo le elaborazioni
SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bLast and bUnload)
-- se separazione, verifico il risultato
@@ -763,8 +763,13 @@ 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
-- se esistono più grezzi toglie l'impostazione di scarico al carico e ritorna errore
if bUnloadOnLoadPos and ( nNextOddPhase and nNextOddPhase <= EgtGetPhaseCount()) then
bUnloadOnLoadPos = false
EMC.ERR = 22
EMC.MSG = ' Error : Unload on Load Position not reachable if raw part on Load Position'
return
end
local nRawId = EgtGetFirstRawPart()
local nCurrRawId = GDB_ID.NULL
while nRawId do
@@ -1351,6 +1356,11 @@ end
function SpecCalcUnloadOnLoadPos()
local vCmdPre = {}
EgtOutLog( ' *[UL]', 1)
if not EMC.Y1DELTA and not EMC.Y2DELTA then
EMC.ERR = 21
EMC.MSG = ' Error : Y1 and Y2 not clamped for unloading'
return {}
end
-- 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
@@ -1402,16 +1412,23 @@ function SpecCalcUnload()
-- In caso di condizioni rispettate richiama lo scarico al carico e ritorna
local nNextPathId
local nNextMchId
local nNextDispId
if EMC.PATHID then nNextPathId = EgtGetNextActiveOperation( EMC.PATHID) end
if EMC.MCHID then nNextMchId = EgtGetNextActiveOperation( EMC.MCHID) end
if EMC.DISPID then nNextDispId = EgtGetNextActiveOperation( EMC.DISPID) 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
if bUnloadOnLoadPos then
-- è l'ultimo path, è l'ultima lavorazione, non ci sono altre disposizioni e non c'è rimanenza
if not nNextPathId and not nNextMchId and not nNextDispId and not IsStartOrRestPhase(EMC.PHASE) then
local vCmd = SpecCalcUnloadOnLoadPos()
return vCmd
else
EMC.ERR = 21
EMC.MSG = ' Error : Unload on Load Position not reachable if raw part on Load Position'
return {}
end
end
local vCmdPre = {}
EgtOutLog( ' *[U]', 1)
@@ -1668,7 +1685,7 @@ local function PosForEnl1FY1( dY1a, dY2a, dTa, dExtra, dCorsaY1e, dCorsaY2Te)
if dDispl/2 <= dCorsaY1e then
dY1a = dY1a + dDispl / 2
dY2a = dY2a - dDispl / 2
dTa = dTa - dDispl / 2
dTa = dTa - dDispl / 2
else
dY1a = dY1a + dCorsaY1e
dY2a = dY2a - (dDispl - dCorsaY1e)
@@ -1690,7 +1707,7 @@ local function PosForEnl1FY2( dY1a, dY2a, dTa, dExtra, dCorsaY1Te, dCorsaY2e)
if dDispl/2 <= dCorsaY1Te then
if dDispl/2 <= dCorsaY2e then
dY1a = dY1a + dDispl / 2
dTa = dTa + dDispl / 2
dTa = dTa + dDispl / 2
dY2a = dY2a - dDispl / 2
else
dY2a = dY2a - dCorsaY2e
+2 -2
View File
@@ -5,7 +5,7 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '3.1a2_DEV9'
PP_VER = '3.1a2_DEV11'
PP_NVER = '3.1.1.2'
MIN_MACH_VER = '2.7d2'
MACH_NAME = EgtGetCurrMachineName()
@@ -86,7 +86,7 @@ ParkTc2X1 = 3100
ParkZ1 = -545
ParkC1 = -90
ParkB1 = -90
ParkCSawX1 = 1500
ParkCSawX1 = 1700
ParkCSawZ1 = -100
ParkCSaw0Z1 = -400
ParkCSawC1 = -90
+3
View File
@@ -1,5 +1,8 @@
==== Common_PF1250 Update Log ====
Versione 3.1b1 (17/02/2026)
- (GEN) Generazione non allineata a simulazione. Ticket#2819
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
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '3.1a2', -- versione script
VERSION = '3.1b1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.7k1' -- versione minima kernel
}