Skip to main content

DECOMPOSE

DECOMPOSE array variable [element number] = pose variable

Function

Stores as elements of an array variable, each component of the values of the specified pose variable (X, Y, Z, O, A, T for transformation values; JT1, JT2, JT3, JT4, JT5, JT6 for joint displacement values). 

Parameter

Array variable
Specifies the name of the array variable into which the values of each component will be assigned.

Element number
Specifies the first element in which to store the components.

Pose variable
Specifies the name of the pose variable from which to extract each component (transformation values, joint displacement values). 

Explanation

This assigns the components of the specified pose information to the elements of the array variable.

In case of transformation values, six elements are assigned from each of the XYZOAT values. In case of joint displacement values, the elements are each assigned from the values of each joint in the robot arm. 

Example

//Assigns the components of transformation value variable “part” to the first six elements in the array variable “x”.
DECOMPOSE X[0]=part 
// Assigns the components of joint displacement value variable “#pick” to array variable “angles”, starting from element number 4.
DECOMPOSE angles[4]=#pick 

(*For example, in the above instruction, if the values of #pick are (10,20,30,40,50,60) then,
angles[4]=10 angles[7]=40
angles[5]=20 angles[8]=50
angles[6]=30 angles[9]=60 *)