OutRange
Function
To return whether or not position data are within motion space of the robot.
Syntax
OutRange(position data[, tool coordinate number[, work coordinate number]])
Guaranteed Entry
- Position data
- Designate position data you want to investigate by Position Type data, Joint Type data or Homogeneous Translation Type data.
- Tool coordinate number
- Designate Integer Type data from -1 to 63. "-1" represents the current tool number and 0-63 are tool coordinate numbers. This is an optional value. This should be "-1" (current tool number) if this is omitted. When joint type data are designated as position data, the data are ignored.
- Work coordinate number
- Designate Integer Type data from -1 to 7. "-1" represents the current work number and 0-7 are work coordinate numbers. This is an optional value. This should be "-1" (current work number) if this is omitted. When joint type data are designated as position data, the data are ignored.
Return Value
Return an Integer Type value.
Description
It is returned whether or not position data are within motion space of the robot.
When the tool coordinate number and work coordinate number are omitted, calculation is performed by the current tool and work coordinate numbers.
When Joint Type data are designated as position data, the extended-joints components are ignored.
Return Value Out of the Motion Space
| Value | Meaning |
|---|---|
| 0 | Within motion space |
| 1-63 | Out of motion space: Position where the software motion limit is exceeded for any axis |
| -1 | Position where calculation is not possible due to axis structure* |
| -2 | Singular point* |
* Only when position type data and homogeneous translation type data are designated.
If the designated position data are any position where the software motion limit is exceeded for any axis of the robot, 6-bit integer value that indicate 1 when the software motion limit over occurs with the 1st axis set as 1st bit is returned.
E.g. 5 is returned with &B000101 when the software motion limit is exceeded in 1st and 3rd axes.
Related Terms
Attention
-
Example
Dim aaa As Position
Do
aaa = CurPos + P(0, 0, 30)
If OutRange(aaa) = 0 Then
Move L, aaa
Else
Exit Do
End If
Loop

