603,942 active members*
2,794 visitors online*
Register for free
Login
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2006
    Posts
    12

    program repeat

    Hello,
    I am machining a bunch of rings from a lenght of tubing. I am turning, boring , parting off then incrementing my work offsets to start the next part. I would like to repeat the program and keep looping until I am close to the chuck. I want to preset the number of loops because I know how many parts I can make and I dont want to crash and I dont have macro cabability, so, I figure I can use M98 P(prog.)Ln however I am unsure of the syntax. I am running a Haas SL 30 lathe and when I try to type the prog. number after m30 I get a bad code message.
    Also anyone know if I can set up a safety zone so I dont crash into the chuck!

  2. #2
    Join Date
    Jul 2005
    Posts
    12177
    Put all your operations in a subroutine. Call it something like N1000, this would be the sequence in the program.

    With the starting work offset active call the subroutine M97 P1000. This will do the first one.

    Next line increment your offset and call M97 P1000 with a L count. The L count is one less than your total.

    Next line reset your work offset back to the starting value.

    End program.

  3. #3
    Join Date
    Sep 2005
    Posts
    280
    If your machine has it, a G10 works nice for this kind of thing.

  4. #4
    Join Date
    Jul 2010
    Posts
    172
    i would like more info on repeat --is anybody watching tonight
    rckdef

  5. #5
    Join Date
    Feb 2006
    Posts
    1792

  6. #6
    Join Date
    Jul 2010
    Posts
    172

    Repeat G-Code

    I used M31.1 after the lines of code that i wanted to repeat
    and it ran continuously until i stopped the program.
    rckdef

  7. #7
    Join Date
    Mar 2010
    Posts
    0
    the test program i did worked fine on an actual job. i ran 11 parts from the 1 setting. this was done with a fanuc control, i don't know anything about about a Haas but hope this helps

    o0001; (main)
    m98 p0002 L3;
    g10 L2 p1 w1.5;
    g28 u0 w0;
    m30;
    %


    o0002; (sub)
    g28 u0 w0;
    g00 z0.0 x68.0;
    s1200 m03;
    g01 x0.0 f0.5;
    g10 L2 p1 w-0.5;
    m99;
    %

    Note: if you reset the machine anytime during operation remember to set the p- setting back to zero otherwise it will start from where you last stopped and will crash.

Posting Permissions

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