Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

DspPlaySound

  • Last UpdatedJul 18, 2023
  • 2 minute read

Plays a waveform (sound). Wave form sound files *.wav are provided with Windows and by third-party developers, or you can record them yourself to play long (and complex) sound sequences.

Embedded Image (65% Scaling) (LIVE)

LOSS OF CONTROL

  • Do not use Plant SCADA's alarming system as the primary alert mechanism for safety-related alarms or notifications (that is, those classified as critical to process safety, the protection of the plant and equipment, or the protection of human life).

  • Do not use Plant SCADA's audible alarm functionality as a replacement for safety-related warning systems critical to process safety, the protection of the plant and equipment or the protection of human life.

  • Safety-related alarms and notifications should be independent and separate from the process control system. They should be implemented in the form of a stand-alone physical alarm system driving individual discrete alarm annunciators.

Failure to follow these instructions can result in death, serious injury, or equipment damage.

When the sSoundname is a sound file path and "Mode is "0", this function loads the .wav file from the specified path (Sound Files) and plays the associated waveform. If the specified sound file is not available in the mentioned path, an error message will be returned and a hardware alarm will be reported. Use of a system sound in this mode is not supported and will result in an error message and a hardware alarm.

When the sSoundname is a system sound name and nMode is "1", this function searches the system for the entry with the specified name and plays the associated waveform. If the name cannot be found, there is no error message indicated as either a return value or hardware alarm. For this reason, the use of mode 0 with waveform files is recommended over mode 1 with system sounds. Further, use of a valid wave form sound file in this mode instead of mode "0" will result in an error message and a hardware alarm informing the wrong mode is in use.

Syntax

DspPlaySound(sSoundname, nMode)

sSoundname:

Sound File Path: Sound file to be played from the specified path.

System Sound Name: The predefined system waveform to be played. Examples of predefined sounds include:

• SystemAsterisk

• SystemExclamation

• SystemQuestion

• SystemDefault

• SystemHand

• SystemExit

• SystemStart

nMode:

• Mode 0: For use when the "sSoundname" is a sound file path.

• Mode 1: For use when the "sSoundname" is a system sound name.

Return Value

TRUE if successful, otherwise FALSE (if an error is detected).

Beep

Example

DspPlaySound("C:\WINNT\MEDIA\Notify.wav",0);
DspPlaySound("SystemStart",1);

See Also

Display Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in