VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center

freeFree Technical Resource

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

The instrument pointer simulates a traditional mechanical dashboard, dynamically reflecting the process variable through the position of the rotating pointer on the dial. The "pointer gauge" visual sensation in the industrial field is most easily accepted by operators.

1. Attribute Introduction

1.1 Function Settings

AttributesDescription
Read AddressValue is the rotation angle of the pointer
Data TypeUINT16/INT16/UINT32/INT32/UINT64/INT64/FLOAT/DOUBLE
Starting Value/Ending ValuePointer Range

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图

1.2 Appearance Settings (Key)

  • Pointer Direction: 12 o'clock ↑ / 3 o'clock → / 6 o'clock ↓ / 9 o'clock ← (Design UI recommends following this direction for ease of angle calculation)
  • Starting/Ending Angle: Regardless of the rotation direction (clockwise/counterclockwise), the angle calculation is always clockwise. 12 o'clock ↑=0°, 3 o'clock=90°, 6 o'clock=180°, 9 o'clock=270°; clockwise rotation starts at 225 and ends at 135
  • Rotation Center X/Y: The pointer rotates around this point, with coordinates relative to the top left corner of the image. For example, for a pointer image of 19x91, the rotation point is X=10, Y=81
  • Hardware Acceleration: Supported by the Dx series

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图1

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图2

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图3

When designing the pointer UI, it is strongly recommended to draw in the direction of 12 o'clock ↑/3 o'clock →/6 o'clock ↓/9 o'clock ←. The software provides auxiliary prompts (red arrow=starting angle, blue sector=rotation range), which can be seen by selecting the control when entering angles. If the rotation center X/Y is not calculated accurately, the pointer will rotate around the wrong position.

2. Application Cases

ReadLW1001(INT16), 0~240, pointer direction 12 o'clock ↑, starting angle 225, ending angle 135, rotation direction clockwise, rotation center X=10, Y=81. Equipped with 2 buttons for setting increment/decrement (step size 10, range 0~240, long press 500/100ms) to adjust the value.

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图4

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图5

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图6

Operation: Click the +/- pointer to refresh in real time, with a value limit of 0~240. The pointer shifts within the range of the dial.

VisualHMI instrument pointer: pointer direction, starting and ending angles, and rotation center插图7

Compiled from the VisualHMI development document of Guangzhou Dacai Technology (hmi-doc.gz-dc.com), the configuration control tutorial "Instrument Pointer", 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 *.