PTPTime Function
Returns the estimated time for a point to point motion command without executing it.
Syntax
(1) PTPTime(destination, destArm, destTool)
(2) PTPTime(start, startArm, startTool, destination, destArm, destTool)
Parameters
- start
- Specify the start position as a point expression.
- destination
- Specify the destination position with a point expression.
- destArm
- Specify the arm number of the destination position as an integer value or an expression.
- destTool
- Specify the tool number of the destination position as an integer value or an expression.
- startArm
- Specify the arm number of the start position as an integer value or an expression.
- startTool
- Specify the tool number of the start position as an integer value or an expression.
Return Values
Real value in seconds.
Description
Use PTPTime to calculate the time it would take for a point to point motion command (Go). Use syntax 1 to calculate time from the current position to the destination. Use syntax 2 to calculate time from a start point to a destination point.
The actual motion operation is not performed when this function is executed. The current position, arm, and tool settings do not change.
If the position is one that cannot be arrived at or if the arm or tool settings are incorrect, 0 is returned.
If a robot includes an additional axis and it is the servo axis, the function will consider the motion time of the additional axis. If the additional axis is a PG axis, the motion time of the robot will be returned.
See Also
ATRQ, Go, PTRQ
PTPTime Function Example
Real secs
secs = PTPTime(P1, 0, 0, P2, 0, 1)
Print "Time to go from P1 to P2 is:", secs
Go P1
secs = PTPTime(P2, 0, 1)
Print "Time to go from P1 to P2 is:", secs