Skip to content
Menu
Menu

Knowledge Base

KB050003 | SOUND FILE (. WAV) ABSPIELEN

KB050003 | SOUND FILE (. WAV) ABSPIELEN

Product: Elvis
Version: all
Booth: 2001-11-19

Summary

To play a sound file, an event (change in the DP value) is reacted to with PlaySound in the project properties dialog.

Details

1. Open the event processing of the operator station with operator station/events… (context menu).

2. The editor opens, where the source code can be entered.

3. Select Form (left) and DatapointChanged (right).

4a. Insert the program (plays the wav file on each alarm) (download script):

//CODE:vb:Sub Form_DatapointChanged(ByVal DP As Object, ByVal prop As String)
	If DP.AlarmState = Asc("A") And prop = "AlarmState"Then
		Application.PlaySound "alarm.wav", &H00020001 ' oder &H00020009 für Endloswiederholung
	End If
End Sub //CODE

4b. Insert the program (only plays different wav files for certain alarm data points) (download script):

//CODE:vb:Sub Form_DatapointChanged(ByVal DP As Object, ByVal prop As String)
	If DP.AlarmState = Asc("A") And prop = "AlarmState"Then
		If DP.Name = "Alarm" Then
			Application.PlaySound "alarm.wav", &H00020001 ' oder &H00020009 für Endloswiederholung
		ElseIf DP.Name = "Alarm2" Then
			Application.PlaySound "xyz.wav", &H00020001
		End If
	End If
End Sub //CODE

Attention, do not copy the program directly from this page (html code!), but use the download!

5. Close the editor (the program will be saved automatically).

Note: The program runs on the operator stations and does not load the server. The wav files must be located in the directory of the ElvisRun .exe.

Support Area

KB050003 | SOUND FILE (. WAV) ABSPIELEN

Knowledge Base

Here you will find answers, solutions to problems and examples of our products.
KB050003 | SOUND FILE (. WAV) ABSPIELEN

Case Studies

Successful in use: practical examples of our products and individual developments.
KB050003 | SOUND FILE (. WAV) ABSPIELEN

Support

Describe your concern using our support form.
KB050003 | SOUND FILE (. WAV) ABSPIELEN

License registration

Register your Elvis license!

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

© Copyright 2024. IT GmbH | Webdesign by Appear Online