Console.WriteLine("📜 Axis Homing: AKD Drive");
int exitCode = 0;
try
{
Helpers.VerifyHardwareUsage(controller);
Helpers.VerifyAxisCount(controller);
if (controller.NetworkStateGet() !=
RSINetworkState.RSINetworkStateOPERATIONAL)
{
Console.WriteLine("Network not started. Please start it before running this app.");
}
{
Console.WriteLine("Wrong Axis type. This sample requires an AKD Axis.");
}
System.Threading.Thread.Sleep(100);
Console.WriteLine("HOME.MOVE command sent");
UInt16 statusWord;
int isHomed = 0;
while (isHomed != 1)
{
isHomed = statusWord >> 12;
}
Console.WriteLine("Axis homed");
}
catch (Exception e)
{
Console.WriteLine($"❌ Error: {e.Message}");
}
finally
{
controller.Delete();
}
return exitCode;
Constants used in the C# sample apps.
const int EXIT_FAILURE
Exit code for failed execution.
const int AXIS_0_INDEX
Default: 0.
const int AMP_ENABLE_MS
Default: 750.
const int EXIT_SUCCESS
Exit code for successful execution.
void OriginPositionSet(double position)
Set the origin position.
void OperationModeSet(RSIOperationMode mode)
Set the axis operation mode.
NetworkNode * NetworkNode
Gets the associated NetworkNode object.
void ErrorLimitActionSet(RSIAction action)
Set the action that will occur when the Error Limit Event triggers.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
static MotionController * Get()
Get an already running RMP EtherCAT controller.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
char * AKDASCIICommand(const char *const command)
Send a Kollmorgen AKD ASCII command (NodeType must equal KOLLMORGEN_AKD).
uint16_t StatusWordGet(int32_t axisIndex)
Get the DS402 status word.
RSINodeType TypeGet()
Get the node type, as determined by the Vendor ID and Product Code.
void ClearFaults()
Clear all faults for an Axis or MultiAxis.
void Abort()
Abort an axis.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
int32_t NumberGet()
Get the axis number.
RSINetworkState
State of network.
RSIAction
Action to perform on an Axis.
RSINodeType
Valid Node types.
RSIOperationMode
DS402 modes of operation.
Helpers namespace provides utility functions for common tasks in RMP applications.