GetAnAxisVelocity

GetAxisVelocity gets the velocity of an axis. You can use it to check how fast an axis moves. After we get the velocity, we display it using printf because velocity's data type is double.

Copy

GetAnAxisVelocity

VOID GetAnAxisVelocity(int& Index)
{
    //Display the velocity of an axis.

    double velocity = 0;
    KsError nRet = errNoError;

    nRet = GetAxisVelocity(Index, mcActualValue, &velocity);
    if (nRet != errNoError)
        RtPrintf("GetAxisVelocity failed: %x\n", nRet);

    printf("Velocity: %f\n\n", velocity);
}