APIs, concepts, guides, and more
axis-config-stop-rate.cs
using RSI.RapidCode; // RSI.RapidCode.dotNET;
Console.WriteLine("📜 Axis Config Stop Rate");
// get rmp objects
using MotionController controller = MotionController.Get();
try
{
Helpers.CheckErrors(controller);
Axis axis = controller.AxisGet(Constants.AXIS_INDEX);
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();
Console.WriteLine($"Stop Time: {stopTime}");
Console.WriteLine($"EStop Time: {eStopTime}");
Console.WriteLine($"EStop Deceleration: {eStopDeceleration}");
}
// handle errors as needed
finally
{
controller.Delete(); // dispose
}
Constants used in the C# sample apps.
const int AXIS_INDEX
Default: 0.
Definition _constants.cs:12
static void CheckErrors(RapidCodeObject rsiObject)
Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
Definition _helpers.cs:15
Helpers class provides static methods for common tasks in RMP applications.
Definition _helpers.cs:5
double EStopDecelerationGet()
Get the deceleration rate for an E-Stop, Modify Event.
void EStopDecelerationSet(double decel)
Set the deceleration rate for an E-Stop, Modify Event.
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Definition rsi.h:5870
Axis * AxisGet(int32_t axisNumber)
AxisGet returns a pointer to an Axis object and initializes its internals.
static MotionController * Get()
Get an already running 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...
Definition rsi.h:800
void StopTimeSet(double seconds)
Set the deceleration time for a Stop Event.
double EStopTimeGet()
Get E-Stop Event deceleration time.
void EStopTimeSet(double seconds)
Set the deceleration time for an E-Stop Event.
double StopTimeGet()
Get Stop Event deceleration time.