Difference between revisions of "MC-Basic:ROBOTTYPE"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{MC-Basic |SHORT FORM= |SYNTAX= <''point_variable''> = castpoint (<''list_of_coordinates''>, <''long_expression''>) |AVAILABILITY= Version 4.9.11 and up |DESCRIPTION= Crea...")
 
(ROBOTTYPE)
Line 4: Line 4:
  
 
|SYNTAX=
 
|SYNTAX=
<''point_variable''> = castpoint (<''list_of_coordinates''>, <''long_expression''>)
+
<''long_variable''> = robottype (<''point_expression''>)
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Version 4.9.11 and up
+
Version 4.9.11 and up.
 
|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.
+
Returns the robot type of a point variable or property as a long-type numeric value. The function will return zero for point inputs without robot types (i.e., list-of-coordinates and uninitialized generic points).
  
 
|TYPE=
 
|TYPE=
Joint or Location
+
Long
 
|RANGE=
 
|RANGE=
  
Line 26: Line 26:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
The robot type given in the second argument must match the number of coordinates of the list-of-coordinates argument.
 
  
 
|EXAMPLE=
 
|EXAMPLE=
 
<pre>
 
<pre>
GenJoint = CASTPOINT({0.0, 10.0, 20.0}, TYPE_XYZ)
+
LongVar = ROBOTTYPE(#{0.0, 10.0, 20.0})
  
? CASTPOINT(#{0.0, 0.0, 0.0, 1.0}, TYPE_XYZR)  
+
? ROBOTTYPE(JointVar)
 +
 
 +
LongVar = ROBOTTYPE(Robot.PCMD)
 +
 
</pre>
 
</pre>
  

Revision as of 14:36, 6 November 2012

Returns the robot type of a point variable or property as a long-type numeric value. The function will return zero for point inputs without robot types (i.e., list-of-coordinates and uninitialized generic points).

Syntax

<long_variable> = robottype (<point_expression>)

Availability

Version 4.9.11 and up.

Type

Long

Scope

Configuration, Task, Terminal

Examples

LongVar = ROBOTTYPE(#{0.0, 10.0, 20.0})

? ROBOTTYPE(JointVar)

LongVar = ROBOTTYPE(Robot.PCMD)