A Slider is a vertical or horizontal graduation with a cursor that can be slide between extremities (Min, Max) to get corresponding values.
It is represented by two textures (one that slide, the cursor, and the background).
On the HMI grid, add a Slider:
or
Select then load the following texture for the cursor:
\Data\HMI\Electrical\slider4_knb.png
Select then then load the following texture:
\Data\HMI\Electrical\slider4_bkg.png
Uncheck and .
Move the background texture shape below the cursor:
Set the Min and Max limits visually, using the blue and the green anchors:
then with the values on the text fields:
In the Initialization panel, put the following code:
case RESET: {
set(-10); // minimal value
} break;
|
In the Runtime panel, put the following code:
printf("Slider value is: %d\n", int(get()));
|