AvgSpeed Function

Returns the average value of the absolute speed values for the specified joints.

Syntax
AvgSpeed (jointNumber)

Parameters

jointNumber
Specify the joint number as an integer value or an expression. The additional S axis is 8 and T axis is 9.

Return Values
Real value from 0 to 1.

Description
AvgSpeed function returns the average value of the absolute speed values for the specified joints. The loading state of the motor can be obtained by this function. The result is a real value from 0 to 1 with 1 being the maximum average speed value.

You must execute AvgSpeedClear before this command is executed.

This instruction is time restricted. You must execute AvgSpeed function within 60 seconds after AvgSpeed statement is executed. When this time is exceeded, error 4088 occurs.

When using the virtual controller or conducting dry-run, the average of the absolute speed values is calculated from the commanded speed instead of the actual speed.

This command does not support the PG additional axes.

See Also
AvgSpeed, AvgSpeedClear, PeakSpeed

AvgSpeed Function Example
This example uses the AvgSpeed function in a program:

Function CheckAvgSpeed
  Integer i

  Go P1
  AvgSpeedClear
  Go P2
  Print "Average speeds:"
  For i = 1 To 6
    Print "Joint ", i, " = ", AvgSpeed (i)
  Next i
Fend