G38.X support in Marlin

This topic contains 3 replies, has 2 voices, and was last updated by  Guffy 3 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #95913

    Bruh
    Participant

    I’ve been playing around with making an aluminum Turners Cube on the MPCNC and found myself wanting a way to easily set the origin of the machine to the corner of the work. For this project I’m mounting the workpiece in a 3 inch vise. I replaced the metal vise jaws with 3d printed ones to avoid marring the aluminum. After squaring the stock, the Turners Cube requires making the same cut on all 6 sides of the cube. I realize that I could have mounted a stop on the vise to get repeatable clamping but what fun would that have been?

    I started by trying to modify Ryan’s firmware by enabling G38_PROBE_TARGET, FIX_MOUNTED_PROBE, and Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PINwith no luck. I also saw elsewhere on the forums that some G38.Xwas broken for the firmware versions that most of us use. I ended up merging the latest bugfix-2.0 branch of Marlin into Ryan’s firmware and still had no luck. A couple of hours of debugging C++ macro hell later on my updated firmware (seriously, how anyone keeps up with the amount of preprocessing in marlin amazes me) I found that manually configuring Z_MIN_PROBE_PINfixed my issues. Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN seems buggy and doesn’t set the appropriate pin to be monitored by G38. Last of the nuts and bolts that I’ll mention is that for anyone wanting to dive any deeper into Arduino than modifying config values should consider setting up a proper IDE and tooling to make life easier. I took a step away from my usual linux dev tools and followed this guide to get going.

    Enough blabbing. Here’s a clip: https://i.imgur.com/n90gSV8.mp4

    It’d be cool to see this supported out of the box for MPCNC users. Is there anything keeping to to the version of marlin that Ryan ships his boards with?

    1 user thanked author for this post.
    #95948

    Guffy
    Participant

    I had played with Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN – had no luck. So you propose just assign same z min pin as probe pin and g38 begin to work?

    Does side probing workable too (g38 x or g38 y)?

    #95962

    Bruh
    Participant

    So you propose just assign same z min pin as probe pin and g38 begin to work?

    With newer builds of marlin, yes. The latest builds support manually setting the Z probe pin. Be sure to read through the docs before tweaking that setting.

    Does side probing workable too (g38 x or g38 y)?

    Yeah, the imgur video in the first post shows using G38.2 for X, Y, and Z.

    1 user thanked author for this post.
    #95968

    Guffy
    Participant

    Probably i was impatient and didn’t watch the video to x/y part, saw only z.

    Ok, great. Then it looks like x/y probing also possible to be used in fusion 360 pp.

    By the way, i had fixed marlin to support g54-g59. You may find in in my github.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.