Creating a Visualization with an Alarm Banner
In the following instructions, the Alarm Banner visualization element is configured as an example.
For more information, see the following: Defining an Alarm Group and Alarms
In online mode, the alarm banner displays an active alarm. If multiple alarms are active, then the filtering is based on the filter criterion set in the banner. The most recent alarm is displayed under the filter criterion "Newest" and the most urgent alarm under the filter criterion "Priority".
Tip
You can also add scroll elements to switch the display when multiple alarms are active.
For more information, see the following: Adding elements for scrolling the active alarms
Configuring an alarm banner
Requirement: The AG_PartsShortage
alarm group and the AC_PartsShortage
alarm class are defined in your project.
Add a visualization below your application:
Select the application and click the Add Object → Visualization command.
Specify the name as
VIS_PartsShortageBanner
.
Open the
VIS_PartsShortageBanner
visualization.In the Visualization Toolbox view, drag the Alarm Banner element from the Alarm Manager category into the visualization editor and open the properties view of the element.
Configure the alarm banner as follows.
In the Element name property, in the Value column, specify the name
AB_PartsShortage
.Configuration of the
Alarm groups
visualization element property:In the Alarm configuration → Alarm groups property, click in the corresponding value cell.
The Selected Alarm Group dialog opens.
Clear the All option and select the
AG_PartsShortage
alarm group.Click the
button to add the group to the Selected Alarm Group list.
Click OK to confirm the configuration.
Configuration of the Alarm classes visualization element property:
In the Alarm configuration → Alarm classes property, define the alarm classes which you want to visualize. Click into the value field.
In the Alarm configuration → Alarm classes property, click in the corresponding value cell.
The Select Alarm Class dialog opens.
Clear the All option and select the
AC_PartsShortage
alarm class.Click the
button to add the alarm class to the selected alarm classes.
Click OK to confirm the configuration.
In the General table configuration → Filter criterion property, set the value to Newest.
In online mode, the banner displays the most recent alarm message.
Configuration of a column:
In the Columns property, click the Create New button.
Column [2] is available. The new column with the name
Bitmap
is listed in the visualization editor.In the Type of data property, select the State value for column [2].
In the table, the column is given the new default heading
State
.
Configuration of the Control variables visualization element property:
In your application code, declare the
bQuitAlarmBanner
control variable.In the Acknowledge property, specify the
PLC_PRG.bQuitAlarmBanner
variable in the value cell.
The user of the alarm visualization needs controls to operate the alarm visualization. When programming the visualization, you can get support from the Alarm Banner Wizard. The command which calls the wizard is available only when you have selected an alarm banner in the visualization.
In the visualization editor, select the alarm banner element
AB_PartsShortage
.In the context menu, click the Insert Elements for Scrolling Alarms command.
The Alarm Banner Wizard dialog opens.
Click OK to accept all settings.
The
<
and>
buttons have been added. The elements have a complete input configuration.
Adding elements for scrolling the active alarms
You can add elements to an alarm banner which let you to switch the display between the individual active alarms. You can use local visualization variables or application variables to control the scrolling.
Select the added "Alarm Banner" visualization element. Select the Add elements for controlling alarms command in the context menu.
The Alarm Banner Wizard dialog opens.
Select the element type for the scroll elements: Button or Rectangle.
Activate the action(s) for which a control should be added: Scroll to next alarm, Scroll to previous alarm.
Specify a Boolean variable. It gets the value
TRUE
when multiple alarms are active.If you have already configured an IEC variable in the element properties, then it is also specified here in the wizard. Otherwise the visu-local variable xMultipleAlarmsActive is automatically created.
In the next step, check the configuration of the element properties of the extended alarm banner.
Select the alarm banner element and look at the section Handling of multiple active alarms in the Properties view.
You have two options:
The display should switch automatically. Enable the Automatic switch property.
The display should change automatically. Activate the Switch automatically property:
Now, in the Every N seconds property, you define the time interval after which the display in the alarm banner in online mode should switch to the next alarm.
The display should be controlled by means of the application. Disable the Automatic switch property.
The display should be controlled via the application. Deactivate the property Switch automatically.property.
Switching between the active alarms can be controlled by two variables. By default, the
xNext
andxPrev
variables are declared for scrolling to the next or previous alarm. You can replace these variables with custom your own defined application variables.