From 14d5f35f8f71c6261d5a63f49dd8134bff2e2aca Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Tue, 14 Jan 2025 08:37:23 +0100 Subject: [PATCH] =?UTF-8?q?-=20Aggiunta=20possibilit=C3=A0=20di=20settare?= =?UTF-8?q?=20HCING/TCING=20nelle=20note=20di=20ogni=20singola=20lavorazio?= =?UTF-8?q?ne=20per=20gestire=20parte=20non=20pinzabile=20del=20pezzo.=20F?= =?UTF-8?q?unziona=20solo=20con=20nuova=20strategia=20pinzaggio=20-=20Picc?= =?UTF-8?q?ola=20correzione=20calcolo=20posizione=20carrelli=20con=20nuova?= =?UTF-8?q?=20strategia=20di=20pinzaggio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common_FAST.mlse | 37 +++++++++++++++++++++++++++++++++++-- UpdateLog.txt | 4 ++++ Version.lua | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/Common_FAST.mlse b/Common_FAST.mlse index 4324ccb..702c387 100644 --- a/Common_FAST.mlse +++ b/Common_FAST.mlse @@ -367,7 +367,18 @@ function OnSpecialApplyDisposition() EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0 EMC.HCING = EgtGetInfo( nCurrRawId, 'HCING', 'd') or 0 EMC.TCING = EgtGetInfo( nCurrRawId, 'TCING', 'd') or 0 - + + -- correggo area non pinzabile in testa o coda in base alle info sulla lavorazione + local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or '' + local dHCING = tonumber( EgtGetValInNotes( sNotes, 'HCING')) + if dHCING then + EMC.HCING = max( dHCING, -50) + end + local dTCING = tonumber( EgtGetValInNotes( sNotes, 'TCING')) + if dTCING then + EMC.TCING = max( dTCING, -50) + end + -- Devo scaricare il pezzo o il grezzo rimasto -- Posizione trave local dPosT @@ -511,6 +522,17 @@ function OnPostApplyMachining() local bSplitting = ( sNotes:find( 'Split') ~= nil) local bPreCut = ( sNotes:find( 'Precut') ~= nil) local bCutting = ( sNotes:find( 'Cut') ~= nil) + + -- correggo area non pinzabile in testa o coda in base alle info sulla lavorazione + local dHCING = tonumber( EgtGetValInNotes( sNotes, 'HCING')) + if dHCING then + EMC.HCING = max( dHCING, -50) + end + local dTCING = tonumber( EgtGetValInNotes( sNotes, 'TCING')) + if dTCING then + EMC.TCING = max( dTCING, -50) + end + local bUnload = IsEndPhase( EMC.PHASE) or IsEnd2Phase( EMC.PHASE) if bPreSplit or bPreCut then EgtSetInfo( EMC.MCHID, 'IS_PRE', '1') @@ -634,6 +656,17 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0 EMC.HCING = EgtGetInfo( nCurrRawId, 'HCING', 'd') or 0 EMC.TCING = EgtGetInfo( nCurrRawId, 'TCING', 'd') or 0 + + -- correggo area non pinzabile in testa o coda in base alle info sulla lavorazione + local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) + local dHCING = tonumber( EgtGetValInNotes( sNotes, 'HCING')) + if dHCING then + EMC.HCING = max( dHCING, -50) + end + local dTCING = tonumber( EgtGetValInNotes( sNotes, 'TCING')) + if dTCING then + EMC.TCING = max( dTCING, -50) + end -- Calcolo dell'ingombro della lavorazione local dDistFront, dDistBack = SpecialCalcMachiningEncumbrance( EMC.MCHID, bPreCut) @@ -1682,7 +1715,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF if abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL then table.insert( vCmd, { 11, 0}) dYPosA = max( MyMinY, dTPosI + dYDeltaF) - dTPosA = -( dYPosA + dVDeltaF) + dTPosA = dYPosA - dYDeltaF dVPosA = dTPosA + dVDeltaF table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA}) table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)}) diff --git a/UpdateLog.txt b/UpdateLog.txt index bef8b2d..699fbe6 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,9 @@ ==== Common_FAST Update Log ==== +Versione 2.7-- (--/--/2024) +- (SIM-GEN) Aggiunta possibilità di settare HCING/TCING nelle note di ogni singola lavorazione per gestire parte non pinzabile del pezzo. Funziona solo con nuovo pinzaggio. +- (SIM-GEN) Piccola correzione calcolo posizione carrelli con nuova strategia di pinzaggio. + Versione 2.7a3 (08/01/2024) - (GEN) Dopo separazione, in NUM_PLUS, si srive EH1 solo se macro G101, perchè altrimenti non è prevista. Ticket#2239 diff --git a/Version.lua b/Version.lua index f979ee2..e0a36b2 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_FAST', -- nome script PP standard - VERSION = '2.7a3', -- versione script + VERSION = '2.7--', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }