Handling variables recipes

Hello,

I have the following requirement on a project (working on an UR10e):

-My robot must work on something like 100 differents products.
-For each products, 40 variables (geometrical coordinates) must be set and adjusted during machine tests. These 40 variables are called “A recipe”.

So if i resume i will have 100*40 variables to store and adjust. I can’t just create global variables one by one.

Does any tool or methods (topics) already exists on this subject for saving and loading recipes by products and finally only use 40 variables ?

I have some ideas for doing this but if some great methods already exists, i could save some times.

Thank’s a lot

1 Like

Hi Marc,

What you can setup is a selector variable that chooses which recipe to run, let’s call it recipe_number and that would be selected by the operator that runs the machine.

Then I would suggest that you add a script at the beginning that’s basically a big IF statement that sets the 40 variables to the required value based on what “recipe_number” is. So:

if recipe_number==1:
var1=10
var2=15…
elif recipe_number==2:
var1=20
var2=25…
elif…

Then you can keep your main program as just the one.

Do you have a PLC as the controlling system?
Maybe just use 40 variables, that get populated by the PLC per product type?

Hi,

Thank you for your reply.

Understood, that was the idea i had.
I think that i will just create several script based on this model. Each script named as a family of product, (so i don’t have the 100 references in the same file) and the right script will be read with a “Product family” PLC variable. The “recipe number” variable will be used to select the right set of variable in a script when selected.

Hi again,

Yes there is a master PLC with a profinet communication linked to the robot. I could use it to store my recipes values and just transfer 40 variables to the robot but in my case, it is not very convenient. (too many datas, especially for adjusting values with a maintenance program).

Thank’s