G92 Z offset issue

Mike - What version of marlin are you using? Dual endstops? Has there been an update in the last couple of weeks so I should download and start using?

Jeff - You didn’t hurt my feeling (singular) with the troll comment. It will take a lot more than that to get me and my psychologist worked up.

FYI…off topic…I just uploaded my version of the router tool junk. https://www.thingiverse.com/thing:2769003

Another thing worth mentioning, I am in no way upset if I can’t use G92. As Mike mentioned, it is a low cost CNC and it won’t be perfect. I am SUPER EXCITED to have built it myself and all of the different things you can do to mod it. I am very grateful for the forum and the help you have provided me.

  • Andrew

Wow, I completely missed your response with the Theory listing and I pretty much just regurgitated what you said in Theory 1. (Which does work on my machine) And I see his response was that it moved 4mm.

I am confused by his statement in one of his follow up posts though:

“Here is what I am using for the Z axis currently (showing the Y axis end stop). https://www.thingiverse.com/thing:2720048 Basically what I am getting at is I am using a 3d printer end stop switch.”

I’m beginning to think your Theory 4 may be it…

Yes, dual endstop version from shortly after it was released. Not sure how to tell exactly which version it is though. Using these switches:

[attachment file=51673]

Wired into the Ramps board as NC (Normally Closed) per the endstop instructions. No changes to Marlin except for the pin mod to use PWM control for the laser.

Andrew, are you still manually bumping a switch when homing the Z axis like you said in the other post? Or are you really using a touch plate that is wired to the controller board? A photo of the Z axis perhaps?

I am currently bumping the end stop with my finger for the moment. I will eventually ditch the end stop and use a touch plate. I suppose I may do that sooner than later so I can just make the change in the firmware.

Attached is a video showing the setup (quality is low). Translation for Doo-dad in video is the spindle holder. Really can’t see it in the video because of the quality.

  • Andrew

I wonder if the manual activation is somehow confusing the controller. I don’t know the specifics of how the homing procedure works in the firmware, maybe it expects the switch to activate twice at the same Z location and because you may not be able to do that exactly by hand, it is messing with the axis? Maybe try letting the bit hit the switch and see what happens.

Well, did some testing and I would recommend you reflash the firmware. Nothing I tried through repetier or physically moving the touch plate to touch early or late in relation to the first touch caused any coordinate reporting errors on the LCD.

Here is what I saw: Power on, XYZ all have ? marks, Home X via LCD, repetier or G28, X on display shows -300 while travelling, touches the stops and changes to zero, then changes rapidly as the X axis bumps off and slowly travels back in. Exact same result on Y axis (except X now shows 0 and -300 is in Y). For Z home, Z on LCD shows -5.99 as it travels, it touches but did not change to zero, the bit retracts and starts back down again, still showing -5.99 until it touches the 2nd time, then sets to zero.

I don’t have enough knowledge to even guess why the firmware would sense the stop and then display a non-zero number.

Try what Ryan said, use the non-endstop version and just see what happens, or download the newest dual-endstop FW and give that a try without changing anything to test the Z homing first. If that works, then make the mods to reverse the switch polarity in the FW.

Mike, it’s not a homing issue. After startup, a G92 Z2 command results in the coordinates being set to Z=4.0. Nevermind the endstops or homes. I’m fairly confident it’s a bug in the firmware.

Mike - I am leaning toward the bug issue also.

Jeff or Ryan - Please point me in the correct location to make the firmware offset and I will reflash tomorrow.

  • Andrew

I don’t know if it helps, but I set up an entry in the Custom Commands section of configiguration_adv.h for homing Z using my 1mm thick touch plate.

#define USER_DESC_4 “Home Z”
#define USER_GCODE_4 “G28 Z\nG92 Z1\nG0 Z10”

The \n is a line break.
G28 Z will home the Z axis using the touchplate
G92 Z1 changes the current Z coordinate from 0 to 1mm
G0 Z10 raises Z 10mm so I can remove the touchplate and for the clearance above the workpiece I like to have when starting

This is working perfectly for me.

2 Likes

That is genious, Heath.

Andrew, I know this is 2+ years late, but sorry. I’m not sure why I didn’t respond then.