Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OLP program structure of workpiece storages
#1
Hi all,

I'd like to use RoboDK for offline programming of pick-and-place and machining projects. I have a question regarding a common task and how you would do it in RoboDK and if it is at all feasible in RoboDK.

When you have a workpiece storage or a workpiece tray, how do you structure your programs for program generation? In the tutorial videos and in the examples it is mostly done with one program for each workpiece which is very inflexible. I don't want to create 20 programs with the same instructions except for a different target.
My goal would be to get a generated function with the workpiece number as the argument. I know, that I could use the Python API to achieve this in the simulation but the generated programm would either create a programm with all movements to all the parts or I would need to generate the programs part by part.
Is there a better way?
#2
你可以use the same program and instruction but set a different frame to have it work on another workpiece.

With the API we are also able to copy/past programs and manipulate frames and targets. Let me know if you have a specific example that you need help with.


Attached Files
.rdk ChangeFrame_Example.rdk(Size: 1.85 MB / Downloads: 40)
#3
(02-13-2023, 02:53 PM)Olivier Wrote:你可以use the same program and instruction but set a different frame to have it work on another workpiece.

Hi Olivier,
thank you very much for your proposal. I started the way that you proposed but with huge storages (>40 workpieces) it is very repetitive and in the end I want a function like
Code:
getWorkpiece(workpieceNum)


I guess the best solution will be to generate the programs with the API and generate a "MainProgram" with a SWITCH statement in it which includes all the generated programs as subprograms.

Is there a way to add arguments to the generated procedures except for hardcoding it into the post processor?
Is it possible to tell AddProgram to create the program in a specific folder in the tree?




Users browsing this thread:
1 Guest(s)