4.2 Using predefined controls

In this section we will take a look at how to use predefined controls to create dynamic elements.

4.2.1 Bar control

  1. Create and open a display "TestDisplay2"  as described in section 3.

  2. In the bottom area of the graphics editor you can see a selection of predefined controls. Drag & drop the "Bar vertical" control into your drawing area.

  3. On the right side, you can see a list of all parameters of the referenced control. Select the "testInt" data variable as the base address for this control by using the pointpointpoint selector.

  4. The control is now fully operative; you can also change the other parameters if you want to.

../../../_images/predefined_controls_add_scale_scada.png

Adding a bar control

4.2.2 Increment control

  1. Now drag & drop a "Button Increment/Decrement" control into your drawing area.

  2. Select the "testInt" data variable as the base address for this control by using the pointpointpoint selector.

  3. Enter "10" as the step. Now the value of the base will be increased by 10 every time you click on the button.

../../../_images/predefined_controls_add_increase.png

Adding an increment control

Hint

You can also change other parameters if you want to. Mandatory parameters are highlighted in red, all other parameters are optional. For example, to adjust the font size of the control, change the value of the parameter "Font -> size".

4.2.3 Decrement control

  1. Copy & paste the increment control.

  2. Choose -10 instead of 10 for the "step" parameter.

../../../_images/predefined_controls_add_decrease.png

Adding a decrement control

4.2.4 Opening the browser and testing the controls

Save the display, then open "TestDisplay2" in your browser and proceed as follows:

  1. Click the Login button in the visualization.

  2. Log in with user root (no password).

  3. Confirm the given user data with the OK button.

../../../_images/visu_login1.png

Visualization login

Hint

Change the value of the "testInt" data variable using your increment and decrement buttons after logging in. Now the bar should change according to the value of "testInt".