...
c) Since the operation will be checked by manually changing the tag value, add an object to the page, and use the ‘EntryData’ feature as shown below.
...
- An audio file must exist in the Xpanel or USB/SD memory. - A command PlayWave() requires an AUX socket in the Xpanel device. - This example is only applicable in the XpanelDesigner V2.50 or above. |
...
a) Select [Tools] – [Alarms] to bring up the [Alarm Configuration] window. Press the [Add] button to bring up the window as shown below. The following figure is the configuration window used in the Exercise 1.
...
b) Set the ‘Action on Alarm’ as ‘Command Script’ and enter the PlayWave() command in the ‘Execute’ field. Refer to the table below for the detailed information.
PlayWave | Executes the wav file in the assigned path. |
Subroutine | PlayWave(WavFileLocation, Path, Sync/Async) |
Description | Executes the *.wav file from the Path in the WavFileLocation. The WavFileLocation can be expressed with the following strings: 0: _LOCAL_ (\\Xpanel\) 1: _SDMEM_ (SD Memory Root Path) 2: _USBMEM_ (USB Memory Root Path) The Path must include the file’s name and extension. Enter 0 at Sync/Async, which indicates the ‘Sync’, to stop the next script’s execution until the end of the audio file. Enter 1 to continue the script execution while the audio file is operating. |
Exercise | Execute the ‘alarm.wav’ file in the sound folder of the Xpanel. The next script will not be executed until the audio file ends. PlayWave(_LOCAL_, "sound/alarm.wav", 0); |
...