Mapp View Alarm widget styling

Hello,

In the mapp view AlarmList widget, is it possible to change the alarm items’ color or icon depending on the severity without using the configuration dialogue (explained here B&R Online Help)? This is possible to do in VC4. I would like to predefine the style depending on severity, i.e. if it is an alarm or a warning that is active, so that it’s not an option for the user during runtime. On the styleConfiguration property it is noted in the Help “Can only be adjusted via the configuration dialog box.”.

When adding an AlarmListItem and selecting the columnType to “category”, icons appear in the column in the editor, however I can’t find where these are defined or changed. It’s empty at runtime. Where can these icons be selected based on category?
image

Nothing prevents you from setting the styleConfiguration property manually from Automation Studio. It is however pretty tedious task to do, so a good way to do it is to use the configuration dialog box to generate the string and then copy and paste it to the widgets styleConfiguration property in Automation Studio. (You will need to bind the string generated to some variable, session or OPC UA to copy it).

The category icons can be specified by having image files with the category names in a folder specified by the “imagePrefix” property and the filetype by “imageSuffix” property.
alarmcategory

This for some reason is not visible in the Online Automation help, but can be found in the offline version with the following GUID. (Open AH, CTRL + G)
9b3764e6-c1a9-4638-91a1-d580049938f2

2 Likes

Hi Almida,

don’t know how to set category images but for background you have to design different styles. Names habe to be “style1”, “style2”,…

	<!-- Style for errors (severity: 100...199) -->
	<Style id="style1" xsi:type="widgets.brease.AlarmListStyle"
		textColor="#FFFFFF"
		backColor="rgba(255,0,0,0)"
	/>

In ContentEditor set something like following for styleConfiguration of your AlarmList:

[[{"styleNbr":1,"alarmState":5,"logicalOperator":"and","severity":[{"useState":true,"value":100,"conditionType":">="},{"useState":true,"value":200,"conditionType":"<"}]},
{"styleNbr":2,"alarmState":5,"logicalOperator":"and","severity":[{"useState":true,"value":200,"conditionType":">="},{"useState":true,"value":300,"conditionType":"<"}]},
{"styleNbr":3,"alarmState":5,"logicalOperator":"and","severity":[{"useState":true,"value":300,"conditionType":">="},{"useState":true,"value":400,"conditionType":"<"}]},
{"styleNbr":4,"alarmState":5,"logicalOperator":"or","severity":[{"useState":true,"value":400,"conditionType":">="},{"useState":true,"value":100,"conditionType":"<"}]}]; 

If alarm instance has severity 100…199 it will be shown in style1, if severity is 200…299 in style2 and so on.

Hope, that helps ypu :slight_smile:

Sincerly Simon

3 Likes

Thanks! The first part regarding styleConfiguration worked well, however this GUID number doesn’t exist in my Help. I have AH version 4.12.6.52.

Can you try to see this path manually:

Visualization → mapp View → Widgets → Data → AlarmList → Concept

There should be a dropdown “Defining the alarm category”.