GithubHelp home page GithubHelp logo

G92 gcode about grbl HOT 5 CLOSED

Highlander01 avatar Highlander01 commented on June 9, 2024
G92 gcode

from grbl.

Comments (5)

simen avatar simen commented on June 9, 2024

Good! I'll be happy to integrate your improvement.

from grbl.

Highlander01 avatar Highlander01 commented on June 9, 2024

Code I did is basically the same as MC_Line except I never call st_buffer_line


    case 92: gc.motion_mode = MOTION_MODE_REPOSITION; break;

switch (gc.motion_mode) {
case MOTION_MODE_CANCEL: break;
case MOTION_MODE_REPOSITION:
mc_reposition(target[X_AXIS], target[Y_AXIS], target[Z_AXIS],
(gc.inverse_feed_rate_mode) ? inverse_feed_rate : gc.feed_rate, gc.inverse_feed_rate_mode);
break;


void mc_reposition(double x, double y, double z, float feed_rate, int invert_feed_rate)
{
uint8_t axis; // loop variable
int32_t target[3]; // The target position in absolute steps
int32_t steps[3]; // The target line in relative steps

target[X_AXIS] = lround(x_settings.steps_per_mm[0]);
target[Y_AXIS] = lround(y_settings.steps_per_mm[1]);
target[Z_AXIS] = lround(z*settings.steps_per_mm[2]);

for(axis = X_AXIS; axis <= Z_AXIS; axis++) {
steps[axis] = target[axis]-position[axis];
}
memcpy(position, target, sizeof(target)); // position[] = target[]
}


from grbl.

Highlander01 avatar Highlander01 commented on June 9, 2024

I now have my first finished basic Python HMI/GUI code and OpenGL graphics and modified version of Grbl with G92 that lets me do repositioning and zeroing at:
http://github.com/Highlander01/Highlander01HMI

In "gcode" file I changed from version above and now do the following.
case 92: next_action = NEXT_ACTION_REPOSITION; break;

This ends up running a routine in the "motion_control" file:
case NEXT_ACTION_REPOSITION: mc_reposition(target[X_AXIS], ......

from grbl.

simen avatar simen commented on June 9, 2024

In the 'edge' branch I have implemented G92 according to your suggestions. Sorry it took so long!

from grbl.

Highlander01 avatar Highlander01 commented on June 9, 2024

Hello! good to see you added G92! I am finally get back to using Grbl and doing some cutting again. I have been out taking a break/building a 2nd/bigger cnc.

from grbl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.