◆ HardwareNegLimitDurationSet()

virtual void HardwareNegLimitDurationSet ( double  seconds)
pure virtual

Set the duration required before the Hardware Negative Limit event triggers.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the Limits and Action Configuration method group.

Description:
HardwareNegLimitDurationSet sets the duration required before the Hardware Negative Limit event triggers.
Parameters
secondsDuration in seconds.
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 the image below, HardwareNegLimitDurationSet sets the value in the "Duration" box in the Negative (-) Hardware box. It is currently 0.
Limits_Actions.jpg
See also
HardwareNegLimitDurationGet
Examples
HardwareLimits.cpp.