Difference between revisions of "MC-Basic:CASTJOINT"

From SoftMC-Wiki
Jump to: navigation, search
m
Line 17: Line 17:
 
Version 4.9.11 and up.
 
Version 4.9.11 and up.
 
|DESCRIPTION=
 
|DESCRIPTION=
Creates and returns a generic joint-type point, using the robot type given by the second, long-type argument, whereas coordinate values are taken from the first argument. If the first argument is a scalar, the resulting point will be composed of identical coordinates. Using an array as first argument will result in a point composed of the first "number-of-coordinates" (determined by the robot type) array elements.
+
Creates and returns a generic joint type of point, using the robot type given by the second, long-type argument, while the coordinate values are taken from the first argument. If the first argument is scalar, the resulting point will be composed of identical coordinates. Using an array as the first argument will result in a point composed of the first "number-of-coordinates" (determined by the robot type) array elements.
  
 
|TYPE=
 
|TYPE=
Line 34: Line 34:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
Only a single-dimension array can be used as argument.
+
*Only a single-dimension array can be used as argument.
 +
*Number of array elements must be equal or greater than number of coordinates.
  
Number of array elements must be equal or greater than number of coordinates.
+
|EXAMPLE=
  
|EXAMPLE=
 
<pre>
 
 
GenJoint = CASTJOINT(1, TYPE_XYZ)
 
GenJoint = CASTJOINT(1, TYPE_XYZ)
  
 
? CASTJOINT(ArrayOf4Doubles, TYPE_XYZR)  
 
? CASTJOINT(ArrayOf4Doubles, TYPE_XYZR)  
</pre>
+
 
  
 
|SEE ALSO=
 
|SEE ALSO=

Revision as of 11:27, 20 March 2014

Creates and returns a generic joint type of point, using the robot type given by the second, long-type argument, while the coordinate values are taken from the first argument. If the first argument is scalar, the resulting point will be composed of identical coordinates. Using an array as the first argument will result in a point composed of the first "number-of-coordinates" (determined by the robot type) array elements.

Syntax

<joint_variable> = castjoint (<long_scalar_expression>, <long_expression>)

<joint_variable> = castjoint (<double_scalar_expression>, <long_expression>)

<joint_variable> = castjoint (<long_array>, <long_expression>)

<joint_variable> = castjoint (<double_array>, <long_expression>)

Availability

Version 4.9.11 and up.

Type

Joint

Scope

Configuration, Task, Terminal

Limitations

  • Only a single-dimension array can be used as argument.
  • Number of array elements must be equal or greater than number of coordinates.

Examples

GenJoint = CASTJOINT(1, TYPE_XYZ)

? CASTJOINT(ArrayOf4Doubles, TYPE_XYZR)

See Also