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.
Yeah, the imgur video in the first post shows using G38.2 for X, Y, and Z.
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.
Yeah, the imgur video in the first post shows using G38.2 for X, Y, and Z.
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.
Thank you for your post. It helped me some in configuring my own Probe sensor.
To help others with specifics, here is what I did.
Been pondering doing this for a while, now I have to👍
Thanks for the write up
Just a quick question on the above,
A) Im using the archim board and #define Z_MIN_PROBE_PIN doesn’t appear in my firmware in the config.h file
B)Why do you comment out #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN and then hard code it back again in point 11?
Ive re read the thread and found out my answer to the above
More questions though
Im running 2.0 already
I have followed your instructions now and commented out
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
and tried to add in
#define Z_MIN_PROBE_PIN 32
Only when I come to compile I get an error stating
error “You must enable either Z_MIN_PROBE_ENDSTOP or Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use a probe.”
any ideas would be most useful
A) Don’t know. I did this on the RAMPS board with Marlin 2.0.
However I browsed to the Archim Series 1 source (link provided in the V1 firmware page), and drilled down to Marlin > Src > pins > pins_ARCHIM1.h and the first page on this shows that it is
#define Z_MIN_PIN 31 // PA7 MIIN ES3
B) I don’t know. I documented what I did to get it working, I didn’t spend anytime under the hood about why I had to do it. Note: If I enabled B the probe stopped working on Z MIN
lastly - Dont know. Again. I did mine on the RAMPS 1.4 download. I don’t have your board to test/experiment with.
Sorry I can’t be or more help.
I searched the code for that error and I didnt find it. Can you quote exactly the error message you got?
And also which version exactly are you running?
This is the original firmware I used, this works as it is no edits for the G38
Marlin 2.0
This is my Edit that errors
#error “You must enable either Z_MIN_PROBE_ENDSTOP or Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN to use a probe.”
This it the error
I followed these instructions. G38 works now, but G28 stopped. What’s the trick for getting both to work?
The key is to comment out “#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN” and uncomment the line further down “#define Z_MIN_PROBE_PIN 18 // Pin 32 is the RAMPS default” Notice I changed the pin to 18. If you look in the pins folder for your board you’ll be able to find which pin is the z_min pin and use it. It’s the workaround for the bug mentioned higher up in this thread.
I’ve got the Z axis working great with the above directions and G38.2, but I can’t get the probe to trigger for X and Y? M119 Shows that the X_MIN and Y_MIN trigger fine manually. Is there somewhere I need to define pins for X & Y probe? I can’t see it anywhere in the config.h.
X_MIN and Y_MIN are not used for G38.2 probing in the X and Y directions. Those use the probe pin, same as the Z probe.
I have a faint memory of there being a bug that only allows probing in the positive X and Y directions, and probing in the negative X or Y directions don’t work. Not sure if that memory is correct or not, or if it has been fixed since then, but try probing G38.2 in positive X and Y first to see if those work.
I’m using the z-max pin on my RAMBo for the G38.2 probing and the z-min pin for the G28. The G38.2 is a lot more work (everything is scripted) and a PITA if you change your origin…but I am self-taught (by doing a lot of reading) so there may be a better way.
…and there is a better way, by switching to relative positioning in the script after locating Z0. Trying to figure offsets from any random given XY position without relative positioning is a chore otherwise.
; set corner of workpiece at known approximate Xx Yy, Z above workpiece.
; assumes 1/4" (6.35mm) probe dia.
G90 ; absolute positioning
G28 X Y F300 ;home XY
G92 Z0 ; set Z, start with a known value
G00 X161 Y96 F300 ; location to probe for Z. Add 20 to approx. Xx Yy location
M0 Connect probe ; and click to continue. Assumes LCD is attached.
G38.2 Z-94 F300 ; probe Z, look for touch off, fault if not found within 94mm
G92 Z0.105 ; set Z0, allow for 0.105mm aluminum tape
G00 Z5 F300; raise Z 5mm
G91 ; switch to relative positioning
G00 X-30 F300 ; back away 30mm for X
G00 Z-11 F300; lower Z, probe for X 6mm below Z0
G38.2 X30 F300 ; probe X, keep reasonable probing distance
G92 X-3.280 ; set X0, allow for half of 6.35mm probe diameter + 0.105mm Al tape
G00 X-2 F300 ; back away from touch off
G00 Z11 F300 ; raise Z
G00 X20 Y-30 F300 ; go looking for Y
; repeat for Y
G00 Z-11 F300; lower Z, probe for Y 6mm below Z0
G38.2 Y30 F300 ; probe Y, keep reasonable probing distance
G92 Y-3.280 ; set Y0, allow for half of 6.35mm probe diameter + 0.105mm Al tape
G00 Y-2 F300 ; back away from touch off
G00 Z11 F300 ; raise Z
; switch back to absolute positioning
G90
G00 X0 Y0 Z5 F300 ; done!
I haven’t really thought of a good use for G38.2 positioning, but it’s kind of fun to watch. Also, I enabled M114_DETAIL in firmware so instead of setting X0/Y0, I modified the script above to report the touch position (M114). Of course, I have to add the probe/tape offset to those numbers to get an accurate positioning, but if I accept the offset as is and record it, then set X=0 Y=0, I can go back to that corner, so it’s kind of a reminder to write down the corner position if I need to go back to it.
I would be hard pressed to say why this is any better than simply jogging over to a corner with a joystick (thanks, @jamiek !) other than I have a dust shoe and it’s hard to position the probe accurately. I also have a corner square printed that I can pop into a couple of holes in the spoilboard and use that, but sometimes the material corners are kind of beat up. Lots of ways to do the same thing…
EDIT: woke up this morning thinking that reporting the XY position is only relevant if you have dual endstops.
Hey, I was trying to configure my marlin firmware to be compatible with g38 X Y Z probing, but after editing the code and trying to build, it says “one failed” and there are these problems:
When I was enabling G38, I ran into that problem. And when I attempted to address the Z_MIN issue, other errors popped up. In the end I got it working, and the exact recipe (lines changed in configuration.h and configuration_adv.h) I used can be found in this post. Note the specific recipe I outline creates a safe zone for homing Z. This works well with my “bitsetter,” but it will prevent you from using G28 with a touch plate. You will need to use G38 for any probing tasks.
Thank you so much, I just uploaded the code and it worked swimmingly! I have been chasing this for months (Maybe even a year at this point) And I am so grateful for your help! I may have some more questions soon as my curiosity continues to grow!
And my curiosity has sparked. I heard that estlcam has a feature that probes X, Y, Z, and then probes X/Y again to find the angle of the material. I I was wondering if there is any way to make this work with Cnc.js (Code changes the the firmware). This isn’t super important, but it would be a nice function for if i ever need to be extremely precise.
A new forum question appended to an existing question is often overlooked and not answered. If you want an answer, consider opening a new topic. I do not use Estlcam nor Cnc.js, so I cannot give you an answer.
I’ve seen this kind of functionality on laser engravers (camera detects rotation and position of stock), but I suspect it is implemented in conjunction with firmware support. In particular, some CNC firmware versions support G68 g-code, which rotates the coordinate system around a specified point. Marlin does not implement G68.
Consider using alignment pins or rules to keep your stock square to the machine. If the router is used to create the sockets for the alignment pins, and to contour cut the edges of the rules, any stock pushed against them will be square to the machine.
To be honest: You basically never use it, because you rarely have a workpiece that works with the outer edges of the wood. And placing it straight enough for a cut or having some sort of guide just makes it nearly useless.
Why do I say this? I am using Estlcam, I did mill a touchplate that can measure X/Y/Z and the angle and have used it twice in 2.5 years. Once to try it out, once to re-cut holes on a finished piece where I had to find the edge.