Blinds

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.

Blinds 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' := 'Blinds'}
{attribute 'iot.BlindsPositionValueVisible' := 'true'}
{attribute 'iot.BlindsPositionSliderVisible' := 'true'}
{attribute 'iot.BlindsAngleValueVisible' := 'true'}
{attribute 'iot.BlindsAngleSliderVisible' := 'true'}
{attribute 'iot.BlindsModeVisible' := 'true'}
{attribute 'iot.BlindsModeChangeable' := 'true'}
stBlindsWidgetSample : ST_BlindsWidgetSample;

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: Blinds.

iot.BlindsPositionValueVisible

BOOL

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

iot.BlindsPositionSliderVisible

BOOL

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

iot.BlindsAngleValueVisible

BOOL

Determines whether the angle value is displayed (TRUE) or not (FALSE).

iot.BlindsAngleSliderVisible

BOOL

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

iot.BlindsModeVisible

BOOL

Determines whether the mode is displayed (TRUE) or not (FALSE).

iot.BlindsModeChangeable

BOOL

Determines whether the mode is adjustable (TRUE) or not (FALSE).

TYPE ST_BlindsWidgetSample :
STRUCT
    sDisplayName     : STRING := '';
    bActive          : BOOL;
    bPositionUp      : BOOL;
    bPositionDown    : BOOL;
    bAngleUp         : BOOL;
    bAngleDown       : BOOL;
    {attribute 'iot.Unit' := '%'}
    {attribute 'iot.MinValue' := '0'}
    {attribute 'iot.MaxValue' := '100'}
    nPositionValue   : INT;
    nPositionRequest : INT;
    {attribute 'iot.Unit' := '°'}
    {attribute 'iot.MinValue' := '-90'}
    {attribute 'iot.MaxValue' := '90'}
    nAngleValue      : INT;
    nAngleRequest    : INT;
    sMode            : STRING := 'Automatic';
    aModes           : ARRAY[0..1] OF STRING := ['Manual', 'Automatic'];
END_STRUCT
END_TYPE

Attribute

Data type

Description

Display in widget

sDisplayName

STRING

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

Display text of the widget.

bActive

BOOL

Intended to detect activation of the blinds.

Click on the area of the widget where there are no other control elements.

bPositionUp

BOOL

Intended for raising the blinds.

Button on the left side of the top slider.

bPositionDown

BOOL

Intended for lowering the blinds.

Button on the right side of the top slider.

bAngleUp

BOOL

Intended for setting the angle value in the direction of the minimum value.

Button on the left side of the bottom slider.

bAngleDown

BOOL

Intended for setting the angle value in the direction of the maximum value.

Button on the right side of the bottom slider.

iot.Unit

STRING

Unit of the position value.

Unit after the first numerical value.

iot.MinValue

INT

Lower limit of the position value.

Only shown in the PLC.

iot.MaxValue

INT

Upper limit of the position value.

Only shown in the PLC.

nPositionValue

INT

Position value of the blinds.

The first of the two numerical values.

nPositionRequest

INT

Target value of the position of the blinds.

The value sent to the app at the moment of releasing the top slider.

iot.Unit

STRING

Unit of the angle value.

Unit after the second numerical value.

iot.MinValue

INT

Lower limit of the angle value.

Only shown in the PLC.

iot.MaxValue

INT

Upper limit of the angle value.

Only shown in the PLC.

nAngleValue

INT

Angle value of the blinds.

The second of the two numerical values.

nAngleRequest

INT

Target value of the position of the blinds.

The value sent to the app at the moment of releasing the bottom slider.

sMode

STRING

Mode of the blinds.

The currently displayed mode.

aModes

ARRAY [0..n] OF STRING

Array of the different modes that can be set by the user.

By pressing on the current mode, the adjustable modes can be displayed.