PDA

View Full Version : Running a file multiple times



andyb
08-05-2008, 06:59 AM
I know the info has been posted several time but I can't find it using the search. I must not be using the right key words. I need to run a cut file 26 times. What I'd like to do is have box pop-up, ask me for the file to run, turn the spindle on, cut the file, move home or to a safe area, ask me if I want to run the file again or quit then when I choose quit turn the spindle off.

If you can point me to a previous thread or give me some info I would greatly appreicate it.

Andy B.

harryball
08-05-2008, 07:49 AM
Andy,

Probably not the best form but here is a master file that allows me to choose which cut file and speed to use, then cuts and moves the gantry out of the way for a board change and lets me continue, enjoy.


------------------
'This files calls the side files and repeats for production purposes.
'The spindle is turned on and left on for the duration so it will auto start when each file is called

'You should have a 3/8 roughing bit and Zzero to TOP of material.
PAUSE

SA
SO,1,1 'Turning spindle ON for first time
PAUSE,2

PRINT "Run File Cutting Options"
PRINT "1) E2-L Load Position 1"
PRINT "2) E2-R Load Position 1"
PRINT "3) E3-L+R Load Position 1"
PRINT "4) E4_E2-L Load Position 1"
PRINT "5) E4_E2-R Load Position 1"
PRINT "6) E2_L+R Postion 1 & 2"
PRINT "7) E4_E2-L+R Load Postion 1 & 2"
PRINT "9) QUIT and EXIT"

PRINT
PRINT "Enter Cut Speed - Decimal values ok i.e. 4.5 "
PRINT "2) 2-ips 6K RPM for knotty boards"
PRINT "3) 3-ips 7K RPM board with some knots"
PRINT "4) 4-ips 9K RPM very small knots clear board"
PRINT "5) 5-ips 10k RPM very good board "
PRINT "6) 6-ips 12k RPM perfect board no knots"
PRINT "9) QUIT and EXIT"
PRINT "REMEMBER TO SET RPMS AS REQUIRED"
PRINT

REPEAT:

'Request which side file to run
INPUT "Select File Cutting Option from menu -" &cut_side
IF &cut_side = 9 THEN GOTO DONE

'Now request the cut rate, slower cuts are for knotty boards, fast cuts are for good clean boards.
INPUT "Select Speed of Cut from menu -" &cut_speed
IF &cut_speed = 9 THEN GOTO DONE
IF &cut_speed > 7 THEN GOTO CRAZY

SO,1,1 'Turning spindle back ON

andyb
08-05-2008, 08:28 AM
Thanks Robert. That's a start. I have two jobs coming up that I will have to cut 25+ sheets of the same parts. The time to start the spindle is slowing me down. I'd like to get it down to starting the file, unloading the parts, blow the table off, throw another sheet on and start cutting again.

Andy B.

knight_toolworks
08-05-2008, 01:00 PM
I have a couple of lines you put in that parks the router where you want it and you touch the zzero plate to start the toolpath again. when I get to work I will post it. the spindle keeps running so you don't have to start anything again.

beacon14
08-05-2008, 01:40 PM
The fastest and easiest way to repeat a file unlimited times is to put the following at the end of the file:

PAUSE
GOTO BEGIN

at the beginning of the file, after the SO 1,1 which turns the router on but before any movement commands, insert the label:

BEGIN:

That's it. The spindle runs the whole time and the file repeats itself when you press Enter. When you are done you press Escape instead of Enter which ends the file and turns the spindle off.


For a more elegant solution if the file is likely to be run again I use something like this added to the end of the file:

C4 'my shortcut to park the router out of the way
input:
INPUT "What next? [R]epeat, re[Z]ero, [B]it change, 0 to end" &next

IF &next=0 THEN END
IF &next=R THEN GOTO begin 'repeats file
IF &next=Z THEN GOTO rezero 'goes to a z zero subroutine
IF &next=B THEN GOTO changebit 'goes to a bit changing subroutine
GOTO input 'any non-valid entry will repeat the question


There are unlimited variations possible. For a safer version of the first method use:

INPUT "1 to repeat, 0 to end" &next
IF &next=1 then GOTO begin

that way you have to make a deliberate entry instead of just pressing Enter which could be done accidently. Any input other than "1" ends the file.

I could go on...

knight_toolworks
08-05-2008, 03:31 PM
here is the info this uses the input on to start the file again so I just tou8ch the zero plate to the machine and off it goes again

REPEAT: 'Place the repeat where you want the file to repeat from.

'Body of part file


WAITHERE:
&TEST=%(51) 'Testing the condition of the input switch. %51 is input 1, %52 is 2, %53 is 3, etc.
IF &TEST=1 THEN GOTO REPEAT
PAUSE .3
GOTO WAITHERE

ed_lang
08-05-2008, 03:51 PM
Rather than using the Zzero plate, you could wire up a SPST pushbutton to one of the other inputs and change the %(51) to the input the button is wired up to. Then you would have a "GO" button that is not the Zzero plate. If I were doing it, I would put two push buttons in series and mount them so I would use both hands to push them. No chance of hitting the button and causing the machine to move while you were still working. All above work good, just think about safety!

Take care

scottcox
08-05-2008, 05:52 PM
This won't work for full sheets but rather cutting multiple parts from a single sheet.

You can call up cut files in a cut file, like this.....

'For ShopBot Control: SB3 Alpha
'
'Set router RPM to 13000
PAUSE
'
'Turning router ON
SO,1,1
PAUSE,2
'
SA
M2,1.25,1.9375
FP, RufBottomStrip01a.sbp,,,,,2
M2,3.75,10.9375
FP, RufBottomStrip01a.sbp,,,,,2
M2,1.25,19.9375
FP, RufBottomStrip01a.sbp,,,,,2
M2,3.75,28.9375
FP, RufBottomStrip01a.sbp,,,,,2
M2,1.25,37.9375
FP, RufBottomStrip01a.sbp,,,,,2

'
'Turning router OFF
SO,1,0

knight_toolworks
08-05-2008, 06:15 PM
I thought of using a switch but I don't do it often enough. the plate is pretty good safty since it takes some effort to use it.

andyb
08-05-2008, 06:19 PM
Thanks for all the suggestions.

David,
I like your safe version. Thanks for another great tip. I'll work on a better solution when I have time.

Andy B.

dana_swift
08-06-2008, 09:56 AM
Steve - your idea of Begin: ... Pause .. goto Begin is so simple and elegant, I will be using that one. Probably the only difference is just before Pause I will put JZ 6 or some such value to get the bit as far away as possible from the work during the pause. I'm thinking there is probably a way to make the router shut down if it the file isn't restarted in 30 seconds or some other time limit.

D