diff --git a/Common_ONE-PF.mlpe b/Common_ONE-PF.mlpe index 017ad8b..7131f65 100644 --- a/Common_ONE-PF.mlpe +++ b/Common_ONE-PF.mlpe @@ -537,14 +537,6 @@ function OnSimulToolSelect( dPosA) end end - -- se ho due teste, verifico che l'altra sia dalla parte opposta - --if EgtGetHeadId( 'H21') then - -- if nSetHead == 1 then - -- EgtSetAxisPos( 'X2', MinX2) - -- else - -- EgtSetAxisPos( 'X1', MaxX1) - -- end - --end -- se sega a catena, imposto subito angolo scelto per asse virtuale A if HeadIsChainSaw( EMT.HEAD) then -- apro le paratie @@ -624,8 +616,8 @@ function OnSimulToolDeselect( dPrevA) -- nascondo l'utensile sulla testa EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN) -- se non è chiamata per cambio angolo di presa della sega a catena - if not dPrevA then - local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 1, false) + local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 1, false) + if not dPrevA or not sTool then -- imposto correttamente i dati di testa local OrigEMC = EMC EMC = { HEAD = sHead, TOOL = sTool, TCPOS = sTcPos, TOTDIAM = 0} @@ -651,13 +643,13 @@ function OnSimulToolDeselect( dPrevA) -- nascondo l'utensile sulla testa EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_MD.HIDDEN) -- se non è chiamata per cambio angolo di presa della sega a catena - if not dPrevA then + local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 2, false) + if not dPrevA or not sTool then -- cambio utensile EgtSetAxisPos( 'C2', ParkC2) EgtSetAxisPos( 'B2', ParkB2) EgtSetAxisPos( 'Z2', MaxZ2) SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID) - local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 2, false) local OrigEMC = EMC EMC = { HEAD = sHead or 'H21', TOOL = sTool, TCPOS = sTcPos, TOTDIAM = 0} OnSetHead() diff --git a/Common_ONE-PF.mlse b/Common_ONE-PF.mlse index 256a612..a785a63 100644 --- a/Common_ONE-PF.mlse +++ b/Common_ONE-PF.mlse @@ -477,7 +477,7 @@ function OnSpecialLink() EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3}, 30, 2, 2, 'FirstClimb=1;') EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2p, EMC.R3}, 30, 2, 2) if abs( EMC.R3) < 0.1 then - EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z1, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2) + EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z2, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2) else EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2) end diff --git a/Essetre-ONE.mlde b/Essetre-ONE.mlde index 5766c10..e6be0ca 100644 --- a/Essetre-ONE.mlde +++ b/Essetre-ONE.mlde @@ -32,7 +32,7 @@ require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '3.1f1_RC8' +PP_VER = '3.1f1_RC9' PP_NVER = '3.1.6.1' MIN_MACH_VER = '2.5k1' MACH_NAME = EgtGetCurrMachineName() @@ -848,9 +848,6 @@ function OnSetHead() EmtModifyAxisHome( 'C1', GetChainSawCHomeFromVirtualAxis( CSawPosA)) EmtModifyAxisHome( 'B1', ParkCSawB1) EmtModifyAxisDirection( 'B1', X_AX()) - -- se testa H15 (mortasatrice di One) - elseif EMC.HEAD == 'H15' then - error( 'Error : Mortiser not yet managed') end end