Class DSupComp
Version 1.0
Modified 26-MAY-2023 14:29:28.00
Code rt_plc_macro_sup.h
 Digital Supervisory.

 Supervises a binary quantity in an arbitrary object in
 regard to alarm position. CtrlPosition specifies if
 true or false constitutes the alarm position. The alarm
 message can be delayed by a time specified by TimerTime.

 The DSup 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 the 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 acknowledged without
         waiting for return to normal state. As soon
         as the supervised signal that gave an info
         message, reaches the same position again and
         this has been detected a new message is generated.


 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- resp. D-alarms is shown, while the
 text 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 DSup 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
 Supervision of a trailing edge can be done when the In-signal
 has been inverted.

 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 eventmonitor takes care of the
 supervision.

See Also



RtBody attributes pwr_sClass_DSupComp
Pointer to Boolean ControlP   Not used.
Boolean Control   Shows whether the supervision is enabled or disabled.
Boolean Action   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   Specifies if the alarm state has been acknowledged or
not. FALSE means that unacknowledged alarm exists. The
output is set TRUE after booting and when the alarm
state has been acknowledged.
Boolean Blocked   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 out
at alarm state if DetectOn is TRUE.
String80 ReturnText   Return message. 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.
ALARM -- 64 The message always requires an
acknowledgement and sent to the alarm

INFO -- 32 If the message requires acknowledgement is
it sent to the info part of the alarm
window and the event list, otherwise only
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 flag combination may be attached to the
message:

1 = If this flag exists the return message
ReturnText will be sent to the event lists of

2 = If this flag exists the acknowledgement message
will be sent to the event lists of the out

4 = If the out unit has a peep-function this will
be activated when the message is received.

8 = The message is sent to every out unit

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
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   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 EventPriority.

The following status can exist:
EventPriority + 1 => Priority + alarm state
EventPriority + 3 => Priority + unacknowledged alarm
and alarm 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 already 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 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 of normal
state was detected.
Objid AckOutunit   Identity of the out unit (operator) which made an
acknowledgement.
Boolean ActualValue   Value of supervised parameter at TimeOfDetect.
Boolean CtrlPosition   Specifies if alarm position is TRUE or FALSE.
FALSE = When the In-signal makes the transition
1 --> 0 => alarm state
We prefer to avoid this case by inversion of the input signal
TRUE = When the In-signal makes the transition
0 --> 1 => alarm state. This is the normal case.
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, the message 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 to change TimerTime. Not
implemented.

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

TimerMin <= TimerTime <= TimerMax
Float32 TimerMax  
AttrRef PlcConnect  
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.


Template Object
EventType 64
EventPriority 67
EventFlags 7
DetectOn 1
CtrlPosition 1


Attributes detail


ControlP Attribute
Class Attribute
Type Pointer to Boolean
Flags PRIVATE | POINTER | STATE | INVISIBLE | RTHIDE
Body RtBody
 Not used.

Control Attribute
Class Attribute
Type Boolean
Flags STATE | NOEDIT
Body RtBody
 Shows whether the supervision is enabled or disabled.

Action Attribute
Class Attribute
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
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 Attribute
Class Attribute
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
Body RtBody
 Specifies if the alarm state has been acknowledged or
 not. FALSE means that unacknowledged alarm exists. The
 output is set TRUE after booting and when the alarm
 state has been acknowledged.

Blocked Attribute
Class Attribute
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
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 REDUTRANSFER
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 Attribute
Class Attribute
Type String80
Flags
Body RtBody
 Alarm message. Optional text which will be written out
 at alarm state if DetectOn is TRUE.

ReturnText Attribute
Class Attribute
Type String80
Flags
Body RtBody
 Return message. 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.
 ALARM -- 64 The message always requires an
             acknowledgement and sent to the alarm

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

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 flag combination may be attached to the
 message:

 1  =   If this flag exists the return message
        ReturnText will be sent to the event lists of

 2  =   If this flag exists the acknowledgement message
        will be sent to the event lists of the out

 4  =   If the out unit has a peep-function this will
        be activated when the message is received.

 8  =   The message is sent to every out unit

 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

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
 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 EventPriority.

 The following status can exist:
    EventPriority + 1 => Priority + alarm state
    EventPriority + 3 => Priority + unacknowledged alarm
 and alarm 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 already 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 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 of normal
 state was detected.

AckOutunit Attribute
Class Attribute
Type Objid
Flags STATE | INVISIBLE
Body RtBody
 Identity of the out unit (operator) which made an
 acknowledgement.

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

CtrlPosition Attribute
Class Attribute
Type Boolean
Flags
Body RtBody
 Specifies if alarm position is TRUE or FALSE.
 FALSE = When the In-signal makes the transition
 1 --> 0 => alarm state
 We prefer to avoid this case by inversion of the input signal
 TRUE  = When the In-signal makes the transition
 0 --> 1 => alarm state. This is the normal case.

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

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

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

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

TimerDO Attribute
Class Attribute
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 Attribute
Class Attribute
Type Float32
Flags REDUTRANSFER
Body RtBody
 Delay in seconds. Specifies when, since an alarm state
 has occurred, the message 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 Attribute
Class Attribute
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 Attribute
Class Attribute
Type Objid
Flags INVISIBLE
Body RtBody
 Identity of this object is set at load file creation.
 Used by the run time system.

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

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

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

 TimerMin <= TimerTime <= TimerMax

TimerMax Attribute
Class Attribute
Type Float32
Flags
Body RtBody

PlcConnect Attribute
Class Attribute
Type AttrRef
Flags
Body RtBody

LockAttribute Attribute
Class Attribute
Type Boolean
Flags
Body RtBody
 '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.