APIs, concepts, guides, and more
axis-config-settling.cs
/* This sample app demonstrates how to set and get axis settling parameters using
RapidCode .NET API.
*/
using RSI.RapidCode; // RSI.RapidCode.dotNET;
Console.WriteLine("📜 Axis Config: Settling");
// get rmp objects
try
{
Helpers.CheckErrors(controller);
Axis axis = controller.AxisGet(axisNumber: 0);
// 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).
Console.WriteLine($"Position Tolerance Fine: {posTolFine}");
Console.WriteLine($"Position Tolerance Coarse: {posTolCoarse}");
Console.WriteLine($"Velocity Tolerance: {velTol}");
Console.WriteLine($"Settling Time: {setTime}");
}
// handle errors as needed
finally
{
controller.Delete(); // dispose
}
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 SettlingTimeGet()
Get the Settling time.
void PositionToleranceCoarseSet(double tolerance)
Set the Coarse Position Tolerance for Axis settling.
double PositionToleranceFineGet()
Get the Fine Position Tolerance for axis settling.
void PositionToleranceFineSet(double tolerance)
Set the Fine Position Tolerance for Axis settling.
void VelocityToleranceSet(double tolerance)
Set the Velocity Tolerance used for settling.
double PositionToleranceCoarseGet()
Get the Coarse Position Tolerance for axis settling.
double VelocityToleranceGet()
Get the velocity tolerance used for settling.
void SettlingTimeSet(double time)
Set the settling time.
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