ID : 2675
TrackMotionRange
Function
Check whether there is any point entering the robot motion range, on the path of the target position of the robot task motion when the tracking-target work is within the tracking range.
This command is available in Ver.2.11.* or higher.
Syntax
TrackMotionRange (Conveyor number, Target position [, Tool coordinate [, Work coordinate] ])
Guaranteed Entry
- Conveyor number
-
Specify the conveyor number that a workpiece to be performed the target position check exists. Specify by integer type data.
- Target position
-
Specify the target position to designate by TrackMove command. Select from position type, homogeneous translation type and joint type data.
- Tool coordinate
Specify the elements (X, Y, Z, Rx, Ry, Rz) of Tool coordinate with position type data, or specify a Tool coordinate number (-1 to 63) with integer type data. If you specify with position type data, Fig is ignored. "-1" represents the currently used tool number. 0 to 63 represents the tool coordinate number. This entry is omittable. This should be "-1" (current tool number) if this is omitted.
- Work coordinate
-
Specify the elements (X, Y, Z, Rx, Ry, Rz) of Work coordinate with position type data, or specify a Work coordinate number (-1 to 7) with integer type data. If you specify with position type data, Fig is ignored. "-1" represents the currently used work number. 0 to 7 represents the work coordinate number. This entry is omittable. This should be "-1" (current work number) if this is omitted.
Return Value
Return whether there is any point entering the robot motion range, for the target position of the robot task motion when the tracking-target work is within the tracking range, by integer type data.
Return value | Description |
---|---|
0 | There is not any point entering the robot motion range. |
Other than 0 | There is a point entering the robot motion range. |
Description
When starting the tracking motion, if the target position of the robot task motion is out of the robot motion range, an error will occur. By using TrackCurMotionRange command, you can check whether the target position of the robot task motion is within the robot motion range. However, the target position may not enter the robot motion range as shown below.
TrackMotionRange command checks whether there is any point entering the robot motion range, on the path of the target position of the robot task motion when the tracking-target work is within the tracking range.
In actual, on the path of the tracking-target work to be checked, it calculates the position of the path points at equal interval with the upstream limit and the downstream limit of the tracking range as end points. If even one of them is within the robot motion range, "other than 0" will be returned.
For the number of path points, set by user parameter "278 : Number of target position of task motion for software limit check".
Example: Number of Path Points Is Set to 4
For the tracking-target work in green, even one of the path points on the path is not within the robot motion range. Therefore, the return value "0" is returned.
For the tracking-target work in blue, one or more than path points on the path is within the robot motion range. Therefore, the return value "other than 0" is returned.
Related Terms
TrackCurMotionRange, TrackStart, Commands for Conveyor Tracking, Commands for Circular Tracking
Attention
This command is dedicated for conveyor and circular tracking.
Example
' Specify the tracking-target work
P10 = TrackTargetPos(1)
' Check whether the tracking motion for the tracking-target work can be performed
If TrackMotionRange(1, P10) <> 0 Then ' when the tracking motion for the tracking-target work can be performed
' Wait until the target position of the robot task motion is within the tracking range
Wait TrackCurMotionRange(1, P10)
TrackStart 1
TrackMove P, P10
TrackStop
Else ' when the tracking motion for the tracking-target work cannot be performed
TrackTargetRelease 1, true ' Delete the target work from buffer
Endif
ID : 2675