Class ASup
Version 1.0
Modified 26-MAY-2023 14:29:27.00
Code rt_plc_macro_sup.h
 Analog Supervisory.

 Supervises an analog quantity in an arbitrary object in
 regard to deviation above or below the alarm limit.
 High specifies if it is values above or below the alarm
 limit that constitutes the alarm position.

 The alarm limit may be provided with hysteresis,
 Hysteres. The alarm message can be delayed by a time
 specified by TimerTime.
 The ASup object reacts in two ways when the quantity is
 in the alarm position:

 1  the 'act' output is unconditionally set to indicate
    alarm state
 2  after a time, defined by TimerTime, a message is
    sent to the out units, for instance operator
    stations. This reaction can be suppressed by means
    of DetectOn.

 A message contains the text string DetectText as well
 as flags ( see EventFlags) to handle supplementary
 activities.

 Different types of activities exist; (see EventType )
   ALARM   The message remains as long as the alarm
           position exists and no acknowledgement is

   INFO    If the message demands an acknowledgement
           this is sent to the info part of the alarm
           window from, where it can be acknowledged
           otherwise only to the event list.
           An acknowledgeable info-message disappears
           from the info part of the alarm window as
           soon as it has been acknowleged without
           waiting for return to normal state. As soon
           as the supervised signal, that gave an info



 The ALARM-messages are given different priorities, (
 see EventPriority ). The texts of A- respectively
 B-alarms are displayed both in the alarm window and the
 alarm list. Acknowledgement can be done from both
 places. In the alarm window the number of
 unacknowledged C- respectively D-alarms is shown, while
 the texts is put into the alarm list, where the
 acknowledgement can be done too.
 Different types of out units exist:

  - OPERATOR: The select list is defined by an attribute
    in a User object.
  - PRINTER   : The select list is defined by an
    attribute in an
    EventPrinter object.

 Note! A message created by an ASup object gets the same
 identity as the supervised object. The attribute
 SelectList in out unit objects, e.g. User objects,
 specifies the hierarchies from which messages are to be
 received.

Hints
 The supervised quantity may belongs to an arbitrary
 object. This means not only signal objects but also
 other objects may supervised; e.g. attributes in a
 user-defined object.
 It is possible to configure both ASup and DSup objects
 in different ways. At configuring in a PLC program the
 PLC job will do the supervision. When the objects are
 configured outside PLC program, then it is done by the
 Configuration Editor and
 the messagehandler (=mh) takes care of the supervision.
 The Supervisory Objects may also be used Outside PLC Programs

See Also



RtBody attributes pwr_sClass_ASup
Float32 In IN Supervised signal. If the input is left unconnected
Attribute tells what to supervise.
Boolean Control con Specifies whether to enable or disable the supervision.
Note that blocking is done when Control is FALSE. The
input signal can be inverted.
FALSE disables the supervision and TRUE or open input
enables the supervision.
Boolean Action act Specifies the status of supervised quantity. FALSE
means normal state and TRUE means alarm state.

The output signal can, for instance, be used to
activate an action sequence at alarm state.
Boolean Acked ack Specifies if the alarm state has been acknowledged or
not. FALSE means that unacknowledged alarm exists. The
output is set TRUE initially when the ASup object is
created in rtdb and when the alarm state has been
acknowledged.
Boolean Blocked blk Specifies whether to enable or disable the blocking. No
messages from the supervision object will be sent away
as long as the object is blocked. The blocking does not
influence on the 'act' output of the object.
FALSE disables the the blocking and TRUE enables the
blocking. When a supervisory object in alarm position
is blocked current messages will be cancelled.
Blocking /deblocking is done by means of the 'Alarm
Blocking Window' in the operator environment.
String80 Description   Optional text to describe the object. It is used in the
picture Alarm Limits which is activated from the
operator window.
Boolean DetectOn   Specifies whether to enable or disable the action,
which, at alarm state implies DetectText to be sent or
not. FALSE means that no message will be sent at alarm
state; TRUE means that DetectText is sent at alarm
state.
String80 DetectText   Alarm message. Optional text, which will be written at
alarm state if DetectOn is TRUE.
String80 ReturnText   Return message. Optional text, which will be written in
the event list at return to normal state.
EventTypeEnum EventType   Specifies the type of the message (=DetectText ) which
will be sent at alarm state.

-- 64 ALARM The message always requires an
acknowledgement and sent to the alarm

-- 32 INFO If the message requires acknowledgement is
it sent to the info part of the alarm
window and the event list, otherwise only
to the event list.
EventPrioEnum EventPriority   Priorities concerning alarm messages.

-- 67 A-alarm; highest priority. (=43Hex)
-- 66 B-alarm (= 42Hex)
-- 65 C-alarm (= 41Hex)
-- 64 D-alarm; lowest priority. (=40Hex)
EventFlagsMask EventFlags   Bit map. A combination of flags can be attached to the
message. The possible values are as follows:

-- Return (1) If this flag exists the return message ReturnText
will be sent to the event lists at the out units,
-- Ack (2) If this flag exists the acknowledgement message
will be sent to the event lists at the out-units,
-- Bell(4) If the single out unit has a beep-function this
will be activated when the message is received.
-- Force (8) The message is sent to every out unit regardless
-- InfoWindow (16) If the message is of the type INFO it will be
placed in the event list. If this flag exists the
message is also placed in the INFO square of the
alarm window where acknowledgement is to be done.
-- Returned (32) The alarm status is set to returned already
when the alarm is emitted.
-- NoObject (64) Not used
-- Email (128) The message will be handled by the email server
and forwarded to the specified receiver.
-- SMS (256) The message will be handled by the SMS server
and forwarded to the specified receiver.
-- UserDetectTime (512) DetectTime is set by the user when the
alarm condition is set.
AttrRef Sound   Reference to a sound object, that defines the sound at the operator
place when the alarm is active. If no sound object is supplied, an
ordinary beep is used. The sound object should be of class Sound
or SoundSequence
Text256 MoreText   Optional text supplying more information about the event.
The more text can for example contain actions to be made when an alarm is detected.
String40 Recipient   Recipient for epost and mms alarms.
The recipient is a user defined in the user database in the
current system group.
Recipient can also be a list of users separated by comma, eg
'dennis, jimmy'. Also symbols defined in the Symbol table in
the PostConfig object can be used. Symbols should be referenced
with a $ sign before the symbol name, eg '$on_duty'.

The users should be defined in the current system group or in a
subgroup to this, If a subgroup is used, the subgroup should
be specified in the recipient name, eg 'sms.dennis'.
AttrRef Attribute   Specifies the complete name of supervised parameter.
Attribute is filled in by the user if the input named
IN is left open. If the input is connected the names
are filled in by the PROVIEW/R system at compilation.
UInt32 AlarmStatus   Status value. Bit map containing 16 bits, where the 8
least significant bits denote the state and the 8 most
significant bits the priority.

The state is a combination of:
-- 0 Normal state
-- 1 Alarm state
-- 2 Unacknowledged alarm

The priority is one of the priorities specified by
EventPriority.
The following kinds of status can exist:
EventPriority + 1 => Priority + alarm state
EventPriority + 3 => Priority + unacknowledged alarm and alarm state
EventPriority + 2 => Priority + unacknowledged alarm and normal state
Boolean AlarmCheck   Used internal at the event detection.
Boolean DetectCheck   Specifies if an alarm state will be detected or not.
FALSE means that an alarm state will not be detected;
TRUE means that an alarm state will be detected.
Boolean DetectSend   Specifies if the message has been sent to the out units
(or more precisely the message handler) or not. TRUE
means that the message has been sent.
Time DetectTime   Date and time when the last alarm state was detected.
Boolean ReturnCheck   Specifies if the object has returned to normal state or
not. TRUE means that the object has returned to normal
state.
Boolean ReturnSend   Specifies if the return message, ReturnText, has been
sent to the out units or not. TRUE means that the
return message has been sent.
Time ReturnTime   Date and time when the last return to normal was
detected.
Time AckTime   Date and time when the last acknowledgement was
detected.
Objid AckOutunit   Identity of the out unit (operator), from where the
acknowledgement was done.
Float32 ActualValue   Value of supervised parameter at TimeOfDetect.
Float32 CtrlLimit   Supervisory limit.
Float32 Hysteres   Hysteresis. Specifies an absolute value, by which the
supervised parameter at least has to deviate from
CtrlLimit, before return.
Boolean High   Specifies if an alarm position exists when the quantity
is below or above the CtrlLimit.

FALSE: Below, i.e. the supervised quantity < CtrlLimit
means alarm position.
TRUE: Above, i.e. the supervised quantity > CtrlLimit
means alarm position.
String16 Unit   Unit of the supervised quantity.
Boolean Suppressed   Used by the SuppressSup object to suppress the alarm.
Boolean TimerFlag   Indicates an active timer.
Pointer to Boolean TimerNext   Points to the next element in the timer queue.
UInt32 TimerCount   Number of remaining ticks.
Pointer to Boolean TimerDO   Points to a Do or Dv object or, if these are not used,
to TimerDoDum. After a time of, TimerTime the signal
specified by TimerDo is cleared.
Float32 TimerTime   Delay in seconds. Specifies when, since an alarm state
has occurred, DetectText will be sent. If the alarm
state disappears before the time has elapsed no message
is generated.

TimerTime >= the executing period of the PLC program.
Boolean TimerDODum   Dummy. If TimerDoDum does not point to a Do or Dv
object it points to this attribute.
Objid TimerObjDId   Identity of this object is set at load file creation.
Used by the run time system.
Int32 TimerAcc   The operator's authorities regarding to TimerTime. Not
implemented.

0 -- Changes not allowed.
!=0 -- Changes allowed.
Float32 TimerMin   Specifies a valid interval at changes of TimerTime made
by the operator.
Float32 TimerMax   Specifies a valid interval at changes of TimerTime made
by the operator.

DevBody attributes 
Boolean ShowDetectText   Specifies if DetectText is to be displayed in the
symbol of the ASup object or not. FALSE means no
displaying and TRUE displaying.
Boolean LockAttribute   'Attribute' is assigned a value that should not be changed.
Normally the 'Attribute' value is fetched from the object connected
to the In input pin. If LockAttribute is set, and Attribute is
assigned a value, this value will not be changed by the compiler.
PlcNode PlcNode  


GraphPlcNode
object_type 100
parameters[0] 2
parameters[1] 0
parameters[2] 3
parameters[3] 0
subwindows 0
graphmethod 9
graphindex 0
default_mask[0] 1
default_mask[1] 0
segname_annotation 1
rtbody_annotation 1
compmethod 25
compindex 0
executeordermethod 2
tracemethod 3
traceindex 1
objname ASup
graphname ASup
debugpar Action


Template Object
Control 1
EventType 64
EventPriority 67
EventFlags 7
DetectOn 1
High 1


Attributes detail


In Input
Class Input
Type Float32
Flags STATE | RTVIRTUAL | NOEDIT
GraphName IN
Body RtBody
 Supervised signal. If the input is left unconnected
 Attribute tells what to supervise.

Control Input
Class Input
Type Boolean
Flags STATE | RTVIRTUAL | NOEDIT
GraphName con
Body RtBody
 Specifies whether to enable or disable the supervision.
 Note that blocking is done when Control is FALSE. The
 input signal can be inverted.
 FALSE disables the supervision and TRUE or open input
 enables the supervision.

Action Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName act
Body RtBody
 Specifies the status of supervised quantity. FALSE
 means normal state and TRUE means alarm state.

 The output signal can, for instance, be used to
 activate an action sequence at alarm state.

Acked Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName ack
Body RtBody
 Specifies if the alarm state has been acknowledged or
 not. FALSE means that unacknowledged alarm exists. The
 output is set TRUE initially when the ASup object is
 created in rtdb and when the alarm state has been
 acknowledged.

Blocked Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName blk
Body RtBody
 Specifies whether to enable or disable the blocking. No
 messages from the supervision object will be sent away
 as long as the object is blocked. The blocking does not
 influence on the 'act' output of the object.
 FALSE disables the the blocking and TRUE enables the
 blocking. When a supervisory object in alarm position
 is blocked current messages will be cancelled.
 Blocking /deblocking is done by means of the 'Alarm
 Blocking Window' in the operator environment.

Description Attribute
Class Attribute
Type String80
Flags
Body RtBody
 Optional text to describe the object. It is used in the
 picture Alarm Limits which is activated from the
 operator window.

DetectOn Attribute
Class Attribute
Type Boolean
Flags
Body RtBody
 Specifies whether to enable or disable the action,
 which, at alarm state implies DetectText to be sent or
 not. FALSE means that no message will be sent at alarm
 state; TRUE means that DetectText is sent at alarm
 state.

DetectText Intern
Class Intern
Type String80
Flags REDUTRANSFER
Body RtBody
 Alarm message. Optional text, which will be written at
 alarm state if DetectOn is TRUE.

ReturnText Attribute
Class Attribute
Type String80
Flags REDUTRANSFER
Body RtBody
 Return message. Optional text, which will be written in
 the event list at return to normal state.

EventType Attribute
Class Attribute
Type EventTypeEnum
Flags
Body RtBody
 Specifies the type of the message (=DetectText ) which
 will be sent at alarm state.

  -- 64 ALARM The message always requires an
              acknowledgement and sent to the alarm

  -- 32  INFO If the message requires acknowledgement is
              it sent to the info part of the alarm
              window and the event list, otherwise only
              to the event list.

EventPriority Attribute
Class Attribute
Type EventPrioEnum
Flags
Body RtBody
 Priorities concerning alarm messages.

  -- 67  A-alarm; highest priority. (=43Hex)
  -- 66  B-alarm   (= 42Hex)
  -- 65  C-alarm   (= 41Hex)
  -- 64  D-alarm; lowest priority. (=40Hex)

EventFlags Attribute
Class Attribute
Type EventFlagsMask
Flags
Body RtBody
 Bit map. A combination of flags can be attached to the
 message. The possible values are as follows:

 -- Return (1)  If this flag exists the return message ReturnText
                will be sent to the event lists at the out units,
 -- Ack (2)     If this flag exists the acknowledgement message
                will be sent to the event lists at the out-units,
 -- Bell(4)     If the single out unit has a beep-function this
                will be activated when the message is received.
 -- Force (8)   The message is sent to every out unit regardless
 -- InfoWindow (16)  If the message is of the type INFO it will be
                placed in the event list. If this flag exists the
                message is also placed in the INFO square of the
                alarm window where acknowledgement is to be done.
 -- Returned (32) The alarm status is set to returned already
                when the alarm is emitted.
 -- NoObject (64) Not used
 -- Email (128) The message will be handled by the email server
                and forwarded to the specified receiver.
 -- SMS (256)   The message will be handled by the SMS server
                and forwarded to the specified receiver.
 -- UserDetectTime (512) DetectTime is set by the user when the
                alarm condition is set.

Sound Attribute
Class Attribute
Type AttrRef
Flags
Body RtBody
 Reference to a sound object, that defines the sound at the operator
 place when the alarm is active. If no sound object is supplied, an
 ordinary beep is used. The sound object should be of class Sound
 or SoundSequence

MoreText Attribute
Class Attribute
Type Text256
Flags
Body RtBody
 Optional text supplying more information about the event.
 The more text can for example contain actions to be made when an alarm is detected.

Recipient Attribute
Class Attribute
Type String40
Flags
Body RtBody
 Recipient for epost and mms alarms.
 The recipient is a user defined in the user database in the
 current system group.
 Recipient can also be a list of users separated by comma, eg
 'dennis, jimmy'. Also symbols defined in the Symbol table in
 the PostConfig object can be used. Symbols should be referenced
 with a $ sign before the symbol name, eg '$on_duty'.

 The users should be defined in the current system group or in a
 subgroup to this, If a subgroup is used, the subgroup should
 be specified in the recipient name, eg 'sms.dennis'.

Attribute Attribute
Class Attribute
Type AttrRef
Flags
Body RtBody
 Specifies the complete name of supervised parameter.
 Attribute is filled in by the user if the input named
 IN is left open. If the input is connected the names
 are filled in by the PROVIEW/R system at compilation.

AlarmStatus Attribute
Class Attribute
Type UInt32
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Status value. Bit map containing 16 bits, where the 8
 least significant bits denote the state and the 8 most
 significant bits the priority.

 The state is a combination of:
    -- 0  Normal state
    -- 1  Alarm state
    -- 2  Unacknowledged alarm

 The priority is one of the priorities specified by
 EventPriority.
 The following kinds of status can exist:
    EventPriority + 1 => Priority + alarm state
    EventPriority + 3 => Priority + unacknowledged alarm and alarm state
    EventPriority + 2 => Priority + unacknowledged alarm and normal state

AlarmCheck Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Used internal at the event detection.

DetectCheck Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Specifies if an alarm state will be detected or not.
 FALSE means that an alarm state will not be detected;
 TRUE means that an alarm state will be detected.

DetectSend Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Specifies if the message has been sent to the out units
 (or more precisely the message handler) or not. TRUE
 means that the message has been sent.

DetectTime Attribute
Class Attribute
Type Time
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Date and time when the last alarm state was detected.

ReturnCheck Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Specifies if the object has returned to normal state or
 not. TRUE means that the object has returned to normal
 state.

ReturnSend Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Specifies if the return message, ReturnText, has been
 sent to the out units or not. TRUE means that the
 return message has been sent.

ReturnTime Attribute
Class Attribute
Type Time
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Date and time when the last return to normal was
 detected.

AckTime Attribute
Class Attribute
Type Time
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Date and time when the last acknowledgement was
 detected.

AckOutunit Attribute
Class Attribute
Type Objid
Flags STATE | INVISIBLE
Body RtBody
 Identity of the out unit (operator), from where the
 acknowledgement was done.

ActualValue Attribute
Class Attribute
Type Float32
Flags STATE | INVISIBLE
Body RtBody
 Value of supervised parameter at TimeOfDetect.

CtrlLimit Attribute
Class Attribute
Type Float32
Flags REDUTRANSFER
Body RtBody
 Supervisory limit.

Hysteres Attribute
Class Attribute
Type Float32
Flags REDUTRANSFER
Body RtBody
 Hysteresis. Specifies an absolute value, by which the
 supervised parameter at least has to deviate from
 CtrlLimit, before return.

High Attribute
Class Attribute
Type Boolean
Flags REDUTRANSFER
Body RtBody
 Specifies if an alarm position exists when the quantity
 is below or above the CtrlLimit.

 FALSE: Below, i.e. the supervised quantity < CtrlLimit
 means alarm position.
 TRUE:   Above, i.e. the supervised quantity > CtrlLimit
 means alarm position.

Unit Attribute
Class Attribute
Type String16
Flags
Body RtBody
 Unit of the supervised quantity.

Suppressed Attribute
Class Attribute
Type Boolean
Flags STATE | NOEDIT
Body RtBody
 Used by the SuppressSup object to suppress the alarm.

TimerFlag Intern
Class Intern
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Indicates an active timer.

TimerNext Intern
Class Intern
Type Pointer to Boolean
Flags POINTER | STATE | INVISIBLE | PRIVATE
Body RtBody
 Points to the next element in the timer queue.

TimerCount Intern
Class Intern
Type UInt32
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Number of remaining ticks.

TimerDO Intern
Class Intern
Type Pointer to Boolean
Flags POINTER | STATE | INVISIBLE | PRIVATE
Body RtBody
 Points to a Do or Dv object or, if these are not used,
 to TimerDoDum. After a time of, TimerTime the signal
 specified by TimerDo is cleared.

TimerTime Intern
Class Intern
Type Float32
Flags REDUTRANSFER
Body RtBody
 Delay in seconds. Specifies when, since an alarm state
 has occurred, DetectText will be sent. If the alarm
 state disappears before the time has elapsed no message
 is generated.

 TimerTime >= the executing period of the PLC program.

TimerDODum Intern
Class Intern
Type Boolean
Flags STATE | INVISIBLE
Body RtBody
 Dummy. If TimerDoDum does not point to a Do or Dv
 object it points to this attribute.

TimerObjDId Intern
Class Intern
Type Objid
Flags INVISIBLE
Body RtBody
 Identity of this object is set at load file creation.
 Used by the run time system.

TimerAcc Intern
Class Intern
Type Int32
Flags
Body RtBody
 The operator's authorities regarding to TimerTime. Not
 implemented.

  0   -- Changes not allowed.
  !=0 -- Changes allowed.

TimerMin Intern
Class Intern
Type Float32
Flags
Body RtBody
 Specifies a valid interval at changes of TimerTime made
 by the operator.

TimerMax Intern
Class Intern
Type Float32
Flags
Body RtBody
 Specifies a valid interval at changes of TimerTime made
 by the operator.

ShowDetectText Intern
Class Intern
Type Boolean
Flags
Body DevBody
 Specifies if DetectText is to be displayed in the
 symbol of the ASup object or not. FALSE means no
 displaying and TRUE displaying.

LockAttribute Intern
Class Intern
Type Boolean
Flags
Body DevBody
 'Attribute' is assigned a value that should not be changed.
 Normally the 'Attribute' value is fetched from the object connected
 to the In input pin. If LockAttribute is set, and Attribute is
 assigned a value, this value will not be changed by the compiler.

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody