User defined path for Automove at program start.
In some cases it can be desired to have a known pre-defined path for the Automove during program start and at the same time have a function so the Automove is done by external buttons.
In this example a before start routine is made so an external button connected to DI0 is used as user defined automove. If the DI0 button is released the Automove stops and resumes when the DI0 button is pressed again.
The path of user defined automove can be different in case to case and in this example the robot will make a vertical upwards move of 100mm from no matter where the robot is located and then move over to a predefined program home position. If the robot is already up at a certain level the robot will not go further up during the user defined automove, but will move over to program home position.
This example shown here also has a function build-in so another button connected to DI1 is used to start the main program.
DI0 = User defined Automove.
DI1 = Start program.
automove_done Checks if the user defined automove is complete
current_pos Current position at start
upmove Amount of upwards move (Z) part of user defined automove
up_pose position to move up to during user defined automove
home_pose position of this programs home position.
This first Loop in the program checks if DI0 (User defined automove) is active and wait until DI0 becomes non-active in order to avoid automove start immediately.
The second Loop runs as long the User defined automove is not complete. In the second loop the first IF statement checks whether DI0 is active and the user defined automove not yet complete. For this IF statement the “Check expression continuously” is checked in order to abrupt the user defined automove is DI0 is released.
The current position is established and then transformed with the desired amount of upwards movement – in this case 100mm. And then the robot move over to the program home position. However if the robot is already up at a certain level – in this case 380mm then the robot does not perform a upwards movement because in the example this is considered up and out of the obstruction already.
When the user defined automove is complete the automove_done flag is set.
In this example the DI1 is then used to start the program if the automove has been completed.
Disclaimer: While the Zacobria Pte. Ltd. believes that information and guidance provided is correct, parties must rely upon their skill and judgement when making use of them. Zacobria Pte. Ltd. assumes no liability for loss or damage caused by error or omission, whether such an error or omission is the result of negligence or any other cause. Where reference is made to legislation it is not to be considered as legal advice. Any and all such liability is disclaimed.
If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
By Zacobria Lars Skovsgaard
Accredited 2015-2018 Universal Robots support Centre and Forum.