Calculating robot positions can save programming time, especially when parts are picked and/or placed in an array.

Many factors must be understood and correctly set up before successfully calculating robot position.

- Cartesian positions are measured from robot tool center point (TCP) to the origin (0,0,0) position of the referenced frame (base, robot, user.) Any change of TCP and/or frame origin changes the position of the robot.
- Coordinate and rotation data are not the only factors when positioning a robot. Manipulator “TYPE” changes how the robot postures with cartesian (X, Y, Z) positions. Refer to the YRC1000 “Relative Job Function” manual (#178659-1CD) section 4.4 “Manipulator Type”.
- If not using local variables, it is always best to reserve section(s) of variables to maintain all calculations. Multiple variable types may be required based upon user needs. For ease of reference, like variable numbers are recommended (D032 should calculate with R032, B032, I032)
- Local variables must be re-established each time a job runs. Global values retain values beyond the active job. If using local variables, some global variables may be required to maintain data.
- Reservation of variables ending with 1-6 to matching axes can save future confusion. 1=X, 2=Y, 3=Z, 4=Rx, 5=Ry, 6=Rz.
- When setting position in position variables the user must use Double variables.
- When setting Double variables in position variables, decimal placement must be considered. X, Y, & Z uses thousandths: 3 decimal points. 0.000. to enter value of 1234.567 mm, Double variable should be 1,234,567. Rx, Ry, & Rz uses ten-thousandths: 4 decimal points 0.0000. To enter a value of 98.7654, Double variable should be 987,654. PULSE position variables do not need to offset decimal points, as no decimal points are used with PULSE data.
- The user must have position variable(s) set to a correct frame and tool. Incorrect frame and/or tool selection can result in damage to the robot and equipment.
- The user must understand the EXPRESSSION function of the SET instruction.

In many cases, a previous calculation will be required to determine position. The line below is a more complex example of calculated data for x position using EXPRESSION in the SET instruction.

**SET LD001 ( R011 * B011 + R011 * 0.5 ) * 1000**

*LD001 is the destination of calculated data to be placed in p-var X position.*

* R011 is length of product or distance from part to part. (XXX.XXX mm)*

* B011 is the count of product(s) currently in row.*

* The second calculation of R011 * 0.5 is to add half product length to measure centered position.*

* The final * 1000 offsets for decimal placement of X, Y, & Z positions.*

* Setting calculated data X position in p-var.*

**SETE LP001 (1) LD001.**

Vary rarely will Rx, Ry, & Rz need to be calculated. The principle is the same as X, Y, & Z with one major exception being a final * to offset decimal. Multiply by 10000 for angles. The line below is basic example of calculated data for Rz position using EXPRESSION in the SET instruction.

**SET LD006 R016 * 10000**

* LD006 is the destination for calculated data to be placed in Rz angle.*

* R016 is the angle desired (XXX.XXXX degrees).*

* The final * 10000 offsets for decimal placement of Rx, Ry, & Rz positions.*

* Setting calculated data Rz position in p-var.*

** SETE LP006 (6) LD006**

## Comments

0 comments

Please sign in to leave a comment.