Results 1 to 5 of 5

Thread: Looping programs

  1. #1
    Join Date
    Apr 2009
    Location
    Middlesboro KY
    Posts
    71

    Default Looping programs

    I have a part that I need to cut 100+ times and would like to have it run over and over with a pause in it for changing out the parts. I need to move the gantry down 24 inches in x and have it park with the spindle running and then come back to home and cut the part. we went over this briefly in training 2 1/2 years ago but I've slept since then. I don't get into the writing code that offen and need some help with this one. I read over the progamming handbook pdf but just to be honest I don't have time to play around with this on this job. Can anyone please help.

    thanks Rick

    Here is the code of the part I'm running.

    JS,10.0,2.5
    MS,5.0,2.5
    SO,1,1
    PAUSE
    JH
    J2,4.066,4.250
    JZ,.125
    MZ,-.063
    CG,,5.169,4.250,.551,.000,T,1
    CG,,2.596,4.250,-1.286,.000,T,1
    CG,,4.372,6.256,2.021,.000,T,1
    CG,,6.260,4.250,-.122,-2.006,T,1
    CG,,4.372,6.256,-2.010,.000,T,1
    M3,4.372,6.256,.125
    JH
    END

  2. #2
    Join Date
    Sep 2006
    Location
    cnc routing, portland or
    Posts
    3,633

    Default

    it's simple. put at the beginning
    begin:

    then before spindle shutdown change the jog command to where you want the machine to park then at
    pause,
    then goto begin,
    this will wait for you to hit enter for it to start again.
    if you put this below the spindle off command it will stop then start again when you hit enter.

  3. #3
    Join Date
    Apr 2007
    Location
    Marquette, MI
    Posts
    3,388

    Default

    Rick...
    I would do something like this:

    JS,10.0,2.5
    MS,5.0,2.5
    SO,1,1
    PAUSE 2

    BEGIN:
    J2,4.066,4.250
    JZ,.125
    MZ,-.063
    CG,,5.169,4.250,.551,.000,T,1
    CG,,2.596,4.250,-1.286,.000,T,1
    CG,,4.372,6.256,2.021,.000,T,1
    CG,,6.260,4.250,-.122,-2.006,T,1
    CG,,4.372,6.256,-2.010,.000,T,1
    M3,4.372,6.256,.125
    JZ,1
    JX,24
    MSGBOX(ENTER TO REPEAT,YesNo, RESTART FILE)
    IF &msganswer = YES then goto BEGIN
    END
    (note I took out the redundant "JH" commands)
    Gary

  4. #4
    Join Date
    Sep 2006
    Location
    cnc routing, portland or
    Posts
    3,633

    Default

    too much work with just the pause, command you get the message box.

  5. #5
    Join Date
    Apr 2009
    Location
    Middlesboro KY
    Posts
    71

    Default

    Thanks Guys, I went out in the shop and tried a few things. I used a loopstart at the beginning and a goto loopstart at the end. I think I forgot alot. But you get into a routine of using mastercam and artcam for everything and you lose it if you don't use it.

    Thanks Rick

Similar Threads

  1. Looping a file
    By Keith Larrett in forum ShopBot Control Software v3
    Replies: 8
    Last Post: 08-10-2015, 10:04 PM
  2. Design Programs
    By joe in forum Sign Making
    Replies: 18
    Last Post: 04-27-2011, 01:20 PM
  3. Programs don't keep their position
    By eklug in forum Archives2007
    Replies: 12
    Last Post: 02-03-2007, 12:11 PM
  4. Help with 3d programs
    By tim_white in forum Archives2004
    Replies: 4
    Last Post: 07-16-2004, 01:12 PM
  5. Cad Programs
    By neal in forum Archives thru 2002
    Replies: 22
    Last Post: 08-18-2001, 10:31 AM

Posting Permissions

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