omron — Creating and Altering Location Variables

Creating and Altering Location Variables Relative Transformations Relative transformations allow you to make one location relative to another and to build local reference frames to which that transformations can be relative. For example, you may be building an assembly whose location in the workcell changes periodically. If all the locations on the assembly are taught relative to the world coordinate frame, each time the assembly is located differently in the workcell, all the locations must be retaught. If, however, you create a frame based on identifiable features of the assembly, you will have to reteach only the points that define the frame.

Examples of Modifying Location Variables The figure Relative Transformation shows how relative transformations work. The magnitude and direction elements (x, y, z), but not the orientation elements (y, p, r), of an Omron Adept transformation can be represented as a 3-D vector, as shown by the dashed lines and arrows in the figure Relative Transformation. The following code generates the locations shown in that figure.

; Define a simple transformation SET loc_a = TRANS(300,50,350,0,180,0) ; Move to the location MOVE loc_a BREAK ; Move to a location offset -50mm in X, 20mm in Y, ; and 30mm in Z relative to "loc_a" MOVE loc_a:TRANS(-50, 20, 30) BREAK ; Define "loc_b" to be the current location relative ; to "loc_a" HERE loc_a:loc_b ;loc_b = -50, 20, 30, 0, 0, 0 BREAK ; Define "loc_c" as the vector sum of "loc_a" and "loc_b" SET loc_c = loc_a:loc_b ;loc_c = 350, 70, 320, 0, 180, 0 Once this code has run, loc_b exists as a transformation that is completely independent of loc_a. The following instruction moves the robot another -50 mm in the x, 20 mm in the y, and 30 mm in the z direction (relative to loc_c):

MOVE loc_c:loc_b Multiple relative transformations can be chained together. If we define loc_d to have the value 0, 50, 0, 0, 0, 0: SET loc_d = TRANS(0,50) and then issue the following MOVE instruction: MOVE loc_a:loc_b:loc_d the robot moves to a position x = -50 mm, y =70 mm, and z = 30 mm relative to loc_a. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 110