VisualHMI dynamic button: switch control with sliding feedback linked to permissions

freeFree Technical Resource

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

The dynamic button is a switch control withvisual sliding feedback: clicking to toggle ON/OFF, sliding the slider from left to right (or in the opposite direction) to simulate a physical switch. It is most intuitive for operations with a strong "switch feel" such as device start/stop and enabling/disabling.

1. Attribute introduction

1.1 Function settings

AttributesDescription
Read/write addressBound register address
CircleColor of slider circle
UnselectedColor in closed state
When selectedColor in open state
When disabledColor displayed when permission is insufficient and touch is disabled

VisualHMI dynamic button: switch control with sliding feedback linked to permissions插图

2. Application case

Add dynamic buttons to the screen, read and write addressesLW1000; circle white (255;255;255), unselected gray (150;150;150), selected blue (32;150;240), disabled red (255;0;0); permission control: touch is disabled when LW1001=0.

VisualHMI dynamic button: switch control with sliding feedback linked to permissions插图1

Operation: Click 0→1, the slider turns blue as it slides from left to right; PLC register modification also has a dynamic effect. When permission is insufficient, the button is red and touch is disabled, but the status set by the instruction will still be displayed dynamically.

VisualHMI dynamic button: switch control with sliding feedback linked to permissions插图2

The "disabled color" of the dynamic button is linked to permission:When the permission conditions are not met, the button turns red and touch is disabled, but the slider animation brought about by changes in the register value is still displayed - don't mistake "button turning red" as a fault, it is a permission prompt.

Compiled from the VisualHMI development documentation of Guangzhou Dacai Technology (hmi-doc.gz-dc.com), the configuration control tutorial "Dynamic Buttons", copyright reserved 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 *.