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.
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.Unit' := '%'}
{attribute 'iot.MinValue' := '0'}
{attribute 'iot.MaxValue' := '100'}
nPositionValue : INT;
nPositionRequest : INT;
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. |
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. |
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. |