Page 1 of 2 12 LastLast
Results 1 to 12 of 18

Thread: Trying to make this work- G code

  1. #1
    Registered WOODKNACK's Avatar
    Join Date
    Mar 2003
    Location
    Maine
    Posts
    271
    Downloads
    0
    Uploads
    0

    Trying to make this work- G code

    Hey guys,
    Maybe someone out here can figure this one out. I have a program that is suppose to move my x axis 4 inches one way and then back again 50 times! But I cant seem to get it to repeat? Anybody have any ideas?

    F10
    G20 G90
    M98 P1234 Q50
    o1234
    G1 x4
    G1 x0
    m99
    My little piece of the web!
    http://users.adelphia.net/~wjdupont



  2. #2
    Registered
    Join Date
    Apr 2003
    Location
    UK
    Posts
    1,079
    Downloads
    0
    Uploads
    0
    I don't understand g-code that well, but I'll tell you what I know!
    Firstly, you cannot have 2 g's on the same line, so you will have to seperate G20 and G90.
    Secondly, I have just looked through the turbocnc manual, and it does not mention M98 and M99. In the turbocnc example (sample.cnc) the writer uses M60 and M62 to call sub-routines, so maybe this should be used instead.
    Like I said, I do not know g-code, I have only read the instructions!


  3. #3
    Registered Rekd's Avatar
    Join Date
    Apr 2003
    Location
    teh Debug Window
    Posts
    1,876
    Downloads
    0
    Uploads
    0

    Re: Trying to make this work- G code

    Originally posted by WOODKNACK

    F10
    G20 G90
    M98 P1234 Q50
    o1234
    G1 x4
    G1 x0
    m99
    the "O"1234 is for a seperate program.
    Do this;

    Code:
    %
    O1
    F10.
    G20 G90
    M98 P1234 Q50
    M30
    
    O1234
    G91
    G1X4.
    X-4.
    M99 
    %
    Assuming you're on a Fanuc compatable, make it just like that. You don't have decimal points on your feeds and X moves either.

    The G90 and G20 are ok on the same line, G20 is (likely, depending on the control,) Inch programming, the G90 is Aboslute.

    :edit:
    If you're typing this in at the controller, you'll need to remove the "%"'s, and seperate the program. Create a new program, using 1234 as the number, and put the "lower" code in that program.
    :/edit:

    'Rekd teh B.U.M.A.


  4. #4
    Registered WOODKNACK's Avatar
    Join Date
    Mar 2003
    Location
    Maine
    Posts
    271
    Downloads
    0
    Uploads
    0
    Still cant get it to work. Stops at m30 code?
    My little piece of the web!
    http://users.adelphia.net/~wjdupont



  • #5
    Registered
    Join Date
    Apr 2003
    Location
    UK
    Posts
    1,079
    Downloads
    0
    Uploads
    0
    Rekd, when you say it's ok to have the two g's on the same line, are you talking about TurboCNC, or g-code in general? Also, I have re-read the instructions, and I have also noticed this:
    ************
    Code letters:
    ************
    Blah, blah....

    D,L,H,Q Future Use
    etc...
    So does this mean that the Q values are not implemented yet?


  • #6
    Moderator HuFlungDung's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    4,826
    Downloads
    0
    Uploads
    0
    You have to read the manual

    There is no way we could possibly guess what gcodes and associated parameters will work unless you can quote the relevant pages from your manual. Computers are very unforgiving of syntax errors!
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • #7
    Registered Rekd's Avatar
    Join Date
    Apr 2003
    Location
    teh Debug Window
    Posts
    1,876
    Downloads
    0
    Uploads
    0
    Rekd, when you say it's ok to have the two g's on the same line, are you talking about TurboCNC, or g-code in general? Also, I have re-read the instructions, and I have also noticed this
    that's on a fanuc or most fanuc compatables.

    Try replacing the "Q" with an "L" and see if that works.
    Matt
    San Diego, Ca

    ___ o o o_
    [l_,[_____],
    l---L - □lllllll□-
    ( )_) ( )_)--)_)

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • #8
    Registered CAMmando's Avatar
    Join Date
    May 2003
    Location
    Phila PA, USA
    Posts
    146
    Downloads
    0
    Uploads
    0
    What Rekd Said
    Wee aim to please ... You aim to ... PLEASE.


  • #9
    Registered WOODKNACK's Avatar
    Join Date
    Mar 2003
    Location
    Maine
    Posts
    271
    Downloads
    0
    Uploads
    0
    nope! no go. like I said it doesnt seem to be on that line. its the M30 line that it stops at.
    My little piece of the web!
    http://users.adelphia.net/~wjdupont



  • #10
    Registered Rekd's Avatar
    Join Date
    Apr 2003
    Location
    teh Debug Window
    Posts
    1,876
    Downloads
    0
    Uploads
    0
    :edit:
    Keep in mind, you need two programs to do this. The first program, O1, calls the second program, O1234 via M98 P1234 L50 (The L50 repeats 50 times.)

    The M30 is the end of all programs. The M99 is the end of sub program, with loopback to the calling program, O1 in this case. When it stops at the M30, has it gone thru the 2 X moves?
    :/edit:

    Do you have a sample program? Perhaps a sample with sub programs or sub routines?

    'Rekd


  • #11
    Registered WOODKNACK's Avatar
    Join Date
    Mar 2003
    Location
    Maine
    Posts
    271
    Downloads
    0
    Uploads
    0
    No this is just something I found on the internet and was trying to get it going in turbocnc..
    Attached Thumbnails Attached Thumbnails Trying to make this work- G code-sad-smiley-043.gif  
    My little piece of the web!
    http://users.adelphia.net/~wjdupont



  • #12
    Registered balsaman's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    2,139
    Downloads
    0
    Uploads
    0
    stops and says what? Any error?

    Eric
    I wish it wouldn't crash.


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. looking for g code 3d from bobcadcam or simmilar for indexer lpt v5 with g code soft
      By troyswood in forum Ability Systems - LPT Indexer and G-Code
      Replies: 2
      Last Post: 12-24-2006, 10:21 PM
    2. How do you make Bridgeport execute program?
      By Bill Gillen in forum Bridgeport and Hardinge Mills
      Replies: 10
      Last Post: 06-14-2005, 09:26 AM
    3. parametric programming
      By Karl_T in forum CamSoft Products
      Replies: 21
      Last Post: 05-24-2005, 03:58 PM
    4. Time to make it work
      By DESERT RAT in forum DIY CNC Router Table Machines
      Replies: 8
      Last Post: 02-22-2005, 08:30 AM
    5. Work Holding Methods
      By InventIt in forum DIY CNC Router Table Machines
      Replies: 13
      Last Post: 09-14-2004, 04:13 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.