From c7ebf339ecf05fc1464268d24bb038c1df099287 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Thu, 5 Dec 2024 16:23:42 +0100 Subject: [PATCH] =?UTF-8?q?Nuovo=20aggregato=2090=C2=B0=20(H7)=20per=20fre?= =?UTF-8?q?sa=20tipo=20BlockHaus.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common_FAST.NUM.mlpe | 2 +- Common_FAST.NUM_PLUS.mlpe | 21 +++++++++++++++------ Common_FAST.TPA.mlpe | 17 +++++++++++++++-- Common_FAST.mlpe | 22 +++++++++++++++------- UpdateLog.txt | 3 +++ Version.lua | 2 +- 6 files changed, 50 insertions(+), 17 deletions(-) diff --git a/Common_FAST.NUM.mlpe b/Common_FAST.NUM.mlpe index b5621b3..2da9885 100644 --- a/Common_FAST.NUM.mlpe +++ b/Common_FAST.NUM.mlpe @@ -1647,7 +1647,7 @@ end --------------------------------------------------------------------- function GetET( sHead, sTcPos, dAxR3) - if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' then + if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then return ' E'..sTcPos elseif sHead == 'H2' then return ' ET42' diff --git a/Common_FAST.NUM_PLUS.mlpe b/Common_FAST.NUM_PLUS.mlpe index 2dac2f3..e65bcc1 100644 --- a/Common_FAST.NUM_PLUS.mlpe +++ b/Common_FAST.NUM_PLUS.mlpe @@ -145,7 +145,11 @@ function OnToolData() local sPos = 'N2' .. tostring(nPos) local sOut = 'L11=' .. EmtLenToString( EMT.SMAX, 3) .. ' L12=' .. EmtLenToString( AngTr1Offs, 1)..' G76H9998.1'..sPos..sPos EmtOutput( sOut) - -- altro non previsto + -- emissione dati sega a catena + elseif EMT.HEAD == 'H7' then + local sOut = 'L11='..EgtNumToString( EMT.SMAX, 0)..' L12='..EmtLenToString( ( 154.5), 1)..' G76H9998.1N121N121' + EmtOutput( sOut) +-- altro non previsto end end @@ -693,7 +697,7 @@ function OnRapid() if EMT.HEAD == 'H3' then sEL = sEL..EmtLenToString( ( EMT.TDIST or ChSawLen), 3) -- se aggregato - elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then sEL = sEL..EmtLenToString( AngTr1Offs, 3) -- se testa normale ( H1 or H2) else @@ -705,7 +709,7 @@ function OnRapid() if EMT.HEAD == 'H3' then sER = sER..EmtLenToString( EMT.TLEN, 3) -- se aggregato - elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then sER = sER..EmtLenToString( EMT.TLEN + AngTr1Len, 3) -- se testa normale ( H1 or H2) else @@ -1017,7 +1021,7 @@ end --------------------------------------------------------------------- function OnArc() -- con aggregato non si possono fare archi. Deve essere tutto spezzato - if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then + if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then EmtSetLastError( 1211, "With aggregate, the arcs must be splitted") end @@ -1642,11 +1646,16 @@ function MyAdjustLinearAxes() local LenRef = MillOffs local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) vtE = vtAux * LenAux - Z_AX() * LenRef - elseif EMT.HEAD == 'H5' then + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then local LenAux = AngTr1Offs + MillOffs local LenRef = MillOffs local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) vtE = vtAux * LenAux - Z_AX() * LenRef + elseif EMT.HEAD == 'H7' then + local LenAux = AngTrBHOffs + MillOffs + local LenRef = MillOffs + local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) + vtE = vtAux * LenAux - Z_AX() * LenRef else EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) end @@ -1741,7 +1750,7 @@ end --------------------------------------------------------------------- function GetET( sHead, sTcPos, dAxR3) - if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' then + if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then return ' E'..sTcPos elseif sHead == 'H2' then return ' ET42' diff --git a/Common_FAST.TPA.mlpe b/Common_FAST.TPA.mlpe index 21a1020..d782fd3 100644 --- a/Common_FAST.TPA.mlpe +++ b/Common_FAST.TPA.mlpe @@ -151,7 +151,12 @@ function OnToolData() local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) .. ' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3) ParkLine( sOut) - -- altro non previsto + -- emissione dati sega a catena + elseif EMT.HEAD == 'H7' then + local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) .. + ' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3) + ParkLine( sOut) +-- altro non previsto else EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) end @@ -1640,12 +1645,18 @@ function MyAdjustLinearAxes() local LenRef = MillOffs local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) vtE = vtAux * LenAux - Z_AX() * LenRef - elseif EMT.HEAD == 'H5' then + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then local Len = EMT.TLEN + AngTr1Len local LenAux = MillOffs + AngTr1Offs local LenRef = MillOffs local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2) vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef + elseif EMT.HEAD == 'H7' then + local Len = EMT.TLEN + AngTrBHLen + local LenAux = MillOffs + AngTrBHOffs + local LenRef = MillOffs + local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2) + vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef else EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) end @@ -1682,6 +1693,8 @@ function AdjustToolKinematic() return EgtIf( EMT.EXIT == 1, '11', '12') elseif EMT.HEAD == 'H6' then return EgtIf( EMT.EXIT == 1, '21', '22') + elseif EMT.HEAD == 'H7' then + return '31' else EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) end diff --git a/Common_FAST.mlpe b/Common_FAST.mlpe index 0bfafdc..888888c 100644 --- a/Common_FAST.mlpe +++ b/Common_FAST.mlpe @@ -105,6 +105,7 @@ function OnSimulStart() AddToCollisionCheck( 'B', 'COLLISION', EMT.COLLOBJ) AddToCollisionCheck( 'C', 'COLLISION', EMT.COLLOBJ) AddToCollisionCheck( 'H5', 'COLLISION', EMT.COLLOBJ) + AddToCollisionCheck( 'H6', 'COLLISION', EMT.COLLOBJ) AddToolToCollisionCheck( 'H2', 1, EMT.COLLOBJ) AddToolHolderToCollisionCheck( 'H2', 1, EMT.COLLOBJ) DumpCollisionCheck( EMT.COLLOBJ, 'Collision Objects :', 4) @@ -180,7 +181,7 @@ function OnSimulDispositionStart() if sTool and nTlen < LONG_TOOL_MINLEN then EMT.TOOL_1 = sTool else - EMT.TOOL_1 = GetDefaultToolName() + EMT.TOOL_1 = GetDefaultToolName() end EgtLoadTool( 'H1', 1, EMT.TOOL_1) EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1) @@ -190,7 +191,7 @@ function OnSimulDispositionStart() EMT.VMILL = {} if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then local nLastOrd = GetPhaseOrd( EgtGetPhaseCount()) - local nPartRawId = EgtGetFirstRawPart() + local nPartRawId = EgtGetFirstRawPart() while nPartRawId do -- se è lo scarto finale tagliato a pezzi, esco local nRawOrd = EgtGetInfo( nPartRawId, 'ORD', 'i') @@ -511,6 +512,9 @@ function OnSimulToolSelect( dPosA) EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0)) end EgtSetAxisPos( 'B', 0) + -- se aggregato per fresa tipo blockhaus + elseif EMT.HEAD == 'H7' then + EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0)) end -- se punta lunga if EMT.TOTLEN > LONG_TOOL_MINLEN then @@ -534,9 +538,9 @@ function OnSimulToolDeselect() -- se prossimo utensile non definito, è disposizione ed esco if EMT.NEXTTOOL == '' then return end -- se cambia uscita su rinvio non devo fare alcunché - if EMT.HEAD == 'H5' and EMT.NEXTHEAD == 'H5' then return end + if ( EMT.HEAD == 'H5' and EMT.NEXTHEAD == 'H5') or ( EMT.HEAD == 'H6' and EMT.NEXTHEAD == 'H6') then return end -- se sega a catena o rinvio o punta lunga o utensile di grosso diametro, devo cambiare - if EMT.HEAD == 'H3' or EMT.HEAD == 'H5' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then + if EMT.HEAD == 'H3' or EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then EgtOutText( 'Tool change in progress...') -- movimento scarico sega a catena if EMT.HEAD == 'H3' then @@ -552,9 +556,13 @@ function OnSimulToolDeselect() end SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) -- movimento scarico rinvio - elseif EMT.HEAD == 'H5' then + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) + -- movimento scarico aggregato BlockHaus + elseif EMT.HEAD == 'H7' then + SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) + SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT) -- movimento scarico punta lunga su T111 elseif EMT.TOTLEN > LONG_TOOL_MINLEN then -- se su cambio utensile T111 @@ -579,7 +587,7 @@ function OnSimulToolDeselect() EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN) ShowToolInTcPos( EMT.TCPOS_1, true) -- movimento per carico utensile - if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' then + if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' and EMT.NEXTHEAD ~= 'H6' then SimulMoveAxes( 'B', 90, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) else SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) @@ -605,7 +613,7 @@ function OnSimulToolDeselect() EgtPause( 100) ShowToolInTcPos( EMT.TCPOS_1, true) -- se segue sega a catena - if EMT.NEXTHEAD == 'H3' or EMT.NEXTHEAD == 'H5' then + if EMT.NEXTHEAD == 'H3' or EMT.NEXTHEAD == 'H5' or EMT.NEXTHEAD == 'H6' then -- se non lama, nascondo l'utensile corrente if EMT.HEAD ~= 'H2' then EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.OFF) diff --git a/UpdateLog.txt b/UpdateLog.txt index ff3f67b..3b97969 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,8 @@ ==== Common_FAST Update Log ==== +Versione 2.6-- (--/--/2024) +- (MLDE-SIM-GEN) Nuovo aggregato 90° (H7) per fresa tipo BlockHaus. Ticket#2142 + Versione 2.6l1 (02/12/2024) - (SIM) Corretto movimento VMILL durante scarico pezzo piccolo a caduta - (SIM-GEN) Per decidere posizione parcheggio barra dopo separazione, si considera lunghezza coda del pezzo in lavoro per evitare collisioni. Ticket#2168 diff --git a/Version.lua b/Version.lua index a5b7ff5..8286281 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_FAST', -- nome script PP standard - VERSION = '2.6l1', -- versione script + VERSION = '2.6--', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }