Class DSupComp
Version 1.0
Modified 26-MAY-2023 14:29:28.00
Kod 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
Klass Attribute
Typ Pointer to Boolean
Flags PRIVATE | POINTER | STATE | INVISIBLE | RTHIDE
Kropp RtBody
 Not used.

Control Attribute
Klass Attribute
Typ Boolean
Flags STATE | NOEDIT
Kropp RtBody
 Shows whether the supervision is enabled or disabled.

Action Attribute
Klass Attribute
Typ Boolean
Flags STATE | NOEDIT | REDUTRANSFER
Kropp 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
Klass Attribute
Typ Boolean
Flags STATE | NOEDIT | REDUTRANSFER
Kropp 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
Klass Attribute
Typ Boolean
Flags STATE | NOEDIT | REDUTRANSFER
Kropp 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
Klass Attribute
Typ String80
Flags
Kropp RtBody
 Optional text to describe the object. It is used in the
 picture Alarm Limits which is activated from the
 operator window.

DetectOn Attribute
Klass Attribute
Typ Boolean
Flags REDUTRANSFER
Kropp 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
Klass Attribute
Typ String80
Flags
Kropp RtBody
 Alarm message. Optional text which will be written out
 at alarm state if DetectOn is TRUE.

ReturnText Attribute
Klass Attribute
Typ String80
Flags
Kropp RtBody
 Return message. Text which will be written in the event
 list at return to normal state.

EventType Attribute
Klass Attribute
Typ EventTypeEnum
Flags
Kropp 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
Klass Attribute
Typ EventPrioEnum
Flags
Kropp 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
Klass Attribute
Typ EventFlagsMask
Flags
Kropp 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
Klass Attribute
Typ AttrRef
Flags
Kropp 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
Klass Attribute
Typ Text256
Flags
Kropp 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
Klass Attribute
Typ String40
Flags
Kropp 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
Klass Attribute
Typ AttrRef
Flags
Kropp 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
Klass Attribute
Typ UInt32
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp 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
Klass Attribute
Typ Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp RtBody
 Used internal at the event detection.

DetectCheck Attribute
Klass Attribute
Typ Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp 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
Klass Attribute
Typ Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp 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
Klass Attribute
Typ Time
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp RtBody
 Date and time when alarm state was detected.

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

ReturnSend Attribute
Klass Attribute
Typ Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp 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
Klass Attribute
Typ Time
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp RtBody
 Date and time when the last return to normal was
 detected.

AckTime Attribute
Klass Attribute
Typ Time
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp RtBody
 Date and time when the last acknowledgement of normal
 state was detected.

AckOutunit Attribute
Klass Attribute
Typ Objid
Flags STATE | INVISIBLE
Kropp RtBody
 Identity of the out unit (operator) which made an
 acknowledgement.

ActualValue Attribute
Klass Attribute
Typ Boolean
Flags STATE | INVISIBLE
Kropp RtBody
 Value of supervised parameter at TimeOfDetect.

CtrlPosition Attribute
Klass Attribute
Typ Boolean
Flags
Kropp 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
Klass Attribute
Typ Boolean
Flags STATE | NOEDIT
Kropp RtBody
 Used by the SuppressSup object to suppress the alarm.

TimerFlag Attribute
Klass Attribute
Typ Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp RtBody
 Indicates an active timer.

TimerNext Attribute
Klass Attribute
Typ Pointer to Boolean
Flags POINTER | STATE | INVISIBLE | PRIVATE
Kropp RtBody
 Points to the next element in the timer queue.

TimerCount Attribute
Klass Attribute
Typ UInt32
Flags STATE | INVISIBLE | REDUTRANSFER
Kropp RtBody
 Number of remaining ticks.

TimerDO Attribute
Klass Attribute
Typ Pointer to Boolean
Flags POINTER | STATE | INVISIBLE | PRIVATE
Kropp 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
Klass Attribute
Typ Float32
Flags REDUTRANSFER
Kropp 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
Klass Attribute
Typ Boolean
Flags STATE | INVISIBLE
Kropp RtBody
 Dummy. If TimerDoDum does not point to a Do or Dv
 object it points to this attribute.

TimerObjDId Attribute
Klass Attribute
Typ Objid
Flags INVISIBLE
Kropp RtBody
 Identity of this object is set at load file creation.
 Used by the run time system.

TimerAcc Attribute
Klass Attribute
Typ Int32
Flags
Kropp RtBody
 The operator's authorities to change TimerTime. Not
 implemented.

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

TimerMin Attribute
Klass Attribute
Typ Float32
Flags
Kropp RtBody
 Specifies a valid interval at changes made by the
 operator on TimerTime.

 TimerMin <= TimerTime <= TimerMax

TimerMax Attribute
Klass Attribute
Typ Float32
Flags
Kropp RtBody

PlcConnect Attribute
Klass Attribute
Typ AttrRef
Flags
Kropp RtBody

LockAttribute Attribute
Klass Attribute
Typ Boolean
Flags
Kropp 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.