Concept

<< 点击显示目录 >>

主页  mappView帮助助手 > mapp View帮助信息 > Widgets  > Numeric  > XYJoystick  >

Concept

This section contains additional information about the concept of widget "XYJoystick".

Input

This widget can only be used for input. The user can only move the slider thumb in one direction, e.g. movement on the x-axis, but NOT on the y-axis. To enable movement on the y-axis, the user must slide their thumb back to the center or simply release it. In this case, the slider thumb automatically jumps back to the center.

xyjoystick_konzept

Data binding

The widget has 2 properties (xValue, yValue) that can be bound to the process variables. These variables range from -1 to 1 and can be used in the application as a factor, for example to define the movement of an axis.

Example: Brightness control (sliding movement along the x-axis)

Step 1: Place the widgets.

Place widgets "XYJoystick" and "BasicSlider" from the Widget Catalog on the piece of content, as shown below. NumericOutput widgets can be used to see how the value changes.

xyjoystick_kozept_example1

Step 2: Data binding

On XYJoystick, one numeric OPC UA variable is bound to xValue and one to yValue. Writing should only be done from widget "Page"; for this reason, "Init read/write" is used as the binding mode.

xyjoystick_konzept_datenanbindung

xyjoystick_konzept_datenanbindungpv

On widget "BasicSlider", a numeric OPC UA variable added in the application with xValue is bound to value. "Read only" is used as the binding mode.

xyjoystick_konzept_datenanbindungslider

xyjoystick_konzept_datenanbindungpvslider

xyjoystick_konzept_datenpvsliderlogik

Results:

It can look like this when connected to the HMI application:

xyjoystick_konzept_result1

xyjoystick_konzept_result2

Moving the slider thumb to the right on the x-axis increases the value on widget "BasicSlider" by 1.

xyjoystick_konzept_result3

If you continue to hold down the slider thumb without releasing it, value "valueBasicSlider" is always summed to 1 depending on the set cycle time.

xyjoystick_konzept_result5

The same happens when you drag the slider thumb to the left, only with negative values.

If you do not release the slider thumb, this setting will change every second:

xyjoystick_konzept_cyclic_01