I am building an application for a tube washing machine. The Cobot will grab a tube, and put it over a spinning brush with a cleaning solution to clean the inside of the tube. Our tubes are open ended on both sides, however, they vary in length. Anywhere from 200mm to 600mm. I would like to find a way for the program to ask the user what the length of the tube is before the program starts. Then, when the Cobot puts the tube over the brush it will the tube move X distance down over the brush to clean the entire bore.
Has anybody had much experience with this sort of task? Thank you in advance for the help.
You can achieve that by using the Assignment command set top Operator instead of Expression (upper right corner). This will allow an operator to input a number, and it will be stored in the variable.
Then you can add the variable to a variable waypoint as shown below:
Var_TubeLength is the operator input assignment.
VarWP_TubeEnd is a normal expression variable (with pose values) (pose_add is a script function inserted in an expression in the lower left corner when editing an expression).
WP_TubeStart is the start of the tube - a normal waypoint.
VarWP_TubeEnd is inserted as a variable waypoint at the end (waypoint type is changed in upper right corner of a waypoint).
Now, this requires you to have a tube pointing directly in either X or Y axis of the robot’s base frame. If it’s X, you insert the (Var_TubeLength/1000) instead of the first 0. If Y, as the second 0 (as in the example).
If your tube is not pointing in X or Y directions of the base frame, you can make a custom feature/frame in the Installation and set this as the feature/frame of the MoveJ/L.