jie en

NA HMI in Historical Mode

9 posts in this topic

Hi, would like to know anyway for me to only show in alarm historical only when alarm is trigger and not when alarm is clear?

Attached is the picture, the highlighted in yellow in not needed. 

Capture.PNG

Share this post


Link to post
Share on other sites

Hi, 

You can filter out cleared alarms with VB code. For example:

Sub FilterClearedAlarms
	AlarmView0.FilterByStatus(_eHMI_ALARM_STATUS.Raised) 'replace AlarmView0 with the name of your alarm view object.
End Sub

This code can be triggered for example when the alarm page is shown.

Share this post


Link to post
Share on other sites
On 9/8/2021 at 8:07 PM, Eza90 said:

Hi, 

You can filter out cleared alarms with VB code. For example:


Sub FilterClearedAlarms
	AlarmView0.FilterByStatus(_eHMI_ALARM_STATUS.Raised) 'replace AlarmView0 with the name of your alarm view object.
End Sub

This code can be triggered for example when the alarm page is shown.

 

Hi,
I got this error, i not sure what i did wrong.
 

error.png

error1.png

error2.png

Share this post


Link to post
Share on other sites

I think in your case, you have the object name as 'UserAlarmsViewer0'. So you have to use this in your subroutines.

It should be:

UserAlarmsViewer0.FilterByStatus(_eHMI_ALARM_STATUS.Raised)

EZa90 actually told  you to do this in his post: 

'replace AlarmView0 with the name of your alarm view object

Share this post


Link to post
Share on other sites

Its not technically hiding them but if you make the color of the alarms that are cleared the same as your background they are invisible. Turn off historical mode as well. It may look funny if a newer alarm clears and an older alarm hasn't mind you

Share this post


Link to post
Share on other sites
23 hours ago, kckku said:

I think in your case, you have the object name as 'UserAlarmsViewer0'. So you have to use this in your subroutines.

It should be:

UserAlarmsViewer0.FilterByStatus(_eHMI_ALARM_STATUS.Raised)

EZa90 actually told  you to do this in his post: 


'replace AlarmView0 with the name of your alarm view object

Hi I also did try this. and got the same error so I just use back his code

error3.png

Share this post


Link to post
Share on other sites
20 hours ago, photovoltaic said:

Its not technically hiding them but if you make the color of the alarms that are cleared the same as your background they are invisible. Turn off historical mode as well. It may look funny if a newer alarm clears and an older alarm hasn't mind you

will need the historical mode for the alarm raised. did the color same as the background but it will have a line spacing.

Share this post


Link to post
Share on other sites

'UserAlarmsViewer0' would be the name of the screen object, and it can only be used in page code.  If you're in the main subroutines, that doesn't work as far as I know, the code needs to be in the page that has the object on it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now