Tool Change G Code and Z Touch Plate

I do not know about clamps. Send me the link and I will take a look.

It achieves the same thing, that was before dual endstops and dual endstops should be more accurate.

You are getting pretty deep, you really might just want to get more cutting time under your belt and the things you really need will start to present themselves. The only time you should ever need accurate Z control, and homing is tool changes or production with Jigs. Any other time and you should be doing a facing operation or not worrying about it. Who cares if your project is less than a millimeter off it the Z direction, It really really has never effected anything I have ever done.

You can do soooo much without changes tools, at worst it just takes a bit more time cutting.

Make some stuff, do some carves. We got along fine for years without it, have fun and put away the calipers for a little while.

Yeah you’re probably right.

Just tried it out, worked great. Had to sit for an hour and watch for the pause, but had plenty of time to swap out and off it was running.

Thank you sir!

 

 

So where should the wires attach to the full size Rambo 1.4 for the z probe?

Z-min endstop port.

1 Like

Thanks!

I wanted to modify this a bit and display some important notifications on the LCD that tells me what the next step is. I intend on adding Z offset in my FIRMWARE not in the GCODE. This way I can do Z auto homing from both SD card and LCD. I wrote the following but have questions.
Question 1: If the machine stops at line 1, its still in the middle of the work piece right? Don’t I need to add some code to raise up before I move it to the X0Y0 position?
Question 2: Because I’m programing Z offset in my firmware I don’t believe that line 10 is required. Is this true?
Question 3: Line 11 is still required right? Even if I don’t need the offset line listed above, because it’s in the firmware, I still need to set the new position to zero correct?
1=M0 Turn off Spindle (stop machine and display “Turn off Spindle”)
2=G0 X0.0000 Y0.0000 F2100 (Move to zero on X and Y)
3=M18 Z (Disable Z Stepper Motor. This is disabled so you can manually move the Z axis up to get the new bit in)
4=M0 Tool <n> (Display “Tool XXXXX”, where XXXXX is the next tool im using)
5=M0 Z Touch Plate (Display “Touch Plate”)
6=G28 Z (Home Z axis to touch plate)
7=G1 Z2 F150 (Raise Z axis 2mm at a feedrate of 150 in order to remove your touch plate)
8=M0 Remove Touch Plate (Display “Remove Touch Plate”)
9=M0 Turn on Spindle (Display “Turn on Spindle)
10=G1 Z-0.4 F150 (This sets the negative offset of the thickness of your touch plate. In my case, i use a .4mm feeler guage. This would be changed to the thickness of your touch plate. Make sure and leave it negative.)
11=G92 Z0 (This now sets the Z axis to zero at the offset above, meaning the top of your workpiece)
12=G0 Z5.0000 F480 (This pulls the z axis back up off the workpiece at a feedrate of 480)
13=G0 X0.0000 Y0.0000 Z0.0000 F2100 (Go to zero on all axis. Probably not necessary but i like to do it)
14=G0 Z5.0000 F480 ( Pull the Z axis back up off the workpiece at a feedrate of 480)
Does this work?

10-14 are not neeeded. G92 does not have to be Zero, just tell it where it is. You are moving it up and down 3-4 times. Touch the plate, move to a safe distance, tell it where it now is, start your job.

I have tried this your code.
But after it does the Zero on the touch plate. I this error message.
Any ideas what is happing?

A fatal error on the pinter side stopped the printer until the error is fixed.

I have tried this code.
But after it does the Zero on the touch plate. I this error message.
Any ideas what is happening?

A fatal error on the printer side stopped the printer until the error is fixed.

Wild guess: Repetier-Host has decided to freak out about a bad value, most likely a thermistor value of 0 (i.e., it thinks your extruder is cold).

Your best bet would be to open a new thread in the #mostly-printed-cnc-mpcnc:getting-started (MPCNC:Troubleshooting) section rather than trying to reuse this thread. Ultimately, there are too many variables that could be causing the issue, so it’s better to get your own thread that’s focused on just your build and your environment.

2 Likes

I just started using this code and so far it seems to work great up until today. My question is if I was to add the G28 code with dual end stops, it should home all three axis and eliminate any chance of the offset not being correct after the tool change. The reason I ask is I had a project going and after the tool change it ended up being about an 1/8 of an inch off.

I know this is a bit of an old topic but I found it while looking to post my own question so I felt it was the right place to reply to.

I have a simple test I am going to be running and I have decided to try the whole “change tool” piece to see if I can get it to work. If not, I will go back to running jobs per tool. But wondering if someone would have a look at a snipet of my gCode where I added Andy’s little script from the OP.

Does the middle section of code look right?

G01 Z-13.3788 F900
G00 Z0.5000 F480
G00 Z3.0000 F480

M0 Turn Spindle OFF
G0 X0.0000 Y0.0000 F2100
M18 Z
M0 Tool
G28 Z Touch Plate
G1 Z2 F150
M0 Remove Touch Plate
M0 Turn Spindle ON
G1 Z-0.4 F150
G92 Z0
G0 Z5.0000 F480
G0 X0.0000 Y0.0000 Z0.0000 F2100
G0 Z5.0000 F480

G00 X27.2172 Y179.4463 Z3.0000 F2100
G00 Z0.5000 F480
G01 Z0.0000 F180

@am0254338

Thanks for the gCode on this. I am currently learning tool changes to really dive into V-Carving. I am wondering about the quoted lines of gCode here, this is at the start of your LCD tool change code. If I rea this right, I don’t see a Z +mm for getting the tool out of the pocket before it traverses to X0 Y0. Am I missing it? As in, is it already up away from the top of the piece at the end of the last pocket with the gCode for pockets completed to it’s free to traverse to 0,0?

On this line - could I include a Z100 so I can reach under the plate (Lowrider2 platform here) to do the tool change? Currently I am running a Bosch router with a finicky release that I worry that I won’t be able to remove it without moving X&Y. I have plans drawn up to cut out and change the sled to something more rigid. But I’ve a couple honey-do list items before getting into that.

Sorry, I’m not quite savvy on gCode language yet. I can read it a bit to see the flow, but I don’t know where I can inject stuff just yet.

Edit: This afternoon I ran a simple test with a circle with island - nothing special, just two circles. My thoughts on the above code - the LCD doesn’t allow you to enter into the menus to raise the Z - obvious as the gCode disable the stepper - so I will need to edit a line or two to make sure I can raise the sled high enough for me to unclip the plate wire from the tool bit. It’s a little tough when the spindle rides high up in the sled. I also got over my fear of moving the sled while pulling the spindle out to change tools. I think this will workout fine! Thanks @am0254338 for the work!