VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

Animation control playsmulti-frame sequence images(image library files) to achieve dynamic presentation of device status or guide feedback. It supports automatic playback, conditional control, loop playback, and can also switch the screen or write registers after playback.

1. Attribute introduction

1.1 Function settings

AttributesDescription
Playback controlAutomatic playback (play upon entering the screen) / conditional control (play only when conditions are met)
Read address + compare + valueJudgment of conditional control: ==, !=, =, , IN (within the range including boundaries), OUT (outside the range)
Playback speedFrame interval time (milliseconds)
Playback countInfinite or specified count
End processingAfter specified count of playback: Switch screen or write to specified register (executed once, independent of playback count)
When stopping playbackDisplay first frame / Hide animation / Pause animation

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图

1.2 Appearance settings

Gallery: Select the icon library displayed by the control.

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图1

2. Application cases

2.1 Automatic playback

Playback control = automatic playback, speed 500ms, infinite count, display first frame when stopping. Loop playback upon entering the screen.

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图2

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图3

2.2 Condition Control (Start/Stop Animation)

Playback Control = Condition Control, play whenLW1001== 1, with a speed of 500ms and infinitely. Equipped with a bit status indicator light (toggle switch) to control LW1001: On = 1 to play, Off = 0 to stop (pause animation).

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图4

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图5

2.3 Send Notification After Playback

Playback Control = Condition Control (LW1002 == 1), specified times: 1 time, end processing = write to register:LW2000write 1. After the animation is played, write LW2000 to notify PLC.

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图6

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图7

2.4 Switch Screen After Playback

Playback Control = Condition Control (LW1003 == 1), after 1 time, switch the screen to the main screen, and hide the animation when stopped. Suitable for startup animation.

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图8

VisualHMI animation control: automatic/conditional playback, switch to a new screen after playback, or send a notification插图9

Extended Usage: When the GIF playback speed needs to be dynamically changed, Lua callswgt_set_param(screen, control, 0x33, value)——0x33 fixedly represents the GIF speed, with value in ms (100=100ms per frame). The premise is that the GIF control ID is not 0.

Compiled from Guangzhou Dacai Technology VisualHMI Development Documentation (hmi-doc.gz-dc.com) Configuration Control Tutorial "Animation Control", copyright owned by Dacai Technology.

Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.