The RMP Motion Controller APIs

◆ CheckErrors()

public static void CheckErrors ( RapidCodeObject rsiObject)
static
Parameters
rsiObjectThe RapidCodeObject to check for errors.
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
GcodeMotion.cs, GearingCamming.cs, HelperFunctions.cs, MotionHold.cs, MultiAxisMotion.cs, PathMotion.cs, Template.cs, TouchProbe.cs, UserLimit.cs, and VelocitySetByAnalogInputValue.cs.

Definition at line 71 of file HelperFunctions.cs.