Ventilation

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

Ventilation 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' := 'Ventilation'}
{attribute 'iot.VentilationValueRequestVisible' := 'true'}
{attribute 'iot.VentilationSliderVisible' := 'true'}
{attribute 'iot.VentilationModeVisible' := 'true'}
{attribute 'iot.VentilationModeChangeable' := 'true'}
stVentilationWidgetSample : ST_VentilationWidgetSample;

Attribute

Data type

Description

iot.ReadOnly

BOOL

Determines whether the widget on the app side gets only read access (TRUE) or also additional 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: Ventilation.

iot.VentilationValueRequestVisible

BOOL

Determines whether the requested air value (CO2 concentration) is displayed (TRUE) or not (FALSE).

iot.VentilationSliderVisible

BOOL

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

iot.VentilationModeVisible

BOOL

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

iot.VentilationModeChangeable

BOOL

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

TYPE ST_VentilationWidgetSample :
STRUCT
    sDisplayName    : STRING := '';
    bOn             : BOOL;
    {attribute 'iot.Unit' := 'ppm'}
    {attribute 'iot.MinValue' := '400'}
    {attribute 'iot.MaxValue' := '1400'}
    nValue          : INT;
    nValueRequest   : 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.

bOn

BOOL

Switches the ventilation on (TRUE) or off (FALSE).

Toggle switch top right.

iot.Unit

STRING

Unit of air value (of CO2 concentration).

Unit behind both numerical values.

iot.MinValue

INT

Lower limit of the air value (the CO2 concentration).

On the left side under the slider.

iot.MaxValue

INT

Upper limit of the air value (of the CO2 concentration).

On the right side under the slider.

nValue

INT

Current air value (CO2 concentration).

The number to the left of the arrow.

nValueRequest

INT

Requested air value (CO2 concentration) via the slider.

The number requested via the slider is subsequently displayed on the right side of the arrow.

sMode

STRING

Mode of ventilation.

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.