Exit gearing
If you don't need gearing anymore, use AbortCommand to detach the slave axis from the master.
In Gear.cpp
, add the following code:
Copy
VOID RemoveGearSlave(KsCommandStatus gear)
{
RtPrintf("Exit gearing.\n\n");
//Remove the gear.
KsCommandStatus abort = AbortCommand(gear);
if (abort.Error)
RtPrintf("The command has not been aborted: %d\n\n", abort.ErrorId);
else if (abort.CommandAborted)
RtPrintf("The command has been aborted.\n\n");
}