10.4 Video Player
Last updated
Last updated
Introduction
Video playing could play video on HMI project screen, it requires [customized object] and [file list] objects. Currently, the video format support by Wecon HMI are including ASF, AVI, MKV, MP4, RM, and FLV.
Configuration
1) Basic
The function address doesn’t have to be configured. DLL file name needs to be Custom_MoviePlayer.
2) Custom address
ID1 is the address for storing the video file name (including the suffix), it could not be empty and the length is 32 words.
ID2 is the address for video control. The occupying length is 1 word, also could not be empty. Please refer to below table for more information about controlling addresses.
Function | Address | Description | |
Play control | 0th bit | HDX102.0 | Bit for playing control: play the video file when this bit address is triggered |
1st bit | HDX102.1 | Bit for pause control: pause playing when this bit address is triggered, or resume playing after pause | |
2nd bit | HDX102.2 | Bit for full screen control: maximize the video when this bit address is triggered | |
3rd bit | HDX102.3 | Last video: play the last video when this bit address is triggered. | |
4th bit | HDX102.4 | Next video: play the next video when this bit address is triggered. | |
5th bit | HDX102.5 | Volume increase: increased by 10 | |
6th bit | HDX102.6 | Volume decrease: decreased by 10 | |
Mode selection | 7th bit | HDX102.7 | Once: only play current video file once |
8th bit | HDX102.8 | Single cycle: repeat to play current video file | |
9th bit | HDX102.9 | Order: play video file of the list and stop after done | |
10th bit | HDX102.10 | Repeat in order: repeat to play the video file of the list |
ID3 is the address for the play state of the video. The occupying length is 1 word, also could not be empty. 0 means the play statue is stop, 1 means it is playing.
ID4 is the address for the video volume. The occupying length is 1 word, also could not be empty
ID5 is the address for the video file path. The occupying length is 1 word, also could not be empty. Please Refer to below table for more information.
Value | Video file path | Description |
0 | USB flash disk | Please create a folder named mp4 in the U disk directory to store the video files to be played. |
1 | SD card | Please create a folder named mp4 in the SD card directory to store the video files to be played. |
2 | HMI flash | Copy the video files to the mp4 folder in the directory of flash |
Operating procedures of File list object settings
Configure the customized object as the above picture
Configure the file list object as below:
1) Select the directory as the MP4 folder in USB flash disk. Set the file name address as HDW150
2) Create a folder named MP4 in the SD card directory to store the video files to be played.
3) Add the video controlling address, refer to the above video controlling address table
4) Compile the project and download it to HMI, trigger the bit address to play the video from the list.
✎Note:
1) Only 9000 series HMI with video module could support this function, and video playing is not active during offline simulation.
2) When using a USB flash drive or SD card to store video files, it is forbidden to remove the USB flash drive or SD card during video playing. Otherwise, the HMI display would be abnormal.