Skip to content
Menu
Menu

Knowledge Base

KB050141 | ALARM ACKNOWLEDGMENT/ALARM SOUND OFF – VIA BUTTON

KB050141 | ALARM ACKNOWLEDGMENT/ALARM SOUND OFF – VIA BUTTON

Product: Elvis
Version: 2.5
Booth: 2006-12-13

Summary

The following options are available in Elvis to acknowledge an alarm:

  • via the built-in alarm list (double-click and acknowledge click)
  • via the AlarmListControl (same functionality)
  • implicitly about the successful dispatch of a report (if the check mark is set in the Receipt column)

This article describes how to alternatively acknowledge all alarms via a StateButton placed on a control page.

Sometimes you just want to turn off the alarm sound configured via Extras/Options/Alarm; This is also described.

Details

First, place a StateButton on the page. It is sufficient if it has a state. The desired image or text is then assigned to the states “-” (unknown) and “0”.

Then you add with “Events..” (context menu) enter the code to be executed when clicked.

To acknowledge all pending alarms, the code should look like this:

CODE:vb:Sub NameDesKontrollelements_Click()
Dim alarm As Object
Set alarm = Database.AlarmHistory
Do While alarm. EventType <> 0 And alarm. Time >= CDate(CDbl(Now)-1)
If alarm. Datapoint.AlarmState = Asc(“A”) Then
alarm. Datapoint.AcknowledgeAlarm(“”)
End If
alarm. Next
Loop
End Sub//CODE

Explanation: With Database.AlarmHistory you get the most recent alarm event; With alarm. Next, you then continue the alarm history towards the past. The termination criteria of the while loop are EventType (no further alarm event) and Time (event older than 1 day).

If you just want to turn off the alarm sound, it’s easy to do it with:

CODE:vb:Sub NameDesKontrollelements_Click()
Application.PlaySound(“”)
End Sub //CODE

Support Area

KB050141 | ALARM ACKNOWLEDGMENT/ALARM SOUND OFF – VIA BUTTON

Knowledge Base

Here you will find answers, solutions to problems and examples of our products.
KB050141 | ALARM ACKNOWLEDGMENT/ALARM SOUND OFF – VIA BUTTON

Case Studies

Successful in use: practical examples of our products and individual developments.
KB050141 | ALARM ACKNOWLEDGMENT/ALARM SOUND OFF – VIA BUTTON

Support

Describe your concern using our support form.
KB050141 | ALARM ACKNOWLEDGMENT/ALARM SOUND OFF – VIA BUTTON

License registration

Register your Elvis license!

IT GmbH · An der Kaufleite 12 · D-90562 Kalchreuth

© Copyright 2024. IT GmbH | Webdesign by Appear Online