1. Home
  2. Knowledge Base
  3. Universal-Robots Painting application

Universal-Robots painting application:

universal-robots-ur5-robosuit-18v-180z-fire-retardant-pvc-vinyl-orange-colour-with-zipper-1  universal-robots-ur5-robosuit-18v-180z-fire-retardant-pvc-vinyl-orange-colour-with-zipper

Application Description:
This program example shows a program for painting application. The robot is a Universal-Robots UR5 dressed with a robosuit model “18v 180z fire retardant pvc vinyl orange colour with zipper on upper arm”.

 

Function description:
A paint spray nozzle is mounted on the UR5 robot with aint and air supply hoses connected. The spray nozzled is turned On/Off by a pneumatic cylinder that is controlled by a 2 way valve connected to digital output 0.

In this example the robot draws 4 horizontial lines with a distance between the lines  – where the lenght of the horizontial line and height of the distance between the lines can be set in the robot program.

Setting of Plane:

universal-robots-zacobria-painting-application-program-plane-1

universal-robots-program-working-with-planes-tool-x-y-1

The robot tool head is oriented with the stanard TCP notation in mind as shown on the image above.

In this case the Plane is defined by setting the Point_1 at the position of the origin of the Plane which is also the desired start position of the painting cycle. Point_2 is the Y direction of the Plane – and in this case is chosen to set the Y direction to be towards the painting object (for example a wall). Point_3 is set in the desired X direction of the Plane.

In this way the X direction becomes the horizontal line direction (left-right) and the Z direction becomes the vertical direction (up-down).

I/O table Inputs:
None used.

 

I/O table Outputs:
DO0 = Spray nozzle On/Off

 

Variable Table:
P1≔Plane_1_var
var_start≔p[0,0,0,0,0,0]
var_x1_line≔p[0.4,0,0,0,0,0]
var_z1_line≔p[0.4,0,0.05,0,0,0]
var_x2_line≔p[0,0,0.05,0,0,0]
var_z2_line≔p[0,0,0.1,0,0,0]
var_x3_line≔p[0.4,0,0.1,0,0,0]
var_z3_line≔p[0.4,0,0.15,0,0,0]
var_x4_line≔p[0,0,0.15,0,0,0]

 

Variable Waypoints:

Move_var_start≔pose_trans(P1,var_start)
Move_h_line_1≔pose_trans(P1,var_x1_line)
Move_v_line_1≔pose_trans(P1,var_z1_line)
Move_h_line_2≔pose_trans(P1,var_x2_line)
Move_v_line_2≔pose_trans(P1,var_z2_line)
Move_h_line_3≔pose_trans(P1,var_x3_line)
Move_v_line_3≔pose_trans(P1,var_z3_line)
Move_h_line_4≔pose_trans(P1,var_x4_line)

 

Program description:
The program uses a user defined plane as reference for the start point of the painting cycle. With this method it becomes easy to shift the entire painting pattern to other starting points.

The Plane is defined in the Features menu.

BeforeStart:

The Plane_1_var is copied into a P1 variable so it has a shorter name.

var_start is set to the reference value of all 0 because that is the start position of the painting.

var_x1 line is set to the width of the desired horizontal line lenght. In this case 400mm.

var_z1_line is set to the desired vertical shift down from the end of the first horizontal line. In this case 50mm down.

var_x2_line is set to the desired position of the back stroke which is 50mm down from the starting position.

var_z2_line is set to the next desired vertical shift down from the end of the first back stroke. In this case further 50mm down.

var_x3_line is set to the desired position of the third line which is 50mm further down and a lenght of 400mm.

var_z3_line is set to the desired vertical shift down from the end of the first horizontal line. In this case 50mm further down.

var_x4_line is set to the desired position of the second back stroke which is further 50mm down.

Output 0 is the activation and de-activaion of the spray nozzle and by setting digital output 0 to low (off) the spray nozzle is ensured to be off.

In the main program the Waypoint_1 is set to the desired resting position – in this case is used the same position as the Plane origin.

A Popup messages ensures the robot is waiting for an operator acknowledgement for starting the painting cycle.

Each variable waypoint is then assigned the value of the end of horizontal lines and end of vertical lines so each variable waypoint is ready to be used for moving the robot. In this case the user defined plane is used as reference to each move by using the function pose_trans() where the plane is the first argument and the desired offset of the end point of the particular move is the second argument.

For moving the robot MoveL is used in order to make linear lines during the painting.

The robot moves to start position and the spray nozzle is activated. After the activation a delay of 0.3 seconds are inserted in order to ensure that the spray nozzle is fully on and paint flow has been started.

In this case – after each horizontal line the spray nozzle is turned off during the vertical move.

After last line 4 – the last line in this example the spray nozzle is turned off and the robot returns to starting position and the await operator activation of next cycle.

 

Program code:

 

universal-robots-zacobria-painting-application-1
universal-robots-zacobria-painting-application-2

 

universal-robots-zacobria-painting-application-program-movel-base-1

Notice that the MoveL has the Base_var as feature because the reference to the plane is set by using the pose_trans() function where the Plane variable is used.

It is possible to reduce the length of the program by using variable for the length of the horizontal and vertical distances and then do math on the variable when used in the waypoint variable by increment the value with the desired number.

And it is also possible to reduce the program further by using the loop function for drawing each line.

But for the purpose of ease of understanding this program is chosen to be shown with the assignments along the way.

 

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.

Author:
By Zacobria Lars Skovsgaard
Accredited Universal Robots support Centre and Forum.

Also check out the CB3 forum



Was this article helpful?

5 comments

  1. Hello everybody
    I am new in programming robot
    I just received an ur 10 in Morocco for painting purpose
    I am also working in textile company and I can A waterproof robot dress for 10 euro
    But not here for that
    I would like to know if anybody can help me to make a symmetrical move of a move with many way point
    I know that some are using xml script to make this but I only want to use the poly scope
    i need to repeat a move symmetrically from a plan to another one and I stuck
    Best regards

    1. Hi chaben

      Thanks for the question.

      It might be possible to utilize the user plane as a base to switch positions arround the centre point for making the symmetry.

      Some more informations about using the planes with variables at these links.

      http://www.zacobria.com/universal-robots-knowledge-base-tech-support-forum-hints-tips/knowledge-base/position-variables-1/

      http://www.zacobria.com/universal-robots-knowledge-base-tech-support-forum-hints-tips/knowledge-base/planes-and-position-variables-1/

      http://www.zacobria.com/universal-robots-knowledge-base-tech-support-forum-hints-tips/knowledge-base/planes-and-position-variables-2/

      Author:
      By Zacobria Lars Skovsgaard
      Accredited Universal Robots support Centre and Forum.

      Also check out the CB3 forum



  2. Hello everyone,
    I am looking for a UR 5 robot dress similar the one that can be seen on this pic. Any addresses in France or, more generally, in Europe that you might suggest?
    Thanks
    Alain

Leave a Reply

Your email address will not be published. Required fields are marked *