Setting up alarms

Create and configure a set of objects required to display and record alarms.
Create and configure a set of objects required to display and record alarms:
  • an object that reads a controller variable related to a digital alarm
  • a widget to display and manage alarms in real time at runtime
  • a logger and a database to record alarms
  • a widget to display the history of events related to alarms
Because there is no connection to a controller, simulate the alarm activation via a switch or a button.
To remember:
  • FactoryTalk Optix Studio includes many templates to add and configure various features, such as the widgets used in this module.
  • Before configuring an object or a set of objects from zero, verify whether a suitable object is available in the template library
  • The library is periodically updated on the occasion of new software releases.
Step #1: Configure the digital Alarm object
Configure the object that monitors the controller Boolean variable for the alarm.
  1. In
    Project
    , right-click the
    Alarms
    folder, then select
    New
    >
    Digital Alarm
    DigitalAlarm1
    appears in
    Alarms
    .
  2. In the
    DigitalAlarm1
    properties, select next to the
    Input value
    property and set a dynamic link with the
    Motor1Alarm
    alarm variable imported from the controller.
  3. In the
    Message
    property, set the message to display at runtime on alarm activation, for example “Alarm on motor1”.
The
Value status normal
property is set to
0
by default. This activates the alarm when the
Motor1Alarm
variable value becomes
1
. The other properties are set by default according to the typical use of digital alarms.
Step #2: Configure the widget to display the alarms in real time
Add and configure the widget in
Page2 (type)
.
  1. Select in the main toolbar: the template library opens.
  2. In
    Widgets
    , drag the
    Alarm grid
    widget into
    Page2 (type)
    . The
    AlarmGrid1
    object appears in
    Page2 (type)
    .
  3. Close the template library.
  4. In
    Project
    , double-click
    Page2 (type)
    to display the panel in the editor.
  5. Select
    AlarmGrid1
    and set its
    Horizontal alignment
    property to
    Stretch.
    to adjust the width of the container.
Step #3: Configure logger and database to store the alarms
From the template library, add and configure an alarm logger and configure a database to store the data recorded by the logger:
  1. Select in the main toolbar. The template library opens.
  2. In
    Misc
    , drag the
    Alarms Event Logger
    object into the
    Loggers
    folder. The
    AlarmsEventLogger1
    object appears in
    Loggers
    . This widget records all alarms at runtime.
  3. Close the template library.
  4. To create a database, in
    Project
    , right-click
    DataStores
    and select
    New
    >
    Embedded Database
    .
    EmbeddedDatabase1
    appears.
  5. Rename
    EmbeddedDatabase1
    to
    AlarmDB
    .
  6. To set the database in which to store the alarms recorded by the logger, click
    AlarmsEventLogger1
    , and in its
    Database
    property set a dynamic link with
    AlarmDB
    .
Step #4: Configure the widget to display the alarms history
Add and configure the widget in
Page3 (type)
.
  1. Select  in the main toolbar. The template library opens.
  2. In
    Widgets
    , drag the
    Alarm history grid
    widget into
    Page3 (type)
    . The
    FilteredAlarmHistoryGrid1
    object appears in
    Page3 (type)
    .
  3. Close the template library.
  4. In
    Project
    , double-click
    Page3 (type)
    to display the panel in the editor.
  5. Select
    FilteredAlarmHistoryGrid1
    and set the
    Horizontal alignment
    property to
    Stretch
    to adjust the container width.
  6. Drag
    AlarmsEventLogger1
    onto the value of the
    AlarmsEventLogger
    property to display the data recorded by the logger.
Step #5: Configure the switch to simulate alarms
To simulate the activation of an alarm on the controller, configure a
Switch
object to change the status of the
Motor1Alarm
variable.
  1. In
    Project
    , double-click
    Page2 (type)
    .
  2. Right-click
    Page2 (type)
    and select
    New
    >
    Basic controls
    >
    Switch.
    Switch1
    appears in
    Page2 (type)
    and in the objects editor.
  3. Drag the switch to the bottom part of the panel as shown in the example.
  4. In the switch
    Active
    property, set a dynamic link with
    Motor1Alarm
    . The Boolean value of
    Motor1Alarm
    depends on the switch status.
Step #6: Check the operation at runtime
  1. The inserted widgets require space in width to display properly at runtime. Iin
    Project,
    select
    MainWindow (type)
    and set
    Width
    and
    Height
    to 1024 pixels and 560 pixels respectively.
  2. Select
    Emulator
    and wait for the runtime window to appear.
  3. Select
    Page2
    . To simulate the alarm activation on the controller, change the switch status (on): the alarm grid displays the alarm data.
  4. Select the alarm in the list and use acknowledge and confirm the alarm using the buttons.
  5. Change the switch status (off) to simulate the return of the alarm on the controller. The alarm disappears from the list.
  6. Select
    Page3
    to display the history of the alarm events.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.