Home› Programming
Discussion
Back to discussions page
sebastianrea
Posts: 11 Apprentice
UR10 - Direction untill a distance as variable? |
33 views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
1 comment |

in Programming
Is it possible to set the distance as a variable for the direction command?
In my program, the robot is set to go down in -Z direction untill a distance is reached.
This distance has to be changed during a normal workday, so i want my operator to control this distance as a startup variable.
As of now i have made 4 different direction commands in my program with and if command, respectively 44, 46, 48 and 50mm
So if the operator where to enter 46, the direction command with the distance of 46mm will be the only one running.
I would like to get rid of the 4 different direction commands, so that i am left with only one.
In my program, the robot is set to go down in -Z direction untill a distance is reached.
This distance has to be changed during a normal workday, so i want my operator to control this distance as a startup variable.
As of now i have made 4 different direction commands in my program with and if command, respectively 44, 46, 48 and 50mm
So if the operator where to enter 46, the direction command with the distance of 46mm will be the only one running.
I would like to get rid of the 4 different direction commands, so that i am left with only one.
so here is some psuedo code
Another option if you just want to control the distance that the robot moves is to simply calculate the next position.