GetAxisPosition

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

Syntax

KsError GetAxisPosition(
     int Index,
     McSource Source,
     double* Position
);

Parameters

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

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

Position: pointer to the value to receive the current position.

Return value

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

Remarks

When modulo axis is enabled, the commend, set, and actual positions in McSource will be applied with the modulo value.

Example

Copy
double axisPos = 0.0;
KsError nRet = GetAxisPosition(0, McSource::mcCommandedValue, &axisPos);

Requirements

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

See also

GetAxisFollowingError

GetAxisTorque

GetAxisVelocity

SetAxisPosition