Hey guys, looking for some help. I have only been programming our KUKA with point to point programming which has worked up until now. We use the robot to deburr parts and the blasting program needs to get a lot more complex. So here is where i need some help. I was hoping to be able to make a point to point program (the deburr program) but then have another program that can call it up, then repeat the deburr program 4 more times incrementally moving over. basically i have a fixture that holds 5 parts splayed along the X axis every 1.666". I was looking for a generic template to be able to add the pre-deburr moves then subprogram recall along with the step over to the next part.
Tech support at Kuka only sent me more manuals to read...not much help. I know how to do this on a CNC Milling machine with G code, but not to familiar with the KUKA code and if you need to have a base active in the sub program, or only in the call program or???
The program i have now runs in the "loop" with an external button to run the program. it starts with base[0], tool[1] where the deburring nozzle moves to a purge area to clear the blast line, then moves to a safe point, then it starts the deburring with tool [2] and base[2] (it does not change tools, I just set a new #, in hind sight, probably a waste of time, but didn't know any better a year ago) So, Anybody doing something similar?? attached is a shot of my typical start of the program and also my fixture in case i explained it weird.
Kuka Subprogram/array
-
Stevo -
May 10, 2016 at 6:06 PM -
Thread is marked as Resolved.
-
-
You can just offset base and run same program again. Put it in a loop and you can do bunch of parts. ..
-
So what would the code look like to set an offset to the base, and would it loop #1, then 2, then 3 then 4 then 5 then wait for start. when started again, would repeat 1,2,3,4,5 ? Thanks.
Robot Stats: KR6R900, KRC4 controller, V8.2.2 also has an ethercat connected for a bank or relays to turn off and on the blaster.
-
I would:
1. measure tool and base, enter tool load data. for example lets use tool1 and base 20.
2. duplicate base to another one, that is going to be our working base (such as base1)
3. create a program such as PROG1.SRC and PROG.DAT, that does some work - while making sure to use correct tool(1) and base (1).
4. create another program with code for includes loop and offsets.Example MAIN_LOOP.SRC (or something along those lines, code not tested, though it should be more or less ok...)
Code
Display MoreDEF MAIN_LOOP() DECL INT X,Y; variable used for loop counter DECL INT X_Max, Y_Max ; variables that specify number of repetitions DECL REAL dX, dY, Scale ; offsets DECL INT dlgAnswer ; dialog answer DECL FRAME Ofs ; this is offset... dX = 2.345 ; inches (for those who prefer wrong units...) dY = 1.666 ; inches X_Max = 1; one row Y_Max = 4 ; four columns Ofs=$nullframe Scale = 25.4 ; set scale (millimeters in one inch) MsgDialog(dlgAnswer,"What do you want to do?","PanicMode",,"Teach","Cancel","Run") SWITCH dlgAnswer CASE 7 ; Teach base_data[1]=base_data[20] ; restore base (without offset) MsgNotify("Base restored, ok to teach points...","PanicMode",,60) Execute() CASE 6 ; Cancel MsgNotify("Finished, do nothing...","PanicMode",,666) CASE 5 ; Run MsgNotify("Starting batch of %1 parts","PanicMode",X_MAX*Y_MAX,64) FOR X=1 to X_MAX FOR Y=1 to Y_MAX Ofs.X = (X-1)*Scale*dX Ofs.Y = (Y-1)*Scale*dY base_data[1] = base_data[20]:Ofs Execute() ENDFOR ENDFOR DEFAULT ; unknown dialog value MsgNotify("Not expected choice: %1","PanicMode",dlgAnswer,13) ENDSWITCH END DEF Execute() PROG1() ; actual program that does all the work... Rename as needed... END