Difference between revisions of "MC-Basic:CASTJOINT"

From SoftMC-Wiki
Jump to: navigation, search
(CASTJOINT)
 
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:CASTJOINT}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 4: Line 5:
  
 
|SYNTAX=
 
|SYNTAX=
<''joint_variable''> = castjoint (<''long_expression''>, <''long_expression''>)
+
<''joint_variable''> = castjoint (<''long_scalar_expression''>, <''long_expression''>)
  
<''joint_variable''> = castjoint (<''double_expression''>, <''long_expression''>)
+
<''joint_variable''> = castjoint (<''double_scalar_expression''>, <''long_expression''>)
  
 
<''joint_variable''> = castjoint (<''long_array''>, <''long_expression''>)
 
<''joint_variable''> = castjoint (<''long_array''>, <''long_expression''>)
Line 15: Line 16:
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Version 4.9.11 and up
+
Since Version 4.9.11
 
|DESCRIPTION=
 
|DESCRIPTION=
Creates and returns a generic point using the robot type given by the second, long-type argument, whereas point type (i.e., joint or location) and coordinate values are taken from the first, list-of-coordinates argument.
+
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=
Long
+
Joint
 
 
 
|RANGE=
 
|RANGE=
  
Line 35: Line 35:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
The robot type given in the second argument must match the number of coordinates of the list-of-coordinates argument.
+
*Only a single-dimension array can be used as argument.
 +
*Number of array elements must be equal or greater than number of coordinates.
  
 
|EXAMPLE=
 
|EXAMPLE=
<pre>
 
GenJoint = CASTPOINT({0.0, 10.0, 20.0}, TYPE_XYZ)
 
  
? CASTPOINT(#{0.0, 0.0, 0.0, 1.0}, TYPE_XYZR)  
+
GenJoint = CASTJOINT(1, TYPE_XYZ)
</pre>
+
 
 +
? CASTJOINT(ArrayOf4Doubles, TYPE_XYZR)  
 +
 
  
 
|SEE ALSO=
 
|SEE ALSO=
 +
* [[MC-Basic:CASTPOINT|CASTPOINT]]
 +
 +
* [[MC-Basic:CASTLOCATION|CASTLOCATION]]
  
 +
* [[Point Type List|LIST OF ROBOT TYPES]]
  
 +
[[Category:MC-Basic:Points Handling|CASTJOINT]]
 
}}
 
}}

Latest revision as of 01:56, 26 April 2017

Language: English  • 中文(简体)‎

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

Since Version 4.9.11

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