How do I edit Haas NGC Post to set tool change Z height to G53 Z4.0?

How do I edit Haas NGC Post to set tool change Z height to G53 Z4.0?

chohmanQ74YB
Advocate Advocate
551 Views
5 Replies
Message 1 of 6

How do I edit Haas NGC Post to set tool change Z height to G53 Z4.0?

chohmanQ74YB
Advocate
Advocate

I would like to edit the Haas NGC Post for a GR510 so that the height it goes to when prompted for a tool change is G53 Z4.0. The work around for now has been to manually edit the g code where ever there is a corresponding Z0 to edit it to Z4.0. The reason for this is that the machine offers about an additional 4 inches of Z travel above G53 Z0 (tool change height), but there are parts and fixturing which is present at this height.

0 Likes
Accepted solutions (1)
552 Views
5 Replies
Replies (5)
Message 2 of 6

Arun.rs
Autodesk
Autodesk

HI @chohmanQ74YB 

 

You can use the Machine Definition to edit the 'Home Position' value instead of using '0'. This will result in a G53 Z move with the specified value.

 

Arunrs_0-1753955740456.png

 

If my post answers your question, please click the 'Accept Solution' button. This helps everyone find answers more quickly!



Arun.RS
Senior Technology Consultant

0 Likes
Message 3 of 6

chohmanQ74YB
Advocate
Advocate

@Arun.rs thank you for the help! This worked, but it is only half of the battle.

 

The edits to the kinematics does in fact raise the machine to Z4 when prompted to do a tool change, however after the tool change the tool travels over to the part at Z0 which can be problematic depending on the shape of the part and work holding.

 

How can I make the machine raise to Z4 after a tool change before traveling over to the part? We have worked around this by manually entering a move command following the tool change, but I would to be able to do this in Fusion if possible.

0 Likes
Message 4 of 6

BobVawter
Advocate
Advocate
Accepted solution

I solved this issue in my SMM2+Trunnion setup by raising the home Z and adding the following in onCommand()'s  case COMMAND_LOAD_TOOL.  This diff is against NGC Inspection r44168, but it will be similar for the plain NGC post.

 

diff --git a/haas_ngc.cps b/haas_ngc.cps
index b8d90c7..a12ac38 100644
--- a/haas_ngc.cps
+++ b/haas_ngc.cps
@@ -1609,6 +1609,11 @@ function onCommand(command) {
     if (measureTool) {
       writeToolMeasureBlock(tool, false);
     }
+    // Ensure the machine is at our expected home position.
+    if (machineConfiguration.getRetractPlane()) {
+      state.retractedZ = false;
+      writeRetract(Z);
+    }
     // preload tool is handled within onSection
     return;
   case COMMAND_LOCK_MULTI_AXIS:

 

Owner, CNC.LLC
0 Likes
Message 5 of 6

chohmanQ74YB
Advocate
Advocate

Here is the modified code in onCommand()'s  case COMMAND_LOAD_TOOL

chohmanQ74YB_0-1758657921587.png

 

I posted a test program and I believe it worked! Check out line N30 following the tool change. Does this look correct?

chohmanQ74YB_1-1758658026779.png

 

 

0 Likes
Message 6 of 6

BobVawter
Advocate
Advocate

That all looks correct to me.  There's an M6, immediately followed by a retract to Z4.

Owner, CNC.LLC
0 Likes