Tool Change Position and Full Retract

Tool Change Position and Full Retract

Steinwerks
Mentor Mentor
1,080 Views
1 Reply
Message 1 of 2

Tool Change Position and Full Retract

Steinwerks
Mentor
Mentor

Just thought I'd share a post edit that I performed for a friend today. He's running a tall part on a Haas Mini Mill and needed to insert a tool change position that would retract the tool to the full height (G53 Z4.) and then move the part away from the carousel, and after the tool change would move the tool back to clearance height before moving to the work offset.

 

Although there are a few hardcoded numbers (easiest to do on a lunch break) this wouldn't be too difficult to pull from the machine configuration in HSMWorks or the stock definition in any of the HSM flavors I think.

 

I created a user property called toolChangePos and modified a couple sections like so:

 

Starting at line 737

 

 

    // retract to safe plane
    retracted = true;
    if (properties.useG28) {
		if (properties.toolChangePos){
		    writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(4));
		    writeBlock(gFormat.format(28), gAbsIncModal.format(90), "X" + xyzFormat.format(-16), "Y" + xyzFormat.format(0));
		} else {
			writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(0));
		}
    } else {
		if (properties.toolChangePos){
			gMotionModal.reset();
			writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), "Z" + xyzFormat.format(4));
			writeBlock(gFormat.format(53), gMotionModal.format(0), "X" + xyzFormat.format(-16), "Y" + xyzFormat.format(0));
	    } else {
            gMotionModal.reset();
            writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), "Z" + xyzFormat.format(0));
		}
    }
    writeBlock(gAbsIncModal.format(90));
    zOutput.reset();

 

 

and line 803

 

 

    writeToolBlock("T" + toolFormat.format(tool.number), mFormat.format(6));
    if (tool.comment) {
      writeComment(tool.comment);
    }
	if (properties.toolChangePos){
		if (properties.useG28) {
          writeBlock(gFormat.format(28), gAbsIncModal.format(91), "Z" + xyzFormat.format(4));
        } else {
          gMotionModal.reset();
          writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(4), "Z" + xyzFormat.format(0));
        }
	}

 

Critiques and feedback welcome.

 

Post attached.

 

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
1,081 Views
1 Reply
Reply (1)
Message 2 of 2

leighCB8FK
Enthusiast
Enthusiast

I've done a Next Gen PP with optional Safe Z , and User Value for Safe Z, use 4 for Imperial or 100 for metric.
I've also added a Drill E reverse speed field, if set it will reverse the drill after each hole to clear chips if not needed set to zero.

Link to my PP below.

https://drive.google.com/file/d/189t4oY4mYt7gRLBcg7aCnDBLp70JLOIs/view?usp=sharing

 

0 Likes