The RMP Motion Controller APIs

◆ CheckErrors()

public static void CheckErrors ( RapidCodeObject  rsiObject)
static
Parameters
RapidCodeObjectrsiObject
public static void CheckErrors(RapidCodeObject rsiObject)
{
bool hasErrors = false;
System.Text.StringBuilder errorStringBuilder = new System.Text.StringBuilder();
while (rsiObject.ErrorLogCountGet() > 0)
{
RsiError error = rsiObject.ErrorLogGet();
if (error.isWarning)
{
errorStringBuilder.AppendLine("WARNING: " + error.Message);
}
else
{
hasErrors = true;
errorStringBuilder.AppendLine("ERROR: " + error.Message);
}
}
if (errorStringBuilder.Length > 0)
{
Console.WriteLine(errorStringBuilder.ToString());
}
if (hasErrors)
{
throw new Exception(errorStringBuilder.ToString());
}
}
See also
StartTheNetwork
Examples
ControllerInterrupts.cpp, Gantry.cpp, GearingCamming.cs, HardwareLimits.cpp, HelperFunctions.cs, Homing.cs, Memory.cpp, Motion.cs, MotionHold.cs, MotionHoldReleasedBySoftwareAddress.cpp, MultiaxisMotion.cpp, MultiAxisMotion.cs, PathMotion.cpp, PVTmotionMultiAxis.cpp, SingleAxisSyncOutputs.cpp, SyncInterrupt.cpp, Template.cpp, Template.cs, TouchProbe.cs, UserLimit.cs, UserLimitDigitalInputAction.cpp, and VelocitySetByAnalogInputValue.cs.

Definition at line 64 of file HelperFunctions.cs.

HelperFunctions.CheckErrors
static void CheckErrors(RapidCodeObject rsiObject)
Check if the RapidCode Object has any errors.
Definition: HelperFunctions.cs:64