Posted 26 Aug 2021 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. Share this post Link to post Share on other sites
Posted 8 Sep 2021 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
Posted 24 Sep 2021 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. Share this post Link to post Share on other sites
Posted 24 Sep 2021 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
Posted 24 Sep 2021 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
Posted 25 Sep 2021 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 Share this post Link to post Share on other sites
Posted 25 Sep 2021 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
Posted 27 Sep 2021 On 9/25/2021 at 7:55 AM, jie en said: Hi I also did try this. and got the same error so I just use back his code I am not sure. I tried the code as it is and I didn't get an error. 2021-09-27_9-23-51.bmp 2021-09-27_9-24-08.bmp Share this post Link to post Share on other sites
Posted 27 Sep 2021 '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