VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification

freeFree Technical Resource

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

The function button serves as the "universal button" in the HMI: it is responsible for switching screens, popping up dialog boxes, opening menus, executing conditions, sending notifications, and acting as a virtual button. This article will clarify each of its uses.

1. Button Uses (5 Types)

UseDescription
Switch ScreenJump to the target screen, with animation effects (from left to right/from right to left/from top to bottom/from bottom to top) and animation range (entire screen/specified range with four-sided margins)
Open Dialog BoxPop up the target screen as a dialog box, with a background mask of 0~100 (0 is transparent), and the pop-up position can be specified by coordinates (default is centered)
Close Dialog BoxIn conjunction with opening a dialog box, press to return to the original screen
Virtual ButtonConfigure Keyboard Functions (see Keyboard Article)
Open menuOpen menu screen, background mask/pop-up position configurable, menu return address: write the selected item value to this address
Close menuUsed in conjunction with opening menu

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图

2. Condition triggering + notification

  • Condition triggering: button action binds to logical expression, executed only when condition is met. Trigger address + comparison (>, =, <=, ==, !=, within range, outside range) + value
  • Notification: write value to PLC address when executing action. Notification address + value

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图1

3. Application cases

3.1 Full screen/specified range switching screen

Place function buttons on homepage (switching screen→1_switching screen, animation from top to bottom, entire screen); place return button on subpage (animation from left to right, specified range: left 60/right 60/top 185/bottom 195) -- only animate the middle area during switching.

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图2

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图3

3.2 Condition-triggered Switching

Function Button (switching screen, condition addressLW1000== 1) + a word setting button (write LW1000=1) stacked on top. Click the word setting button → condition is met → switch to the target screen. Commonly used in scenarios where "execution only when value changes", such as logging out of a login level.

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图4

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图5

3.3 Dialog Box (confirm operation)

Home page function button (open dialog box → 3_Dialog Box, background mask 50). The dialog box screen contains two function buttons (close dialog box + notify: LW1001 write 1). Click OK → close dialog box + send notification; click Cancel → directly return. Suitable for confirmations such as "Do you want to stop the machine?"

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图6

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图7

3.4 Menu (pop-up selection)

Home page function button (open menu → 4_Menu, mask 50, position X300/Y85, menu return addressLW1002, notify 0x0F00 write 65535 to reset). The menu screen contains 5 function buttons (Auto/Cooling/Heating/Ventilation/Dehumidification/Sleep), each with a corresponding value written. When selected, the value is written to LW1002, and the multi-state indicator light displays the mode.

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图8

VisualHMI function buttons: screen switching/dialog box/menu/condition triggering/notification插图9

Background mask for dialog boxes and menusis very practical: 0 is fully transparent, 100 is opaque, blocking the background screen to prevent accidental operation. Setting the mask to around 50 allows both the underlying layer to be visible and a "modal" feel. Additionally, the "menu return address" must be consistent with the write address of the control on the menu screen, otherwise the selection will not take effect.Very practical: 0 for fully transparent and 100 for fully opaque, covering the background image to prevent accidental operations. Set the mask to around 50 to see the underlying layer while maintaining a "modal" feel. Additionally, the "menu return address" must match the write address of the control in the menu screen, otherwise it will not take effect when selected.

Compiled from Guangzhou Dacai Technology VisualHMI Development Documentation (hmi-doc.gz-dc.com) Configuration Control Tutorial "Function Button", 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 *.