The HMI supports wav and mp3 audio files, enabling the playback of startup music, touch tones, and button sounds. It also allows for playback control through system registers. This section clarifies the application and playback control of audio.
1. Audio File Management
[Engineering] → [Resources] → [Audio Files], can add or delete audio files. Compile the audio file and generate it into the resource package.



2. Four Applications of Audio
2.1 Startup Music
Fixed File Namewelcome.mp3[Project] → [Project Properties] → [Startup Music] → Enable.

2.2 Touch Tone
Fixed File Namebeep.mp3Play when operating controls. Configure in [Project Properties] → [Touch Accompaniment] → [Audio].

2.3 Button sound
When a button is pressed, a specified audio file (named by numbers or letters) is played. Controls that support button sound (such as bit status indicators) select audio in the button properties.

2.4 Audio control (system register)
The file controlled for playback must benamed by numbers(such as 1.mp3, 2.mp3). Related registers:
| Register | Function |
|---|---|
| sysSndVol | Speaker volume (0~100) |
| SysSndPlay | Play specified audio ID (only files named with numbers can be played) |
| SysSndState | Playback status: 0=idle, 1=started playing, 2=paused, 3=stopped, 0x80=playing |
| SysSndPlayTime | Current playback progress (seconds) |
| SysSndTotalTime | Current playback duration (seconds) |




Compiled from the "Voice" resource introduction in the VisualHMI development documentation of Guangzhou Dacai Technology (hmi-doc.gz-dc.com), copyright belongs to Dacai Technology.
Leave a Reply