SetAxisTorquePolarity

Sets the direction of an axis' torque.

Syntax

KsError SetAxisTorquePolarity(
     int Index,
     McPolarity Polarity
);

Parameters

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

Polarity: the direction of torque. See the McPolarity type.

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
KsError nRet = SetAxisTorquePolarity(0, McPolarity::mcPositive);

Requirements

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

See also

SetAxisDirection

SetAxisTorquePid

SetAxisVelocityPid