GetAxisVelocity

Gets the current velocity from an axis. The velocity can be set velocity or actual velocity.

Syntax

KsError GetAxisVelocity(
     int Index,
     McSource Source,
     double* Velocity
);

Parameters

Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.

Source: selects a velocity value to read. See the McSource type.

Velocity: pointer to the value to receive the velocity.

Return value

If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.

Example

Copy
double axisVel = 0.0;
KsError nRet = GetAxisVelocity(0, McSource::mcSetValue, &axisVel);

Requirements

  RT Win32
Minimum supported version 4.0 4.0
Header ksmotion.h ksmotion.h
Library KsApi_Rtss.lib KsApi.lib

See also

GetAxisFollowingError

GetAxisPosition

GetAxisTorque

SetAxisVelocity