AvgSpeed Method
Description
Returns the average value of the absolute speed values for the specified joints.
Syntax
Function AvgSpeed (JointNumber As Integer) As Single
Parameters
- JointNumber
An integer indicating the axis number (range: 1 to number of joints of the robot)
Return Value
Real value from 0 to 1.
Remarks
This method returns the average value of the absolute speed values for the specified joints. The loading state of the motor can be obtained by this method. The result is a real value from 0 to 1 with 1 being the maximum average speed value.
You must execute this method before AvgSpeedClear method is executed.
This method is time restricted. You must execute thismethod within 60 seconds after AvgSpeedClear method 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 method does not support the PG additional axes.
See Also
AvgSpeedClear Method, PeakSpeed Method, PeakSpeedClear Method
AvgSpeed Example
VB Example:
Dim val As Single
Dim i As Integer
For i = 1 To 4
val = m_spel.AvgSpeed(i)
Next i
C# Example:
float avgSpeed;
for(int i = 0; i <=4; i++)
avgSpeed = m_spel.AvgSpeed(i);