HealthRBDistance Function

Returns the driving (rotation) amount of the motor of the specified joint.

Syntax
HealthRBDistance([robotNumber,] jointNumber)

Parameters

robotNumber
Optional. Integer expression (1-16) representing the robot number. If omitted, the current robot number will be used.
jointNumber
Specify the joint as an integer value (1-6). This command is unavailable for the additional axes.

Return Values
Real number representing the driving amount.

Description
Returns the driving (rotation) amount of the motor of the specified joint in robot operation from HealthRBStart to HealthRBStop. The past usage is not considered.

Notes


  • This command does not function in Auto mode.
  • This command does not function in dry run mode (including the virtual controller).

See Also
HealthRBStart, HealthRBStop

HealthRBDistance Function Example

Function RobotPartAnalysis
  Real healthDistance

  Robot 1

  HealthRBStart 1
  Motor On
  Go P0
  Go P1
  Motor Off
  HealthRBStop 1

  healthDistance = HealthRBDistance(1,1)
  Print "Distance =", Str$(healthDistance)
Fend