PDA

View Full Version : Repetetive part cuts, same part/file, simple yes/no file mod?



mclimie
11-14-2016, 09:57 AM
Hi all,

First, I did a search for repetitive parts and/or cuts and didn't see anything. I apologize if I missed something and am asking something that has already been asked.

We have a PRS Alpha, and I have the programming handbook, but it's going to take me quite a while to learn this ground up. I'm wondering if anyone would be willing to help distill what I'm trying to do in the most efficient way. Pretty simple probably, just that I haven't had the opportunity to need to learn the syntax, etc.

In this case, I have a run of parts, all the same part, same jig, no X/Y/Z change. Just swap and go. What I need to do:

1) Create the basic program in Aspire.
2) At the point it is finished cutting and sends the head to safe Z and 0,0, I need to send it out of the way to have access to the part.
3) After relocating the head, ask user if another part Y/N - If yes, go to the startup routine and re-run. If no, End program/exit.

It will always be an unknown whether we have 5 parts, 20 parts, etc, so the user input is key.

Is this the best way to do this? Or do subroutine? I could really use some help getting started on the syntax for this. Once I get my start it will all come to me.

Thanks for your time!

Marc

srwtlc
11-14-2016, 10:41 AM
If you are using SB3 version 3.8.XX, using the PAUSE UNTIL statement would be the simplest method. Try this...

'File header and stuff
'
'
'Set spindle RPM to XXXXX
PAUSE
'
TR,XXXXX

'Turning spindle ON
SO,1,1
PAUSE,2

REPEAT: 'This is where we will return to after answering OK to the PAUSE UNTIL

'Body of part file here.
...
...
...
'Do your J2 or J3 to move the spindle out of the way after the file is finished.

'When it gets here, a message will appear on screen asking if you want to continue.
'If you answer OK, it will go back to the top and run again.
'If you answer Quit, it will end the file.

PAUSE UNTIL
GOTO REPEAT

If you're running SB3 3.6.XX, there's another way that I can go through with you. I use both methods often and to make it even more convenient, I have a 'repeat' button right on the gantry so I don't have to return to the keyboard to continue the loop. Your file structure may differ from the above, but you can adjust the flow as needed. Perhaps you don't want the spindle to stay running between part changes. Just turn it off before the PAUSE UNTIL and move the repeat above the spindle on command. You may have C6 and C7 in your file for spindle control, but the above does the same thing and was the norm in the past.

mclimie
11-14-2016, 10:46 AM
Fantastic. Thank you so much.

We are using 3.8.40.

Thanks again!!!!

Marc

steve_g
11-14-2016, 10:47 AM
If you don’t want to use the j2 or j3 command to move the spindle out of the way, add a location for it to jog to at the end of the file but before the Pause until command…
Something like:
J3 24,24,1

SG

mclimie
11-14-2016, 12:53 PM
Thank you!

Marc

srwtlc
11-14-2016, 01:16 PM
That's what I meant. Should have said "after the cutting part of your file is finished, put your J2,x,y or J3,x,y,z here", before the PAUSE UNTIL.

If this is something that you do often, you might want to look into putting a momentary button on or near the gantry that is wired to an input and then use PAUSE UNTIL X,1 where X is the # of the input that the switch is wired to. In use, you just push the button when ready to continue and when finished, just hit the Enter or the Spacebar when the pause dialog is on screen to end it.

That piece of code looks like this (I use input 1 for my button).

PAUSE UNTIL 1,1
GOTO REPEAT

mclimie
11-14-2016, 01:33 PM
Ok great. Will do. Sounds like a good idea.

Once I get this working with manual clamping, we are going to start setting up pneumatic clamping. When that is done, I'll introduce that. We have the pendant, so that will work.

Marc

mclimie
11-14-2016, 01:44 PM
Worked on the first air cut, just how we need it. Thanks so much!