603,337 active members*
3,503 visitors online*
Register for free
Login
Results 1 to 20 of 101

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Posts
    15362

    Re: Help G54, G55, G56

    Quote Originally Posted by RCaffin View Post
    rcs60 used M97 to call a subroutine. That is not standard NIST g-code as far as I know, but if the controller mfr uses it, ...
    Wondrous things are possible with parameters and subroutines.Roger
    M97 is a normal standard Code it's a different way the sub can be used and only some controls use it, here is an explanation of it and how to use it

    "What is M-CODE M97, M98 & M99 (Sub Programs or Sub Routines) Mean in CNC Programming"
    M-Code M97, M98 and M99 Sub programming M-Codes
    M97 Local Sub-Program Call (P, L):
    M97 is the M-code Used to call a Subprogram with the reference of the line number N within the same program. Pxxxx code is used as a line number to be repeated. Xxxx is the line number in the same program. This is used for the simple program within the program and does not require complication of creating a sub program. A local sub-program must end with an M99. If there is a repetition of the loop of subprogram L count on the M97 line, the sub-program will be repeated L number of times.
    M97 Program Format:
    M97 Pxxxx Lnn
    Whereas, xxxx is the line number
    nn is the number of repetitions
    Example:
    Main program:
    O01234 (Program number and Start of main program)
    N0001 T02 M06;
    N0002 T03
    N0003 G54 G90 G00 Z50
    ...
    ...
    ... (Part program)
    ...
    M97 P0015 L3 (Jumps to line N0015, after the M30, to execute a local sub-program for 3 times)
    ... (The M99 at the end of the sub-program will cause it to jump back here.)
    ...
    ...
    ... (Finish part program)
    ...
    M30 (End of main program)
    N0015 (Identifies the start of the Local Sub-Program called up by M97 P0015)
    Mactec54

  2. #2
    Join Date
    Mar 2010
    Posts
    813

    Re: Help G54, G55, G56

    Quote Originally Posted by mactec54 View Post
    Dan911

    Just change the end of your program you could quite easy have a crash G91 G28 Y0 Z0 Never do a Z axes move with an Axes move always move the Z out the way first, then you can do both axes X and Y on the Same line it you want like if you like using a G91 G28

    G91 G28 Z0.
    G91 G28 Y0.

    This line also o0001 needs to be O0001

    O0000 (offset test)

    G20 G40 G80 G17

    N1 (FLAT 1-4 IN 2F EC SCB)
    G00 G90 G43 G54 X-0.125 Y-0.125
    T1 M6
    Z1.
    S8000 M3
    M9
    M98 P0001


    G55 X-0.125 Y-0.125
    M98 P0001

    G56 X-0.125 Y-0.125
    M98 P0001

    G91 G28 Y0 Z0
    M30

    o0001
    G00 Z0.5
    G01 Z-0.5 F144.
    Y12.125 F288.
    X12.125
    Y-0.125
    X-0.125
    G00 Z1.
    M99

    Yes it will, and has caused me problems some time ago. I copied and pasted from some old code I had on this comp that I no longer use for designing and generating Gcode, I use just for online.. My Alphacam PP been modified since than, I edited the post. Regardless...The G00 Z1 in subroutine already moved the Z.



    Quote Originally Posted by mactec54 View Post
    M97 is a normal standard Code it's a different way the sub can be used and only some controls use it, here is an explanation of it and how to use it

    "What is M-CODE M97, M98 & M99 (Sub Programs or Sub Routines) Mean in CNC Programming"
    M-Code M97, M98 and M99 Sub programming M-Codes
    M97 Local Sub-Program Call (P, L):
    M97 is the M-code Used to call a Subprogram with the reference of the line number N within the same program. Pxxxx code is used as a line number to be repeated. Xxxx is the line number in the same program. This is used for the simple program within the program and does not require complication of creating a sub program. A local sub-program must end with an M99. If there is a repetition of the loop of subprogram L count on the M97 line, the sub-program will be repeated L number of times.
    M97 Program Format:
    M97 Pxxxx Lnn
    Whereas, xxxx is the line number
    nn is the number of repetitions
    Example:
    Main program:
    O01234 (Program number and Start of main program)
    N0001 T02 M06;
    N0002 T03
    N0003 G54 G90 G00 Z50
    ...
    ...
    ... (Part program)
    ...
    M97 P0015 L3 (Jumps to line N0015, after the M30, to execute a local sub-program for 3 times)
    ... (The M99 at the end of the sub-program will cause it to jump back here.)
    ...
    ...
    ... (Finish part program)
    ...
    M30 (End of main program)
    N0015 (Identifies the start of the Local Sub-Program called up by M97 P0015)

    I already read this when googling/researching why rcs60 subroutine wasn't working. Not sure if it was changing the M97 to M98 or the N to O on the subroutine that fixed it. He(rcs60) did note this on his original post on first page of thread.

  3. #3
    Join Date
    Jan 2005
    Posts
    15362

    Re: Help G54, G55, G56

    Quote Originally Posted by Dan911 View Post
    I already read this when googling/researching why rcs60 subroutine wasn't working. Not sure if it was changing the M97 to M98 or the N to O on the subroutine that fixed it. He(rcs60) did note this on his original post on first page of thread.
    The O would stop it, but if you are running Mach3 almost anything will run

    I already said M97 does not run on all controls, it would have to be also formatted correctly also,if it was going to run, it is different from the M98
    Mactec54

  4. #4
    Join Date
    Mar 2010
    Posts
    813

    Re: Help G54, G55, G56

    Quote Originally Posted by mactec54 View Post
    The O would stop it, but if you are running Mach3 almost anything will run

    Huh???? Using the O in front of the subroutine call is what got it to run in Mach3. I didn't capitalize O but the lower case works. Please read post before commenting. Post #64, try the code it works!

  5. #5
    Join Date
    Jan 2005
    Posts
    15362

    Re: Help G54, G55, G56

    Quote Originally Posted by Dan911 View Post
    Huh???? Using the O in front of the subroutine call is what got it to run in Mach3. I didn't capitalize O but the lower case works. Please read post before commenting. Post #64, try the code it works!
    Using a O in any program is normal, no one said it was wrong, having it Lower Case will cause a problem, in a normal Control, As I said Mach3 will except wrongly written Code that other controls will Fault out
    Mactec54

  6. #6
    Join Date
    Mar 2010
    Posts
    813

    Re: Help G54, G55, G56

    Quote Originally Posted by mactec54 View Post
    Using a O in any program is normal, no one said it was wrong, having it Lower Case will cause a problem, in a normal Control, As I said Mach3 will except wrongly written Code that other controls will Fault out

    Quote Originally Posted by mactec54 View Post
    The O would stop it, but if you are running Mach3 almost anything will run

    I already said M97 does not run on all controls, it would have to be also formatted correctly also,if it was going to run, it is different from the M98
    Wow...Your exhausting.

  7. #7
    Join Date
    Jan 2005
    Posts
    15362

    Re: Help G54, G55, G56

    Quote Originally Posted by Dan911 View Post
    The O would stop it, but if you are running Mach3 almost anything will run
    Put it in context, with the program you had written

    o0001 This is part of your program is it not, and is what the above statement was all about in a normal control this would not run
    G00 Z0.5
    G01 Z-0.5 F144.
    Y12.125 F288.
    X12.125
    Y-0.125
    X-0.125
    G00 Z1.
    M99
    Mactec54

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
  •