APIs, concepts, guides, and more
Axis: Configuration

Learn how to configure different settings for an axis.

Warning
This is a sample program to assist in the integration of the RMP motion controller with your application. It may not contain all of the logic and safety features that your application requires. We recommend that you wire an external hardware emergency stop (e-stop) button for safety when using our code sample apps. Doing so will help ensure the safety of you and those around you and will prevent potential injury or damage.

The sample apps assume that the system (network, axes, I/O) are configured prior to running the code featured in the sample app. See the Configuration page for more information.


In this page:


📜 Settling

Settling 📖 is the amount of time that a move must be within the position Fine band, in order for the move to be considered complete.

// get
double posTolFine = axis.PositionToleranceFineGet();
double posTolCoarse = axis.PositionToleranceCoarseGet();
double velTol = axis.VelocityToleranceGet();
double setTime = axis.SettlingTimeGet();
// set
axis.PositionToleranceFineSet(posTolFine); // set fine position tolerance.
axis.PositionToleranceCoarseSet(posTolCoarse); // set coarse position tolerance.
axis.VelocityToleranceSet(velTol); // set velocity tolerance.
axis.SettlingTimeSet(setTime); // set settling time (seconds).

Source: axis-config-settling.cs


📜 Amp Fault Configuration

Learn how to configure the Axis amp fault action for a specific Axis amp state enable/disabled (true/false).

// set
axis.AmpEnableSet(false); // disable the amp
axis.AmpFaultActionSet(RSIAction.RSIActionABORT); // set the action that will occur when there is an amp fault.
axis.AmpFaultTriggerStateSet(false); // set the state of the amp fault.
axis.AmpFaultDurationSet(1); // set the duration (seconds) required before the Amp Fault event triggers.
// get
bool isEnabled = axis.AmpEnableGet();
RSIAction faultAction = axis.AmpFaultActionGet();
bool faultTriggerState = axis.AmpFaultTriggerStateGet();
double faultDuration = axis.AmpFaultDurationGet();

Source: axis-config-ampfault.cs


📜 User Units Set/Get

Learn how to get and set Counts Per Unit (User Units) 📖 .

int ENCODER_RESOLUTION_BITS = 20; // Encoder resolution in bits
// Define counts per unit (user units)
// Example: 2^20 = 1,048,576 pulses/rev → a command of 1 = one full revolution
double USER_UNITS = Math.Pow(2, ENCODER_RESOLUTION_BITS);
// set
axis.UserUnitsSet(USER_UNITS);
axis.ErrorLimitTriggerValueSet(1); // Position error limit trigger (see support page)
// get
double userUnits = axis.UserUnitsGet();

Source: axis-config-userunits.cs


📜 Stop Rate

Learn how to set the Stopping Rates 📖 .

double STOP_RATE_DEFAULT = 1.0; // Specify the default STOP rate in seconds.
double ESTOP_RATE_DEFAULT = 0.05; // Specify the default ESTOP rate in seconds.
double ESTOP_DECELERATION_RATE = 1000; // Specify the default ESTOP deceleration rate in seconds.
// set
axis.StopTimeSet(STOP_RATE_DEFAULT); // Set the default STOP time to STOP_RATE_DEFAULT secs.
axis.EStopTimeSet(ESTOP_RATE_DEFAULT); // Set the default ESTOP time to ESTOP_RATE_DEFAULT secs.
axis.EStopDecelerationSet(ESTOP_DECELERATION_RATE); // Set the default ESTOP time to ESTOP_DECELERATION_RATE secs.
// get
double stopTime = axis.StopTimeGet();
double eStopTime = axis.EStopTimeGet();
double eStopDeceleration = axis.EStopDecelerationGet();

Source: axis-config-stop-rate.cs


📜 Hardware Limits

Learn how to get and set Hardware Limits 📖 .

bool ACTIVE_HIGH = true;
bool ACTIVE_LOW = false;
double HW_POS_DURATION_TIME = 0.01; // Positive limit duration (in seconds)
double HW_NEG_DURATION_TIME = 0.01; // Negative limit duration (in seconds)
// set pos & neg limits
axis.HardwarePosLimitActionSet(RSIAction.RSIActionE_STOP);
axis.HardwarePosLimitDurationSet(HW_POS_DURATION_TIME);
axis.HardwareNegLimitActionSet(RSIAction.RSIActionE_STOP);
axis.HardwareNegLimitDurationSet(HW_NEG_DURATION_TIME);
// get pos & neg limits
RSIAction hPosLimAct = axis.HardwarePosLimitActionGet();
bool hPosLimTrigState = axis.HardwarePosLimitTriggerStateGet();
double hPosLimDur = axis.HardwarePosLimitDurationGet();
RSIAction hNegLimAct = axis.HardwareNegLimitActionGet();
bool hNegLimTrigState = axis.HardwareNegLimitTriggerStateGet();
double hNegLimDur = axis.HardwareNegLimitDurationGet();

Source: axis-config-hardware-limits.cs


📜 Phantom Axis

Learn how to create Phantom Axes 📖 .

// add phantom axis
controller.AxisCountSet(controller.AxisCountGet() + 1);
// get phantom axis
int axisNumber = controller.AxisCountGet() - 1; // last axis [zero-based]
Axis axis = controller.AxisGet(axisNumber);
// disable all limits (not used for phantom axes)
axis.ErrorLimitActionSet(RSIAction.RSIActionNONE);
axis.HardwareNegLimitActionSet(RSIAction.RSIActionNONE);
axis.HardwarePosLimitActionSet(RSIAction.RSIActionNONE);
axis.HomeActionSet(RSIAction.RSIActionNONE);
axis.SoftwareNegLimitActionSet(RSIAction.RSIActionNONE);
axis.SoftwarePosLimitActionSet(RSIAction.RSIActionNONE);
double POSITION_TOLERANCE_MAX = Double.MaxValue / 10.0; // reduce from max slightly, so XML to string serialization and deserialization works without throwing System.OverflowException
axis.PositionToleranceCoarseSet(POSITION_TOLERANCE_MAX); // set Settling Coarse Position Tolerance to max value
axis.PositionToleranceFineSet(POSITION_TOLERANCE_MAX); // set Settling Fine Position Tolerance to max value (so Phantom axis will get immediate MotionDone when target is reached)
axis.MotorTypeSet(RSIMotorType.RSIMotorTypePHANTOM); // set the MotorType to phantom

Source: axis-config-phantom-axis.cs