586,096 active members*
3,718 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2014
    Posts
    1

    Subroutine move to previous position

    Hello everyone, I need a little help with a program I am writing.

    Basically I am going to start at x0y0z0, mill a profile, clear the tool to above the fixture, return to x0y0, and back down to z0. Then I need to step down .005 and run the profile over again.

    Right now the code is telling it to go back to z0 after it clears the fixture and then incrementally move down .005. I need z to return to the same position as the last pass and then step .005. Is there a way to do this? See code below.

    Thanks


    G0Z1G0X0Y0
    S3200
    F10.4
    M3
    G90
    G1Z0
    G1X.46
    G1Y.75
    G1X0
    G0Z1
    G0Y0
    G0Z0


    M98 P1 L60
    G0Z5
    M30


    O1
    G91
    G1Z-.005
    G90
    G1X.46
    G1Y.75
    G1X0
    G0Z1
    G0Y0
    G0Z0 (Problem here.... need to return to previous passes z value)
    M99

  2. #2
    Join Date
    Jan 2014
    Posts
    20

    Re: Subroutine move to previous position

    G0Z1.995G0X0Y0
    S3200
    F10.4
    M3
    G90
    G1G91Z-1.995
    G1G90X.46
    G1Y.75
    G1X0
    G0G91Z1
    G0G90Y0
    G0G91Z-1.


    M98 P1 L60
    G0G90Z5
    M30


    O1
    G91
    G1Z-.005
    G90
    G1X.46
    G1Y.75
    G1X0
    G0G91Z2.
    G0G90Y0
    G0G91Z-2.
    M99



    This should work for you.

Similar Threads

  1. Question for previous builders.
    By nikodell in forum DIY CNC Router Table Machines
    Replies: 6
    Last Post: 04-20-2009, 12:55 PM
  2. Each pass different than the previous
    By gage1049 in forum DIY CNC Router Table Machines
    Replies: 4
    Last Post: 10-22-2008, 09:47 AM
  3. g code for repeat the previous move
    By woffler in forum G-Code Programing
    Replies: 6
    Last Post: 03-27-2008, 04:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •