◆ HardwareNegLimitActionGet()

virtual RSIAction HardwareNegLimitActionGet ( )
pure virtual

Get the action that will occur when the Hardware Negative Limit Event triggers.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the Limits and Action Configuration method group.

Description:
HardwareNegLimitActionGet returns the action that will occur when the Hardware Negative Limit Event triggers.
Returns
(RSIAction) Action taken on Negative Limit trigger.
Note:
Available Actions are Abort(), EStop(), Stop(), None, EStopAbort(), and EStopModify()
Sample Code:
Sample Code:
HardwareLimits
// Constants
const bool ACTIVE_HIGH = true; // Constant for active high.
const bool ACTIVE_LOW = false; // Constant for active low.
const double HW_POS_DURATION_TIME = 0.01; // Positive limit duration. (in seconds)
const double HW_NEG_DURATION_TIME = 0.01; // Negative limit duration. (in seconds)
// Change Hardware POSITIVE (+) Limit characteristics.
//---ACT---
axis.HardwarePosLimitActionSet(RSIAction.RSIActionE_STOP); // Set the positive limit action to E_STOP.
axis.HardwarePosLimitTriggerStateSet(ACTIVE_HIGH); // Set the positive limit trigger state to ACTIVE_HIGH.
axis.HardwarePosLimitDurationSet(HW_POS_DURATION_TIME); // Set the positive limit duration to 0.01 seconds.
//---ASSERT---
Assert.That(axis.HardwarePosLimitActionGet(), Is.EqualTo(RSIAction.RSIActionE_STOP), "Hardware Positive Limit Action should be set to RSIAction.RSIActionE_STOP");
Assert.That(axis.HardwarePosLimitTriggerStateGet(), Is.EqualTo(ACTIVE_HIGH), "Hardware Positive Limit TriggerState should be set to ACTIVE_HIGH");
Assert.That(axis.HardwarePosLimitDurationGet(), Is.EqualTo(HW_POS_DURATION_TIME), "Hardware Positive Limit Duration set to HW_POS_DURATION_TIME");
// Change Hardware NEGATIVE (-) Limit charateristics.
//---ACT---
axis.HardwareNegLimitActionSet(RSIAction.RSIActionE_STOP); // Set the negative limit action to E_STOP.
axis.HardwareNegLimitTriggerStateSet(ACTIVE_LOW); // Set the negative limit trigger state to ACTIVE_LOW.
axis.HardwareNegLimitDurationSet(HW_NEG_DURATION_TIME); // Set the negative limit duration to 0.01 seconds.
//---ASSERT---
Assert.That(axis.HardwareNegLimitActionGet(), Is.EqualTo(RSIAction.RSIActionE_STOP), "Hardware Positive Limit Action should be set to RSIAction.RSIActionE_STOP");
Assert.That(axis.HardwareNegLimitTriggerStateGet(), Is.EqualTo(ACTIVE_LOW), "Hardware Positive Limit TriggerState should be set to ACTIVE_LOW");
Assert.That(axis.HardwareNegLimitDurationGet(), Is.EqualTo(HW_POS_DURATION_TIME), "Hardware Positive Limit Duration set to HW_POS_DURATION_TIME");
RapidSetup:
Go to axis screen->Limits & Actions. In image below, HardwareNegLimitActionGet returns the action type shown in the Negative (-) Hardware box. It is currently set to E_STOP.
Limits_Actions.jpg
See also
HardwareNegLimitActionSet
Examples
HardwareLimits.cpp.