◆ StatusBitGet()

virtual bool StatusBitGet ( RSIEventType  bitMask)
pure virtual

Return the state of a status bit.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the State and Status method group.

Description:
StatusBitGet returns the state of a status bit, true or false.
Parameters
statusBitbitMask from enumeration RSIEventType.
Returns
(bool) True or False value of the statusBit.
Sample Code:
AxisStatus
// CHECK AXIS STATE
RSIState state = axis.StateGet(); // StateGet will return RSIState enum name of the current state of the Axis or MultiAxis. (Ex: RSIStateERROR)
RSISource source; // Declare a RSISource variable.
switch (state)
{
case RSIState.RSIStateIDLE:
case RSIState.RSIStateMOVING:
Console.WriteLine("\nYour Axis is in state: " + state);
break;
case RSIState.RSIStateERROR:
case RSIState.RSIStateSTOPPING_ERROR:
case RSIState.RSIStateSTOPPED:
case RSIState.RSIStateSTOPPING:
source = axis.SourceGet(); // SourceGet will return the RSISource enum name of the first status bit that is active. (Ex: RSISourceAMP_FAULT)
Console.WriteLine("\nYour Axis is in state: " + state);
Console.WriteLine("\nThe source of the axis error is: " + axis.SourceNameGet(source)); // SourceNameGet will return the first status bit which is set on an Axis or MultiAxis.
break;
default:
Console.WriteLine("");
break;
}
// or USE STATUS BIT GET
bool isAmpFault_Active = axis.StatusBitGet(RSIEventType.RSIEventTypeAMP_FAULT); // StatusBitGet returns the state of a status bit, true or false.
bool isPositionErrorLimitActive = axis.StatusBitGet(RSIEventType.RSIEventTypeLIMIT_ERROR);
bool isHWNegativeLimitActive = axis.StatusBitGet(RSIEventType.RSIEventTypeLIMIT_HW_NEG);
bool isHWPostiveLimitActive = axis.StatusBitGet(RSIEventType.RSIEventTypeLIMIT_HW_POS); // This can be done for all RSIEventTypes
RapidSetup:
Go to axis screen->Status tab.
Axis_Source_Good.jpg
Status tab offers various bits that can be tracked
See also
RSIEventType