SetAxisControlMode

Sets a control mode of an axis at run time. The control mode must be compatible with the current access mode. Not all axes support control mode changes at run time.

Syntax

KsCommandStatus SetAxisControlMode(
     int Index,
     McControlMode ControlMode
);

Parameters

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

ControlMode: a control mode for an axis. See the McControlMode 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.

Remarks

Example

BOOL ConfigureControlMode(INT Index, McControlMode Mode) {
   KsCommandStatus status = WaitForCommand(5, TRUE, SetAxisControlMode(Index, modeMasterIntPos));
   return TRUE;
}

Requirements

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

See also

GetAxisAvailableControlModes

McControlMode

SetAxisAccessMode