◆ AmpFaultTriggerStateSet()

virtual void AmpFaultTriggerStateSet ( bool  state)
pure virtual

Set the trigger state of the Amp Fault input.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the Limits and Action Configuration method group.

Description:
AmpFaultTriggerStateSet sets the trigger state of the Amp Fault input.
Parameters
state1 = triggers on active high signal, 0 = triggers on active low signal.
Sample Code:
ConfigAmpFault
//---ARRANGE---
const double AMP_FAULT_DURATION_TIME = 1; //value in seconds
//---ACT---
axis.AmpEnableSet(false); // Disable the amp
axis.AmpFaultActionSet(RSIAction.RSIActionABORT); // Set the action that will occur when there is an amp fault.
axis.AmpFaultTriggerStateSet(false); //Set the state of the amp fault.
axis.AmpFaultDurationSet(AMP_FAULT_DURATION_TIME); //Set the duration required before the Amp Fault event triggers.
//---ASSERT---
Assert.That(axis.AmpEnableGet(), Is.EqualTo(false), "The getter function should return a value equal to false");
Assert.That(axis.AmpFaultActionGet(), Is.EqualTo(RSIAction.RSIActionABORT), "The getter function should return a value equal to RSIActionABORT");
Assert.That(axis.AmpFaultTriggerStateGet(), Is.EqualTo(false), "The getter function should return a value equal to false");
Assert.That(axis.AmpFaultDurationGet(), Is.EqualTo(AMP_FAULT_DURATION_TIME), "The getter function should return a value equal to AMP_FAULT_DURATION_TIME");
RapidSetup:
Go to axis screen->Limits & Actions. In the image below, AmpFaultTriggerStateSet sets the trigger state shown in the Amp Fault box. It currently triggers on a HIGH because the "High" checkbox is checked.
Limits_Actions.jpg
See also
AmpFaultTriggerStateGet