From 744d9be7e9d1feaa19d7d506e2908e0736edc212 Mon Sep 17 00:00:00 2001 From: DarioS Date: Wed, 5 Apr 2023 20:24:03 +0200 Subject: [PATCH] Essetre-PFrl : - correzione per update con utensile cambiato di nome - correzione per carico pezzo dopo rotazione con movimenti di riposizionamento carrelli da separare. --- Essetre-PF.NUM.mlpe | 8 ++------ Essetre-PF.mlse | 6 +++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Essetre-PF.NUM.mlpe b/Essetre-PF.NUM.mlpe index f61fdec..d2a68de 100644 --- a/Essetre-PF.NUM.mlpe +++ b/Essetre-PF.NUM.mlpe @@ -1403,9 +1403,6 @@ function PrepareLoad( sCmd, nInd, bStart) end table.insert( EMT.MDCHAR, { Start=1}) table.insert( EMT.MDCHAR, { Wait=1}) - --for i = 1, #EMT.MDCHAR do - -- EMT.MDCHAR[i].MovType = 3 - --end end elseif Cmd[1] == '1' then if Cmd[2] ~= 'Z' then @@ -1913,9 +1910,8 @@ function PreparePostRotation( sCmd, nInd) -- se dichiarazione inizio riposizionamento carrelli if Cmd[2] == 'CARR_MOVE' then EMT.POSTROT = false - for i = 1, #EMT.MDCHAR do - EMT.MDCHAR[i].MovType = 3 - end + table.insert( EMT.MDCHAR, { Start=1}) + table.insert( EMT.MDCHAR, { Wait=1}) end elseif Cmd[1] == '1' then -- non interessa diff --git a/Essetre-PF.mlse b/Essetre-PF.mlse index d59134a..fb7c3a9 100644 --- a/Essetre-PF.mlse +++ b/Essetre-PF.mlse @@ -1083,7 +1083,11 @@ function SpecialCalcPhaseEncumbrance( nPhase) -- imposto lavorazione e utensile correnti EgtSetCurrMachining( nMchId) local sTool = EgtGetMachiningParam( MCH_MP.TOOL) - EgtTdbSetCurrTool( sTool) + if not sTool or not EgtTdbSetCurrTool( sTool) then + local sTuuid = EgtGetMachiningParam( MCH_MP.TUUID) + sTool = EgtTdbGetToolFromUUID( sTuuid) or '' + EgtTdbSetCurrTool( sTool) + end local sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD) EgtSetCalcTool( sTool, sHead, 1) -- calcolo ingombri