Welcome to Our Community

Some features disabled for guests. Register Today.

Gcode trouble

Discussion in 'Other Software' started by ca. 280, Apr 29, 2023.

  1. ca. 280

    ca. 280 New
    Builder

    Joined:
    Aug 16, 2015
    Messages:
    74
    Likes Received:
    8
    Trying to setup a command button to check the Z axis is moving the prescribed amount.
    Here's the code; G91G21 G0Z10.0; G0X50.0Y50.0; G1Z-5.0F300; G4 P5.0; G1Z5.0F300;
    G0X0.0Y0.0; M2. Everything works fine up to the final X0Y0, it will not return to the starting point.
    What am I leaving out. Any assistance appreciated.
     
  2. Alex Chambers

    Alex Chambers Master
    Moderator Builder

    Joined:
    Nov 1, 2018
    Messages:
    2,772
    Likes Received:
    1,358
    You are in relative (G91) mode - moves are the specified distance from where you are at the beginning of the line.
    If you want to go back to where you set the workplace coordinates system zero (not necessarily where you started this routine) you need to put G90 before the last move. To guarantee going back to where you started, calculate how far you have moved away from the start position and use a G0 command (in relative mode) to move back that distance.

    Alex.
     
  3. ca. 280

    ca. 280 New
    Builder

    Joined:
    Aug 16, 2015
    Messages:
    74
    Likes Received:
    8
    Thank You
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice