Mappview and alarms

Hi Everybody,

I was an happy user of VC but I was kind of “forced” by b&r to move to mappview. so I’m trying to learn what I need step by step (documentation is as usual very difficult to browse).

I have 2 questions:

  1. I use mpalarmx for alarm management and I want to add a bar at the bottom of my homepage where I show if there’s any active alarm. Let’s say transparent background with no alarm and red background if there’s at least one active alarm and his text.

I did it with some code

	IF AlarmsXCore.PendingAlarms > 0 AND 
		( MpAlarmXCheckReaction	(gAlarmXCore_Hmi, 'StopImmediate')	OR
		MpAlarmXCheckReaction	(gAlarmXCore_Hmi, 'StopPhased') ) 
	THEN
		color_alarm_bar := 1;
	ELSE 
		color_alarm_bar := 0;	
	END_IF

so I can select an image from a list, and regarding the text I just display the first active alarm text, but I was wondering if there’s a smarter way…

  1. Is there a “mappview way” to display a popup when an alarm is triggered? without having to rely on code as above.

thanks!

Mappwiev way is very common, you need to define 2 styles in your theme and then connect to string variable for switching between these 2 styles.

You can get ispiration here How to Make Widgets Blink in MappView Using Session Timers

2 Likes

thank you, very useful link!

any idea about the popup? :grin:

Solution for popup window is dialog window

you will create a whole new content triggered by any action in eventbindings

3 Likes

ah ok, got it.
Thanks!!

Maybe an out-of-topic reply, but:

I would recommend participating in mappView training or at least discussing the architecture of your new mappView-based visualization with your local B&R support team. mappView and VC4 are two different worlds, and it can help you avoid architectural mistakes.

1 Like

yes I see your point. I followed the basic 3 days mappview course organized by my local B&R branch, but it didn’t cover these more specific topics.

my feeling is that (if compared to VC) with mappview you have many ways to achieve the same result, but without proper documentation or examples it’s difficult (for me) finding the correct path to follow.
It’s all trial and error, nice if you have plenty of time to dedicate to this task, less nice if you just have to build an HMI to make the machine useable without too many fancy graphics.

I understand. Feel free to open topics here. There are many experienced mappView developers. :slight_smile:

1 Like

I hope when you get into mappView, you will find it better and faster :+1:

2 Likes