Main Content

Slider

Display slider widget

Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.

  • Slider block

Libraries:
Simulink Support Package for Android Devices / User Interface

Description

Use the Slider block to display a slider widget on the device screen.

The Slider block outputs a single-precision value. The output value depends on the position of the slider along the length of the bar. When you slide the slider to the left position, the block outputs the value of the Minimum parameter. When you slide the slider to the rightmost position, the block outputs the value of the Maximum parameter.

Note

During simulation with no hardware connected, this block outputs the initial state.

Ports

Output

expand all

The block outputs the slider value corresponding to its position.

Data Types: single

Parameters

expand all

Specify the minimum value that the slider widget can output.

Specify the initial value that the slider widget can output.

Specify the maximum value that the slider widget can output.

Specify the smallest discrete change that the slider widget can output.

Specify a discrete time interval, in seconds, at which the block reads the slider position and output the data.

Note

Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.

Version History

Introduced in R2015a