Z-Endstop: z-max, z-min and z-home with dual endstop

Hello,

the more I read about the end stops on the Z axis, the more I get confused. It almost seems to me that everybody does it somehow differently and that maybe even the measuring plate is confused with the Z-Min.

So what is right with a CNC machine:
I assume that the z-home is there when the cutter touches the workpiece.
1.) Correct?

2.) But where does the z-Endstop Min go?
=> as a protection that the lift does not slip out of the holder when it goes up?
=> Or is the Z-Endstop for measuring the measuring plate?

3.) I ask myself, what exactly is z-min and z-max?

4.) Is it possible to operate z-min and measuring plate together? Or maybe even z-max?

Once it is the drive up, once it is the drive down.
And I would like to protect myself that the lift does not go up too far, so that it slips out of the holder.

I use dual-endstop FW on an Arduino 2560.

Thanks in advance.

Fi

Endstops aren’t needed on a cnc machine. The location of zero is critical, but it is not determined by the machine boundaries, it is determined by the workpiece boundaries. (The reason we use dual endstops is to square the machine, not set the origin).

In your CAM, you can choose where to put your origin. It may be the top of the work, top of the spoil board, or any arbitrary place. I always use the top of the workpiece.

When you set up a job, you can move the Z to the height you want and then reset the zero from the lcd, or from a computer with G92 Z0.

The endstop configuration does not limit z from climbing too high, or plunging too low. The endstop switches are only for homing. You should just watch out, and it isn’t going to destroy anything if you go too far.

If you want to measure the Z very precisely, you can use a touch plate. It is not required, at all. But you can attach one to the Zmin endstop port. When you home Z (G28 Z), it will plunge until the circuit closes. Then you can adjust the Z coordinates for the thickness of the touch plate.

3 Likes

Thanks Jeff again for your informative answers!

So a touch plate is connected to the z-min sensor PIN on the driver board and not in addition to the z-min sensor somewhere else on the board?

I use the customized Marlin FW from you with RAMPS 1.4

Do you mean the FW from Ryan (allted on github)? I don’t have a firmware published for ramps.

You should connect the plate to the zmin (s). The router bit to zmin (-).

You can test it by sending M119. Zmin should only show triggered when you touch the bit to the plate. If that works, you can send G28 Z to home the Z.

1 Like

Don’t forget to adjust the offset for the Z height by the thickness of your touch plate or your depth will be short by the thickness of the touch plate. something like this for a full script of the Z homing process:

G28 Z Home Z Axis to touch plate
G1 Z5 F150 Raise Z axis 5 mm at a feed rate of 150 in order to remove your touch plate
G1 Z-0.5 F150 This sets the negative offset of the thickness of your touch plate. In my case, i use a .5 mm touch plate.
G92 Z0 This now sets the Z axis to zero at the offset above, meaning the top of your work piece
G0 Z5.0 F500 This pulls the z axis back up off the work piece at a feed rate of 480
G0 X0.0 Y0.0 Z0.0 F2000 Go to zero on all axis to verify the origin is set correctly before running the job.
M0 Pause until the LCD screen knob is pushed to resume to allow time to see the origin setup.
G0 Z5.0000 F500 Pull the Z axis back up off the work piece at a feed rate of 480

I’m reading this as home to the touch plate, go up 5mm, then down 0.5 (to 4.5), then call that 0. Am I reading that right?

Could these three lines be replaced by G92 Z0.5?

The coordinates in the G1 command are absolute moves, not relative - so the “G1 Z-0.5 F150” is saying go to Z=-0.5, not move Z by -0.5… So this is Home (to the top of the touchplate), go up 5mm (room to remove the touchplate), then go down to -0.5 (moving down 5.5mm, compensating for the touchplate thickness), then call this new position 0.

Yes - except it doesn’t give you any slack to remove the touchplate.

Thanks. I knew it was the difference between relative and absolute, but I couldn’t wrap my head around the solution.

Ummm… G90 and G91 switch between absolute and relative positioning. G0 and G1 are rapid linear move and linear move.

edit: I re-read your post, and you are just pointing out that the G1 is absolute, which is true by default. For some reason, my brain interpreted it as “G1 is absolute, but G0 is relative”, which is not what you meant. Ugh… Stupid brain…

In theory, you use G0 when not interacting with the workpiece, and G1 when you are. This allows different max speeds to allow fast travels when you’re not cutting/engraving/extruding/etc.

If you want relative positioning, you have to use G91, then go back to absolute using G90. G0/G1 use whichever positioning is in effect at the moment. (Absolute is the default)

Marlin doesn’t differentiate between G0 and G1.

Per https://marlinfw.org/docs/gcode/G000-G001.html “For Cartesians and Deltas the G0 (rapid linear movement) command is (and must be) a direct alias for G1 (rapid movement).”

1 Like

Also per Linear Move | Marlin Firmware “Marlin 2.0 introduces an option to maintain a separate default feedrate for G0 . Note: Slicers tend to override firmware feedrates!”

edit: and “Developers: Keep using G0 for non-print moves. It makes G-code more adaptable to lasers, engravers, etc.”

They’re trying… :wink:

True - however, given the context of the original post:

absolute coordinates were in play…

Yup. My brain lied to me (I think it’s trying to cosplay Gríma Wormtongue), and I figured it out after I posted. I also figured the info I spewed was still valuable info, so I left the post and just edited in an acknowledgement that I was betrayed by my vile deceiver of a brain.

1 Like

Ummm… Just wanted to say “Ummm…” carry on.

Do you mean “Um”?

1 Like

Right, I thougt the FW was from you.

BUT I have not solved my Issue with Z.

Let me go to the native control with the LCD and the knop.

If I press “go home”:
x drive to home, afterwards y and then Z. It moves the silder upwards until it spring out of the middle assambly.
And this is odd, isn’t?

Yes. For one thing, I would have expected it to stop if it was detecting a TRIGGERED.

  1. Have you tried an M119 to confirm the Zmin is triggering appropriately?

  2. Does Z move down when you try to move it negative?

There seems to be some information that I’ m missing, I’ m sorry.
There is nothing what should be triggered. :thinking:
This is, why I started this thread.

a.) I am powering on the CNC. The middle assy is somewhere.
b.) No I would like to square them (dual endstop)
b.1.) => I am going to use the LCD, select “Motion" => "Auto Home”.
b.2.) => Now it starts with moving x, then y and then Z. X and y are working well (moving to the lower left corner). Z Assembly goes up and would jump out of the assembly.
Z would never be triggered, because there is NO Z Endstop!
Z Endstop, so I understand your answer before, is the touch plate. But if the lift goes up,… :frowning:

Z+ on LCD or in CNCjs moves down.
Z- on LCD or in CNCjs moves up.
Is this right?

I checked again my Cable. There is only one connector, connected to the RAMPS board (no extension of the cable with additional connector, which could be twisted!)
I tried also both Z connections on the RAMPS Board.2020-03-26 16_49_55-Window

That is the opposite of mine

No. This needs to be flipped. That is explaining half of it.

Instead, go into the custom menu, and home X and Y separately, and only home Z if you are using a touchplate. You should be able to get the touch plate, and the home Z to work, but you can square the machine by just homing X and Y. If you want to dive into the touch plate and Z min (which is what a lot of the talk here has been about), we can. But probably wait until you are up and running with the XY homing.