Blinds (simplified)

The described widget is suitable for displaying blinds in the app. The various configuration options are described below. In the figure all available features of the widget are active.

Compared to the other version of the blinds widget, this version is simplified. It offers fewer options, but it has a simpler display.

Blinds (simplified) 1:

The widget is transferred as a substructure in the overall structure of the SendData() method. To build the widget, various PLC attributes are used when declaring the structure.

{attribute 'iot.ReadOnly' := 'false'}
{attribute 'iot.DisplayName' := 'Name for Widget'}
{attribute 'iot.WidgetType' := 'SimpleBlinds'}
{attribute 'iot.BlindsPositionSliderVisible' := 'true'}
stSimpleBlindsWidgetSample : ST_SimpleBlindsWidgetSample;

Attribute

Data type

Description

iot.ReadOnly

BOOL

Determines whether the widget on the app side gets only read access (TRUE) or additionally also write access to the PLC (FALSE).

iot.DisplayName

STRING

The display name of the widget in the app. This will be overwritten by sDisplayName as soon as sDisplayName is not an empty string.

iot.WidgetType

STRING

Type specification for the widget, in this case: SimpleBlinds.

iot.BlindsPositionSliderVisible

BOOL

Determines whether the slider for the position value is displayed (TRUE) or not (FALSE).

TYPE ST_SimpleBlindsWidgetSample :
STRUCT
    sDisplayName     : STRING := '';
    bPositionUp      : BOOL;
    bPositionDown    : BOOL;
    {attribute 'iot.MinValue' := '0'}
    {attribute 'iot.MaxValue' := '100'}
    nPositionValue   : INT;
END_STRUCT
END_TYPE

Attribute

Data type

Description

Display in widget

sDisplayName

STRING

Specifies the display name of the widget and overwrites the PLC attribute 'iot.DisplayName'.

Display text of the widget.

bPositionUp

BOOL

Intended for raising the blinds.

Button labeled "Up".

bPositionDown

BOOL

Intended for lowering the blinds.

Button labeled "Down".

iot.MinValue

INT

Lower limit of the position value.

This value is only required in the PLC so that the status display can be scaled correctly.

iot.MaxValue

INT

Upper limit of the position value.

This value is only required in the PLC so that the status display can be scaled correctly.

nPositionValue

INT

Position value of the blinds.

This value is only available in the PLC and is required to display the status below the buttons.