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
- Select different control modes for each axis, or change between control modes for different operations.
- Use this function only when an axis is disabled, or if the synchronized control mode is enabled.
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