Results 1 to 9 of 9

Thread: Looping a file

  1. #1
    Join Date
    Jan 2015
    Location
    Palm Coast, FL
    Posts
    193

    Default Looping a file

    I would like to learn how to loop or repeat a file.

    I purchased JointCam and have my jig set up, the software configured and am a happy camper cutting dovetails. The software and documentation behind it is very impressive!

    The following file is an example of cutting the tail boards. I would like to have it repeat. I'd like for the machine to move to 0,0 and for the spindle to not turn off. Then I'd like a comment box to pop up asking "change the tail board" and when I click ok, after switching the tail board in the jig, the file would run again, and again, and again etc

    Any help on what I need to add to the file to achieve this would be much appreciated!

    '( Code created by JointCAM )
    G40
    SA
    '( Left Tails )
    '( Stock Width = 2.95 )
    '( Side Thickness = 0.51 )
    '( Tool #12 - 8 Degree Dovetail Bit )
    '( Diameter = 0.375 )
    '( Length = 0.5 )
    JZ, 1.0000
    TR 12000
    SO, 1,1
    PAUSE 3
    MS, 0.7, 0.7
    J2, 0.0525, 17.0500
    JZ, -0.3319
    M2, 0.0525, 20.6000
    J2, -0.0913, 17.1063
    M2, 0.9250, 17.1063
    M2, 0.9250, 17.2750
    M2, 0.3775, 17.2750
    CG, , 0.0552, 17.5973, 0.0000, 0.3223, T, 1
    CG, , 0.3775, 17.9196, 0.3223, 0.0000, T, 1
    M2, 0.7938, 17.9196
    M2, 0.3775, 17.9196
    CG, , 0.0552, 18.2419, 0.0000, 0.3223, T, 1
    M2, 0.0552, 18.3669
    CG, , 0.3775, 18.6892, 0.3223, 0.0000, T, 1
    M2, 0.7938, 18.6892
    M2, 0.7938, 18.8108
    M2, 0.3775, 18.8108
    CG, , 0.0552, 19.1331, 0.0000, 0.3223, T, 1
    M2, 0.0552, 19.2581
    CG, , 0.3775, 19.5804, 0.3223, 0.0000, T, 1
    M2, 0.7938, 19.5804
    M2, 0.3775, 19.5804
    CG, , 0.0552, 19.9027, 0.0000, 0.3223, T, 1
    CG, , 0.3775, 20.2250, 0.3223, 0.0000, T, 1
    M2, 0.9250, 20.2250
    J2, -0.1850, 20.2250
    JZ, 0.1250
    SO, 1,0
    M5
    JZ, 2.7500
    J2, 0.0000, 0.0000
    END

  2. #2
    Join Date
    Dec 2000
    Location
    Thorp, WI
    Posts
    2,724

    Default

    Keith, if you're using SB 3.8.XX, take a look at the PAUSE UNTIL command in the programming handbook, found in the ShopBot directory. If you need more help, come back for more.

    If desired, you can set it up with a momentary button also. I use this method extensively.

    "He who would trade liberty for some temporary security, deserves neither liberty nor security" - Benjamin Franklin
    "Make yourself sheep and the wolves will eat you" - Benjamin Franklin
    "Symbolism is for the symbol minded" - George Carlin




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

    Default

    put begin: where you want it to start again. and before the jog home and stop put pause and a time if yo want a time if not enter gets it going then goto begin. you can have the spindle stop and start again if you put the being before the tr command and the pause after the spindle stop.

  4. #4
    Join Date
    Dec 2000
    Location
    Thorp, WI
    Posts
    2,724

    Default

    Oh yeah, Steve's right, I should have mentioned that you need to use a label and a GOTO along with the PAUSE UNTIL.

    Here's a quick sample.....

    REPEAT:

    Body of code

    PAUSE UNTIL
    GOTO REPEAT

    Or if you use a button,

    PAUSE UNTIL 1,1 (or whatever switch # used)
    GOTO REPEAT

    "He who would trade liberty for some temporary security, deserves neither liberty nor security" - Benjamin Franklin
    "Make yourself sheep and the wolves will eat you" - Benjamin Franklin
    "Symbolism is for the symbol minded" - George Carlin




  5. #5
    Join Date
    Jan 2015
    Location
    Palm Coast, FL
    Posts
    193

    Default

    Ok. Thanks to both of you. I think I have it figured out. I found the following thread as well.

    Cycle Start Button

    The first thing I did with the file was to move the SO, 1,0 to the second last line of the file.

    Then I added Begin: towards the beginning of the file.

    Then I added

    ' Did you reload the jig? .... (Hit OK or ENTER when Ready to Continue)
    PAUSE
    GOTO Begin

    just after it had made the move back to the home position.

    So, will the following achieve what I need?

    '( Code created by JointCAM )
    G40
    SA
    '( Left Tails )
    '( Stock Width = 2.95 )
    '( Side Thickness = 0.51 )
    '( Tool #12 - 8 Degree Dovetail Bit )
    '( Diameter = 0.375 )
    '( Length = 0.5 )
    JZ, 1.0000
    TR 12000
    SO, 1,1
    PAUSE 3
    Begin:
    MS, 0.7, 0.7
    J2, 0.0525, 17.0500
    JZ, -0.3319
    M2, 0.0525, 20.6000
    J2, -0.0913, 17.1063
    M2, 0.9250, 17.1063
    M2, 0.9250, 17.2750
    M2, 0.3775, 17.2750
    CG, , 0.0552, 17.5973, 0.0000, 0.3223, T, 1
    CG, , 0.3775, 17.9196, 0.3223, 0.0000, T, 1
    M2, 0.7938, 17.9196
    M2, 0.3775, 17.9196
    CG, , 0.0552, 18.2419, 0.0000, 0.3223, T, 1
    M2, 0.0552, 18.3669
    CG, , 0.3775, 18.6892, 0.3223, 0.0000, T, 1
    M2, 0.7938, 18.6892
    M2, 0.7938, 18.8108
    M2, 0.3775, 18.8108
    CG, , 0.0552, 19.1331, 0.0000, 0.3223, T, 1
    M2, 0.0552, 19.2581
    CG, , 0.3775, 19.5804, 0.3223, 0.0000, T, 1
    M2, 0.7938, 19.5804
    M2, 0.3775, 19.5804
    CG, , 0.0552, 19.9027, 0.0000, 0.3223, T, 1
    CG, , 0.3775, 20.2250, 0.3223, 0.0000, T, 1
    M2, 0.9250, 20.2250
    J2, -0.1850, 20.2250
    JZ, 0.1250
    M5
    JZ, 2.7500
    J2, 0.0000, 0.0000
    ' Did you reload the jig? .... (Hit OK or ENTER when Ready to Continue)
    PAUSE
    GOTO Begin

    SO, 1,0
    END

  6. #6
    Join Date
    Dec 2000
    Location
    Thorp, WI
    Posts
    2,724

    Default

    Should work fine, run it and see if it behaves the way you want it to. You can delete the last two lines or comment them out with ('). There are a few ways to do looping, if it works to your liking, your good to go. I have a small momentary button on the gantry that I push to repeat (using PAUSE UNTIL 1,1) and when finished, either hit the spacebar or enter to stop the loop and close the file.

    "He who would trade liberty for some temporary security, deserves neither liberty nor security" - Benjamin Franklin
    "Make yourself sheep and the wolves will eat you" - Benjamin Franklin
    "Symbolism is for the symbol minded" - George Carlin




  7. #7
    Join Date
    Jan 2015
    Location
    Palm Coast, FL
    Posts
    193

    Default

    It works perfectly! Thanks again to both of you for your help! Knowing how to do this will help, not just with running this file, but in many other applications.

    Quote Originally Posted by srwtlc View Post
    I have a small momentary button on the gantry that I push to repeat (using PAUSE UNTIL 1,1) and when finished, either hit the spacebar or enter to stop the loop and close the file.
    Is this a switch that is hard wired into the control board that activates one of your input switches? Where did you get it?

  8. #8
    Join Date
    Dec 2000
    Location
    Thorp, WI
    Posts
    2,724

    Default

    Yes, just a little momentary switch that is wired to one of the inputs on the board. Mine is just wired in to the same input as the zzero plate (#1), but you can use any open input #. I got it at Radio Shack years ago. This one at Jameco is similar if not the same one.

    "He who would trade liberty for some temporary security, deserves neither liberty nor security" - Benjamin Franklin
    "Make yourself sheep and the wolves will eat you" - Benjamin Franklin
    "Symbolism is for the symbol minded" - George Carlin




  9. #9
    Join Date
    Mar 2009
    Location
    Parts and Templates, San Carlos CA
    Posts
    328

    Default

    You can also add conditional statements, repeat or change settings. just make sure that it works before you put your material down and turn it on!

    David

Similar Threads

  1. Replies: 2
    Last Post: 02-08-2016, 03:46 AM
  2. Converting Part Works File.crv to .sbp file
    By huntfairchase in forum Troubleshooting
    Replies: 11
    Last Post: 05-05-2014, 09:39 AM
  3. Looping programs
    By kg4mon in forum Techniques for Cutting, Drilling, Machining
    Replies: 4
    Last Post: 03-08-2010, 12:38 PM
  4. Replies: 3
    Last Post: 02-03-2006, 10:38 PM
  5. From "raster" file to "vector" file lettering...
    By paco in forum Archives2005
    Replies: 50
    Last Post: 01-13-2005, 02:47 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
  •