Console.WriteLine("📜 Basic Template");
#if WINDOWS
createParams.RmpPath = Constants.RMP_WINDOWS_PATH;
createParams.NodeName = Constants.RMP_NODE_NAME;
#elif LINUX
createParams.RmpPath = Constants.RMP_LINUX_PATH;
createParams.NicPrimary = Constants.RMP_NIC_PRIMARY;
createParams.CpuAffinity = Constants.RMP_CPU_AFFINITY;
#endif
try
{
Axis axis = controller.
AxisGet(Constants.AXIS_0_INDEX);
const int ENCODER_RESOLUTION_BITS = 0;
double userUnits = Math.Pow(2, ENCODER_RESOLUTION_BITS);
Console.WriteLine("Axis initialized and ready");
Console.WriteLine($"User Units: {userUnits}");
Console.WriteLine($"Current Position: {axis.CommandPositionGet()}");
Console.WriteLine($"Amp Enabled: {axis.AmpEnableGet()}");
}
catch (Exception e)
{
Console.WriteLine($"Error: {e.Message}");
}
finally
{
}
static void CheckErrors(RapidCodeObject rsiObject)
Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
Helpers class provides static methods for common tasks in RMP applications.
void UserUnitsSet(double countsPerUserUnit)
Sets the number of counts per User Unit.
void ErrorLimitTriggerValueSet(double triggerValue)
Set the Position Error Limit trigger value.
void PositionSet(double position)
Set the Command and Actual positions.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Axis * AxisGet(int32_t axisNumber)
AxisGet returns a pointer to an Axis object and initializes its internals.
static MotionController * Create(CreationParameters *creationParameters)
Initialize and start the RMP EtherCAT controller.
void Delete(void)
Delete the MotionController and all its objects.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
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.
CreationParameters for MotionController::Create.