• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - Automation
  • AlarmOperator
  • 4.11.14

AlarmOperator Class

(Automation::AlarmOperator)

The AlarmOperator triggers an alarm based on default input value More...

Header: #include <AlarmOperator.h>
Inherits: CDPOperator<T>
  • List of all members, including inherited members

Public Functions

AlarmOperator(const CDPPropertyBase &in)
virtual ~AlarmOperator()

Reimplemented Public Functions

virtual void Create(const char *shortName, CDPBaseObject *pParent) override
virtual void CreateModel() override
virtual void Destroy() override
virtual void FillNodeChildren(CDP::StudioAPI::NodeStream &serializer) const override
virtual const CDPPropertyBase &GetOutput() override
virtual unsigned int Process() override
virtual unsigned int Status() const override
  • 18 public functions inherited from CDPOperator
  • 17 public functions inherited from CDPOperatorBase
  • 42 public functions inherited from CDPBaseObject
  • 26 public functions inherited from CDP::StudioAPI::CDPNode
  • 22 public functions inherited from CDP::StudioAPI::ICDPNode

Reimplemented Protected Functions

virtual std::string GetProperty(std::string propertyName) override
virtual int ReceiveMessage(void *message) override
  • 1 protected function inherited from CDP::StudioAPI::CDPNode

Additional Inherited Members

  • 1 public variable inherited from CDPOperatorBase
  • 1 static public member inherited from CDPBaseObject
  • 1 protected function inherited from CDP::StudioAPI::CDPNode
  • 8 protected variables inherited from CDPOperator
  • 5 protected variables inherited from CDPOperatorBase
  • 10 protected variables inherited from CDPBaseObject

Detailed Description

The AlarmOperator triggers an alarm based on default input value

An AlarmOperator has no effect on the value. It sets output equal to input.

The AlarmOperator implements an alarm based on best practices from EEMUA Publication 191.

Properties

PropertyDescription
AckAcknowledges the alarm. When toggled from 0 to 1, RepeatCount is reset to 0, STATUS_SET and STATUS_REPEATBLOCKED flags are cleared and ALARMACK event is triggered.
DescriptionThe description of the AlarmOperator.
OperatorBlockedDisables or enables the alarm. When toggled from 0 to 1, Status is updated and the alarm is cleared and acked. This property is controlled by the user.
ProcessBlockedDisables or enables the alarm. When toggled from 0 to 1, Status is updated and the alarm is cleared. This property is controlled by the application.
RepeatCountThe number of times the alarm has been repeated since last start or ack.
RepeatCountLimitThe limit of the number of times the alarm can be repeated since last start or ack. If RepeatCount is greater or equal to RepeatCountLimit, RepeatBlocked is set; otherwise RepeatBlocked is cleared. Setting RepeatCountLimit equal to 0 disables repeat counting.
RepeatBlockedDisables or enables repeating of the alarm and sets or clears STATUS_REPEATBLOCKED flag.
RepeatDecrementTimeThe decrement time of RepeatCount in seconds . If RepeatDecrementTime is greater than 0, RepeatCount is decremented after every RepeatDecrementTime.
InputMaskThe mask that is AND'ed with the input before checking Limit.

Note: It has no effect on float or double input.

LimitHolds the threshold that is compared to the input signal to generate alarm. See LimitType and DelayOn for more information.
LimitTypeThe type of the limit. In case of Above the alarm is set when the input is greater or equal to Limit. In case of Below the alarm is set when the input is less than Limit.
DelayOnThe delay before setting the alarm in seconds. If LimitType is Above then the input has to remain greater or equal than Limit for the whole DelayOn period for the alarm to be set. If LimitType is Below then it has to remain less than Limit.
DelayOffThe delay before clearing the alarm in seconds. If LimitType is Above then the input has to remain less than Limit - Deadband for the whole delay for the alarm to be set. If LimitType is Below then it has to remain greater or equal to Limit + Deadband.
DeadbandThe deadband of the input which specifies when the alarm is cleared.
HandleThe handle of the AlarmOperator.
LastSetTimeThe last set time of the alarm.
ResetTimesActivatedHolds when changed from 0 to 1, TimesActivated is reset to 0.
TimesActivatedThe number of times the alarm has been activated.
StatusThe status of the alarm.
LevelHolds the alarm level. It can be Notify, Warning, Error or Emergency and it dictates the seriousness of the alarm.
SetIndicates that the alarm is set.
TextThe text of the alarm.
GroupThe group that this alarm belongs to. Alarm groups can be used to selectively visualize them.

Arguments

NameDescription
InThe default input value.
OutThe default output value.

When operator is used inside a signal its default input is automatically tied to signal's InternalValue or previous operator's output. Its default output is automatically tied to next operator's input or to signal's Value. See also CDP Operator Usage In CDP Signals.

The workings of the AlarmOperator is illustrated on the following chart:

"How the AlarmOperator works"

Actual Processing Code of the AlarmOperator

unsigned int AlarmOperator<T>::Process()
{
  d->If_Acked_AckAlarmAndClearRepeatBlockedAndRepeatCount();
  d->If_ResetTimesActivatedChangedTrue_ResetTimesActivated();

  d->SetOrClearOperatorBlockedStatus();
  d->SetOrClearProcessBlockedStatus();

  d->If_OperatorBlocked_UnackClearAndBlock();
  d->If_ProcessBlocked_ClearAndBlock();

  if(!d->IsBlocked())
  {
    d->DecrementRepeatCount();
    d->CheckHighLevelAndSetOrClearAlarm();
    d->CheckLowLevelAndSetOrClearAlarm();
  }
  d->If_StatusChanged_SendEventsAck_ClearOrSet();

  m_output = m_input;

  if (d->status!=d->lastStatus)
    if (auto parent = GetParent())
      parent->RunInComponentThread([=](){ parent->UpdateStatus(GetNodeID(), d->status); });

  d->StoreLastValues();

  return Status();
}

See also Argument.

Member Function Documentation

AlarmOperator::AlarmOperator(const CDPPropertyBase &in)

Constructs an AlarmOperator with input in.

[virtual] AlarmOperator::~AlarmOperator()

Destructs the AlarmOperator

[override virtual] void AlarmOperator::Create(const char *shortName, CDPBaseObject *pParent)

Reimplemented from CDPBaseObject::Create().

[override virtual] void AlarmOperator::CreateModel()

Reimplemented from CDPBaseObject::CreateModel().

[override virtual] void AlarmOperator::Destroy()

[override virtual] void AlarmOperator::FillNodeChildren(CDP::StudioAPI::NodeStream &serializer) const

Reimplemented from CDPNode::FillNodeChildren().

[override virtual] const CDPPropertyBase &AlarmOperator::GetOutput()

Reimplemented from CDPOperatorBase::GetOutput().

Returns the input.

[override virtual protected] std::string AlarmOperator::GetProperty(std::string propertyName)

Reimplemented from CDPBaseObject::GetProperty().

[override virtual] unsigned int AlarmOperator::Process()

Reimplemented from CDPOperatorBase::Process().

[override virtual protected] int AlarmOperator::ReceiveMessage(void *message)

Reimplemented from CDPBaseObject::ReceiveMessage().

[override virtual] unsigned int AlarmOperator::Status() const

Reimplemented from CDPBaseObject::Status().

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top