Difference between revisions of "MC-Basic:isJointReachable"

From SoftMC-Wiki
Jump to: navigation, search
Line 23: Line 23:
 
|TYPE=
 
|TYPE=
 
Long
 
Long
 
+
0 - Ok<br>
0 - Ok
+
1,2,3 ... - which axis exceed position limt<br>
 
+
Others - system error, basically there is no single axis that exceeds limit but the combination of segment length and input cartesian point does not have solution of Inverse Kinematics. Can be:<br>
 +
*121 - The target point is not reachable. <br>
 +
*119 - Point too far. Outside of the working envelope. The target coordinates are too far from the robot's Cartesian space origin point.<br>
 +
*125 - Wrong point type.<br>
 +
more of them can be found in [[http://softmc.servotronix.com/wiki/Error_Codes|Error Codes]], just add to return value 3000 for motion and 13000 for robot errors<br>.
  
  
Line 49: Line 53:
 
|EXAMPLE=
 
|EXAMPLE=
 
? isJointReachable(G1, {1,2,3})<br>
 
? isJointReachable(G1, {1,2,3})<br>
 
 
? isJointReachable(G1, G1.Pfb)<br>
 
? isJointReachable(G1, G1.Pfb)<br>
 
 
L1 = isJointReachable(SCARA, J1)
 
L1 = isJointReachable(SCARA, J1)
  

Revision as of 14:06, 7 March 2021

Language: English

Check if given point (joint) can be reached by the robot. Checks joint and cartesian limits. Input parameters:

<Robot> = name of the group for which the direct kinematics is computed, when a WITH command is executed, this argument is not needed (the comma can also be omitted).

<joint> = joint coordinates of the point to be translated into Cartesian coordinates. The type of the joint variable must be compatible with the robot type.

User:                    Application developer

Return value:      Long (0 - OK)

Syntax

<long>=isJointReachable(<Robot>, <joint>)

Type

Long

0 - Ok
1,2,3 ... - which axis exceed position limt
Others - system error, basically there is no single axis that exceeds limit but the combination of segment length and input cartesian point does not have solution of Inverse Kinematics. Can be:
*121 - The target point is not reachable.
*119 - Point too far. Outside of the working envelope. The target coordinates are too far from the robot's Cartesian space origin point.
*125 - Wrong point type.
more of them can be found in [Codes], just add to return value 3000 for motion and 13000 for robot errors
.

Scope

Task,Terminal

Limitations

Not in Configuration context

The location variable and the joint parameter must have a group type identical to the group parameter, or have the same number of coordinates.

Errors:                 N/A

Examples

? isJointReachable(G1, {1,2,3})
? isJointReachable(G1, G1.Pfb)
L1 = isJointReachable(SCARA, J1)

See Also