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/Essetre-FAST.mlde b/Essetre-FAST.mlde index cd9680c..a41a08d 100644 --- a/Essetre-FAST.mlde +++ b/Essetre-FAST.mlde @@ -24,7 +24,7 @@ require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '2.7a3' +PP_VER = '2.7a3_DEV1' PP_NVER = '2.7.1.3' MIN_MACH_VER = '2.5k1' MACH_NAME = 'Essetre-FAST'