Feature Request: Add Ability To Use G38.2 Command (CNC) #4677

Skip to content Dismiss alert {{ message }} / Marlin Public
  • Notifications You must be signed in to change notification settings
  • Fork 19.3k
  • Star 16.3k
  • Code
  • Issues 696
  • Pull requests 98
  • Actions
  • Projects 1
  • Security
  • Insights
Additional navigation options New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump to bottom Feature request: add ability to use G38.2 command (CNC) #4677 Closed Bob-the-Kuhn opened this issue Aug 21, 2016 · 11 comments Closed Feature request: add ability to use G38.2 command (CNC) #4677 Bob-the-Kuhn opened this issue Aug 21, 2016 · 11 comments Labels T: Feature Request Features requested by users.

Comments

@Bob-the-Kuhn Copy link Contributor

Bob-the-Kuhn commented Aug 21, 2016

Some CNC programs are now automatically adding the G38.2 commands to the gcode files. It would be nice to have this implemented in Marlin.

All reactions @Roxy-3D Copy link Member

Roxy-3D commented Aug 21, 2016

Do you want it to do the probe? Or do you want all the output the command generates? What exactly are you trying to accomplish?

All reactions @thinkyhead Copy link Member

thinkyhead commented Aug 22, 2016 edited Loading

RepRap GCode doesn't use the full GCode specification, but is more "inspired by" GCode, so we won't be implementing any codes with decimal points. The feature request is fine, but should be restated as a request for "a command to automatically establish the tool height from the build surface using the nozzle (or tool) as a conductor or switch."

As it happens, you can use a probe for homing with G28 and that works for any situation where you have already established the distance from the probe to the nozzle. Many machines, particularly deltas, have taken to using the nozzle itself as the probe by placing it on a spring-loaded gantry with a simple switch mounted above. Some machines do pass current through the nozzle to use it as the switch. Take a look at the Prusa i3 MK2 for example.

Marlin does not currently support CNC features or in-place tool-changing, so that would need to be established first to make G38.2 (or equivalent) viable.

All reactions @thinkyhead thinkyhead added the T: Feature Request Features requested by users. label Aug 22, 2016 @Bob-the-Kuhn Copy link Contributor Author

Bob-the-Kuhn commented Aug 23, 2016

I like how it was restated except it sounds like it's just for the Z axis. I'd like this to be available for the X, Y and Z axis.

Maybe something like "command(s) to automatically establish the tool location from the build origin along an axis using the nozzle (or tool) as a conductor or switch."

Bob

All reactions @thinkyhead Copy link Member

thinkyhead commented Aug 23, 2016 edited Loading

available for the X, Y and Z axis

You're talking about something which pertains very well to CNC, but not so much to 3D printing, at least not at the RepRap level. That said, we have a thread going already on the subject of implementing more general CNC style support within Marlin. I think you would do well to jump on that topic, look at what has already been discussed, and put in your 2¢.

All reactions @Bob-the-Kuhn Copy link Contributor Author

Bob-the-Kuhn commented Aug 23, 2016

I see you've already added this request to the more general CNC style support thread. Thanks

That thread seems to be almost exclusively aimed at laser engraving. I don't mind bothering them.

I'm puzzled about your G28 comment. As best I can tell G28 will do a two stage move to the origin unless Z_SAFE_HOMING is enabled and the Z probe signal activates. Is there something similar for the X & Y axis?

Bob

All reactions @Bob-the-Kuhn Bob-the-Kuhn mentioned this issue Aug 23, 2016 [FR] Standard Marlin for Cutting CNC machine(plasma , laser) #3208 Closed @Bob-the-Kuhn Copy link Contributor Author

Bob-the-Kuhn commented Sep 12, 2016

Attached are the modified files implementing G38.2 and G38.3 commands on Marlin 1.02

Bob Marlin_G38.zip

All reactions @thinkyhead Copy link Member

thinkyhead commented Sep 13, 2016

I'd personally rather you used the tools for making PRs provided by Github rather than asking me to do the work for you. My time is very limited right now, and it's not cheap.

All reactions @Bob-the-Kuhn Bob-the-Kuhn mentioned this issue Sep 13, 2016 add G38.2 & G38.3 commands to Marlin (issue 4677) #4801 Closed @Bob-the-Kuhn Copy link Contributor Author

Bob-the-Kuhn commented Sep 18, 2016

I've created a pull request for this feature request.

All reactions @thinkyhead Copy link Member

thinkyhead commented Sep 18, 2016 edited Loading

Your pull request didn't go to the right place (the RCBugFix branch). Keep trying.

All reactions @Bob-the-Kuhn Bob-the-Kuhn mentioned this issue Sep 19, 2016 code changes to implement G38 commands #4845 Closed @Bob-the-Kuhn Copy link Contributor Author

Bob-the-Kuhn commented Sep 19, 2016

Pull request 4845 was just created to implement the G38.2 and G38.3 commands.

#4845

All reactions @thinkyhead thinkyhead closed this as completed Sep 27, 2016 @thinkyhead thinkyhead mentioned this issue Sep 29, 2016 Cleanup of G38.2 / G38.3 #4900 Merged thinkyhead pushed a commit to thinkyhead/Marlin that referenced this issue Oct 1, 2016 @Bob-the-Kuhn @thinkyhead code changes to implement G38 commands 2911aa7 1) modified 3 code files Marlin.h Marlin_main.cpp endstops.cpp 2) modified config files so I could test on my machine Testing was done on an AzteegX3pro based machine. The probe was hooked to the Z_MIN endstop. My controller doesn't have a dedicated Z_PROBE input so I couldn't test that functionality. Verified that a large file (without any G38 commands) executed the same before and after the changes. Verified that the head moves as expected when G38.2 and G38.3 commands are issued. Single & multiple axis moves were tested along with + and - directions. Code was added to the main ISR. In normal operation only one extra IF statement is evaluated. I didn't notice any performance degradation because of the added code. The G38 commands are expected to be issued manually by the operator during machine setup. The G38 commands wait until the machine is idle before proceeding. That way the other commands are minimally impacted by the extra ISR overhead when a G38 command is in the queue. The G38 commands are very similar to the G28 commands except 1) only the Z_PROBE is used and movement can be in the + or - direction. See issue 4677 for a discussion on adding G38 commands to Marlin. Feature request: add ability to use G38.2 command (CNC) MarlinFirmware#4677 @github-actions Copy link

github-actions bot commented Apr 3, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

All reactions @github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2022 Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in. Assignees No one assigned Labels T: Feature Request Features requested by users. Projects None yet Milestone No milestone Development

No branches or pull requests

3 participants @thinkyhead @Roxy-3D @Bob-the-Kuhn You can’t perform that action at this time.

Từ khóa » G38.2 Cnc