◆ SoftwarePosLimitActionSet()

virtual void SoftwarePosLimitActionSet ( RSIAction  action)
pure virtual

Set the action that will occur when the Software Positive Limit Event triggers.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the Limits and Action Configuration method group.

Description:
SoftwarePosLimitActionSet sets the action that will occur when the Software Positive Limit Event triggers.
Parameters
actionAction taken on Limit trigger. A RSIAction value.
Note:
Available Actions are Abort(), EStop(), Stop(), None, EStopAbort(), and EStopModify()
Sample Code:
PhantomAxis
controller.AxisCountSet(controller.AxisCountGet() + 1); // Configure one additional axis to be used for the phantom axis
int axisNumber = controller.AxisCountGet() - 1; // Set the axis number to the last axis on the network (subtract one because the axes are zero indexed)
axis = controller.AxisGet(axisNumber); // Initialize Axis class
SampleAppsCS.HelperFunctions.CheckErrors(axis); // [Helper Function] Check that the axis has been initialized correctly
// These limits are not meaningful for a Phantom Axis (e.g., a phantom axis has no actual position so a position error trigger is not necessary)
// Therefore, you must set all of their actions to "NONE".
axis.ErrorLimitActionSet(RSIAction.RSIActionNONE); // Set Error Limit Action.
axis.HardwareNegLimitActionSet(RSIAction.RSIActionNONE); // Set Hardware Negative Limit Action.
axis.HardwarePosLimitActionSet(RSIAction.RSIActionNONE); // Set Hardware Positive Limit Action.
axis.HomeActionSet(RSIAction.RSIActionNONE); // Set Home Action.
axis.SoftwareNegLimitActionSet(RSIAction.RSIActionNONE); // Set Software Negative Limit Action.
axis.SoftwarePosLimitActionSet(RSIAction.RSIActionNONE); // Set Software Positive Limit Action.
const double positionToleranceMax = Double.MaxValue / 10.0; // reduce from max slightly, so XML to string serialization and deserialization works without throwing System.OverflowException
axis.PositionToleranceCoarseSet(positionToleranceMax); // Set Settling Coarse Position Tolerance to max value
axis.PositionToleranceFineSet(positionToleranceMax); // Set Settling Fine Position Tolerance to max value (so Phantom axis will get immediate MotionDone when target is reached)
axis.MotorTypeSet(RSIMotorType.RSIMotorTypePHANTOM); // Set the MotorType to phantom
RapidSetup:
Go to axis screen->Limits & Actions. In image below, SoftwarePosLimitActionSet sets the action type shown in the Positive (+) Software box. It is currently set to E_STOP.
Limits_Actions.jpg
See also
SoftwarePosLimitActionGet