From 4cacbfc101a772c9bf89d66fd5c358d2a428add9 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 21 Nov 2023 11:08:59 +0100 Subject: [PATCH] =?UTF-8?q?Essetre-PF1500rl=202.5k2=20:=20-=20In=20dinamic?= =?UTF-8?q?a=20pinze=20risultati=20finali=20non=20pi=C3=B9=20accelerazioni?= =?UTF-8?q?=20ma=20tempi=20rampa=20in=20ms=20(P7,=20P8=20e=20P9=20di=20M11?= =?UTF-8?q?5).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Essetre-PF1500.TPA.mlpe | 36 +++++++++++++++++------------------- Essetre-PF1500.mlpe | 2 +- Essetre-PF1500.mlse | 14 +++++++------- Essetre-PF1500rl.ini | 5 +++-- Essetre-PF1500rl.mlde | 5 ++++- 5 files changed, 32 insertions(+), 30 deletions(-) diff --git a/Essetre-PF1500.TPA.mlpe b/Essetre-PF1500.TPA.mlpe index 4c8914e..0de6d95 100644 --- a/Essetre-PF1500.TPA.mlpe +++ b/Essetre-PF1500.TPA.mlpe @@ -1,4 +1,4 @@ --- Processore macchina Essetre-PF1500rl by EgalWare s.r.l. 2023/11/13 +-- Processore macchina Essetre-PF1500rl by EgalWare s.r.l. 2023/11/15 -- Con controllo numerico TPA -- Carico i dati globali @@ -177,9 +177,9 @@ function OnDispositionEnd() local STrave = EMT.ST local HOverM = EMT.HOVM -- calcolo dati pinze - local AccPinze, AccMaxPinze, RidFeed = CalcDinamicaPinze( HTrave, STrave, LBarra) - local AccPinz1, AccMaxPinz1, RidFeed1 = CalcDinamicaPinze( HTrave, STrave, LBarra - LTrave) - local AccPinz2, AccMaxPinz2, RidFeed2 = CalcDinamicaPinze( HTrave, STrave, LTrave) + local TempAccPinze, TempMinAccPinze, RidFeed = CalcDinamicaPinze( HTrave, STrave, LBarra) + local TempAccPinz1, TempMinAccPinz1, RidFeed1 = CalcDinamicaPinze( HTrave, STrave, LBarra - LTrave) + local TempAccPinz2, TempMinAccPinz2, RidFeed2 = CalcDinamicaPinze( HTrave, STrave, LTrave) local ForzaPinze = CalcForzaPinze( HTrave, STrave, LBarra, LTrave) if IdTrave >= 0 then local sRem = ' SN=' .. IdTrave .. ' LBarra=' .. EmtLenToString( LBarra, 3) .. ' L='..EmtLenToString( LTrave, 3) .. @@ -205,7 +205,7 @@ function OnDispositionEnd() local nLoad90 = EgtGetInfo( BtlInfoId, 'LOAD90', 'i') or 0 sOut = 'M115 P1=' .. EmtLenToString( LBarra, 2) .. ' P2=' .. EmtLenToString( max( HTrave, HBarra), 2) .. ' P3=' .. EmtLenToString( STrave, 2) .. ' P4=' .. EmtLenToString( HOverM, 2) .. ' P5=' .. tostring( nLoad90) .. ' P6=' .. EmtLenToString( LTrave, 2) .. - ' P7=' .. EgtNumToString( AccPinze, 2) .. ' P8=' .. EgtNumToString( AccPinz2, 2) .. ' P9=' .. EgtNumToString( AccPinz1, 2) .. + ' P7=' .. EgtNumToString( TempAccPinze, 2) .. ' P8=' .. EgtNumToString( TempAccPinz2, 2) .. ' P9=' .. EgtNumToString( TempAccPinz1, 2) .. ' P10=' .. EgtNumToString( EMT.PARTTYPE or 0, 0) .. ' P11=' .. EgtNumToString( ForzaPinze, 2) .. ' P12=' .. EgtNumToString( ForzaPinze, 2) MyOutput( sOut) if EMT.LOAD then @@ -1164,8 +1164,8 @@ end --------------------------------------------------------------------- function CalcDinamicaPinze( dH, dS, dL) - local MinTempoAcc = 0.3 -- [s] - local MaxTempoAcc = 4.0 -- [s] + local MinTempoAcc = 0.6 -- [s] + local MaxTempoAcc = 6.0 -- [s] local KgMtCubo= 550 -- densità legno [Kg / metro cubo] local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg] local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min] @@ -1181,7 +1181,7 @@ function CalcDinamicaPinze( dH, dS, dL) elseif RidFeed < 10 then RidFeed = 10 end - return AccPinze, AccMaxPinze, RidFeed + return TempoAcc * 1000, MinTempoAcc * 1000, RidFeed end --------------------------------------------------------------------- @@ -1794,15 +1794,9 @@ function MyAdjustLinearAxes() local LenRef = MillOffs vtE = Vector3d( EMT.ADIR) * Len - Z_AX() * LenRef end - if EMT.HEAD ~= 'H21' then - EMT.L1 = EMT.L1 - vtE:getX() - EMT.L2 = EMT.L2 - DeltaTabY - vtE:getY() - EMT.L3 = EMT.L3 - DeltaTabZ - vtE:getZ() - else - EMT.L1 = EMT.L1 - vtE:getX() - EMT.L2 = EMT.L2 - Delta2TabY - vtE:getY() - EMT.L3 = EMT.L3 - Delta2TabZ - vtE:getZ() - end + EMT.L1 = EMT.L1 - vtE:getX() + EMT.L2 = EMT.L2 - vtE:getY() + EMT.L3 = EMT.L3 - vtE:getZ() end if EMT.X_OFF then EMT.L1 = EMT.L1 + EMT.X_OFF end @@ -1860,11 +1854,15 @@ function CalcInterpPlane() -- origine del piano local xS = EMT.START[1] + LoadT if EMT.X_OFF then xS = xS + EMT.X_OFF end - local ptS = Point3d( xS, 0, 0) + local ptS = Point3d( xS, 0, 0) + EgtIf( EMT.HEAD ~= 'H21', Vector3d( 0, DeltaTabY, DeltaTabZ), Vector3d( 0, Delta2TabY, Delta2TabZ)) -- calcolo per piano generico local vtE if EMT.HEAD ~= 'H13' then - vtE = Vector3d( EMT.EXTR) + if EMT.MCHTYPE ~= MCH_OY.GENMACHINING then + vtE = Vector3d( EMT.EXTR) + else + vtE = Z_AX() + end else vtE = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) end diff --git a/Essetre-PF1500.mlpe b/Essetre-PF1500.mlpe index 3da48c5..fa888d9 100644 --- a/Essetre-PF1500.mlpe +++ b/Essetre-PF1500.mlpe @@ -1,4 +1,4 @@ --- Processore macchina Essetre-PF1500rl by EgalWare s.r.l. 2023/11/13 +-- Processore macchina Essetre-PF1500rl by EgalWare s.r.l. 2023/11/15 -- Funzioni generiche indipendenti dal controllo -- Intestazioni diff --git a/Essetre-PF1500.mlse b/Essetre-PF1500.mlse index ec04b64..9034430 100644 --- a/Essetre-PF1500.mlse +++ b/Essetre-PF1500.mlse @@ -1,4 +1,4 @@ --- Special Operations macchina Essetre-PF1500 by EgalWare s.r.l. 2023/11/14 +-- Special Operations macchina Essetre-PF1500 by EgalWare s.r.l. 2023/11/21 -- Intestazioni require( 'EmtGenerator') @@ -8,11 +8,10 @@ EgtEnableDebug( false) local sBaseDir = EgtGetSourceDir() local BD = dofile( sBaseDir .. 'Beam\\BeamData.lua') -EgtOutLog ( '** Essetre-PF1250 '..PP_VER..' **', 1) - - ----------------------- OnSpecialGetMaxZ ----------------------------- --------------------------------------------------------------------- +-- *** Special Z moves *** +--------------------------------------------------------------------- +---------------------- OnSpecialGetMaxZ ----------------------------- local function CalcExtraZ( vtTp, vtT, vMZ) -- la tabella deve esistere ed essere non vuota if not vMZ or #vMZ == 0 then return 0 end @@ -115,7 +114,6 @@ function OnSpecialGetMaxZ() end ---------------------- OnSpecialMoveZup ----------------------------- ---------------------------------------------------------------------- function OnSpecialMoveZup() --EgtOutLog( 'OnSpecialMoveZup : ' .. EMC.HEAD .. '.' .. tostring( EMC.EXIT)) @@ -174,7 +172,9 @@ function OnSpecialMoveZup() end end ----------- OnSpecialApplyDisposition & OnPostApplyMachining --------- +--------------------------------------------------------------------- +-- *** OnSpecialApplyDisposition & OnPostApplyMachining *** +--------------------------------------------------------------------- ----------------------- Costanti ------------------------------------ local DELTA_SIC = 1 local MinJoin = BD.MIN_JOIN_S diff --git a/Essetre-PF1500rl.ini b/Essetre-PF1500rl.ini index 3e2a074..d656bd1 100644 --- a/Essetre-PF1500rl.ini +++ b/Essetre-PF1500rl.ini @@ -33,8 +33,9 @@ Milling=1 Pocketing=1 Mortising=1 Chiseling=0 -SawRoughing=0 -SawFinishing=0 +GenMachining=0 +SurfRoughing=0 +SurfFinishing=0 [Machining] InitScript=InitMach.lua diff --git a/Essetre-PF1500rl.mlde b/Essetre-PF1500rl.mlde index c96845b..e22b721 100644 --- a/Essetre-PF1500rl.mlde +++ b/Essetre-PF1500rl.mlde @@ -7,15 +7,18 @@ -- 2023/09/29 ver 2.5i1 In BeamData e mlde aggiunta la lettura di alcuni parametri da Ts3Data. -- 2023/11/13 ver 2.5k1 Migliorata gestione risalite in Z e movimenti in Home. Si controlla in MLSE direzione assi lavorazione attuale con lavorazione precedente. -- Aggiunte posizioni TC 16, 17 e 18. +-- 2023/11/21 ver 2.5k2 In dinamica pinze risultati finali non più accelerazioni ma tempi rampa in ms. -- Intestazioni require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '2.5k1' +PP_VER = '2.5k2' MIN_MACH_VER = '2.5j1' +EgtOutLog ( '** Essetre-PF1500rl '..PP_VER..' (MinMach '.. MIN_MACH_VER ..') **', 1) + -- Parametri macchina NumericalControl = 'TPA' -- NUM o TPA MinMchY1 = 335