Air conditioning system

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

Air conditioning system 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' := 'AC'}
{attribute 'iot.ACValueRequestVisible' := 'true'}
{attribute 'iot.ACSliderVisible' := 'true'}
{attribute 'iot.ACModeVisible' := 'true'}
{attribute 'iot.ACModeChangeable' := 'true'}
{attribute 'iot.ACModeStrengthVisible' := 'true'}
{attribute 'iot.ACModeStrengthChangeable' := 'true'}
{attribute 'iot.ACModeLamellaVisible' := 'true'}
{attribute 'iot.ACModeLamellaChangeable' := 'true'}
{attribute 'iot.DecimalPrecision' := '2'}
stACWidgetSample : ST_ACWidgetSample;

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

iot.ACValueRequestVisible

BOOL

Determines whether the target value is displayed behind the current temperature value (TRUE) or not (FALSE).

iot.ACSliderVisible

BOOL

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

iot.ACModeVisible

BOOL

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

iot.ACModeChangeable

BOOL

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

iot.ACModeStrengthVisible

BOOL

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

iot.ACModeStrengthChangeable

BOOL

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

iot.ACModeLamellaVisible

BOOL

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

iot.ACModeLamellaChangeable

BOOL

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

iot.DecimalPrecision

INT

Sets the number of decimal places. This setting overwrites the setting at the variable nTemperature.

TYPE ST_ACWidgetSample :
STRUCT
    sDisplayName        : STRING := '';
    nAcMode             : INT; // 0: Off, 1: Cooling, 2: Ventilating, 3: Heating, 4: Cooling Off, 5: Ventilating Off, 6: Heating Off
    {attribute 'iot.Unit' := '°C'}
    {attribute 'iot.MinValue' := '18'}
    {attribute 'iot.MaxValue' := '23'}
    {attribute 'iot.DecimalPrecision' := '2'}
    nTemperature        : LREAL;
    nTemperatureRequest : LREAL;
    sMode               : STRING := 'OnlyFromPLCMode';
    aModes              : ARRAY[0..1] OF STRING := ['Manual', 'Automatic'];
    sMode_Strength      : STRING := 'Level 3';
    aModes_Strength     : ARRAY[0..2] OF STRING := ['Level 0', 'Level 1', 'Level 2'];
    sMode_Lamella       : STRING := 'QuickSwing';
    aModes_Lamella      : ARRAY[0..1] OF STRING := ['Static', 'Swing'];
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.

nAcMode

INT

Determines the mode of the AC widget.

Icon top right.
0: no icon
1: Cooling (blue)
2: Ventilating (green)
3: Heating (red)
4: Cooling off (gray)
5: Ventilating off (gray)
6: Heating off (gray)

iot.Unit

STRING

Unit of the temperature value.

Unit behind both numerical values.

iot.MinValue

INT

Lower limit of the temperature range.

On the left side under the slider.

iot.MaxValue

INT

Upper limit of the temperature range.

On the right side under the slider.

iot.DecimalPrecision

INT

Number of decimal places for the temperature values. Overwritten by the DecimalPrecision on the widget and applies to both temperature values.

For both temperature values.

nTemperature

LREAL

Current temperature value.

The number on the left side of the arrow.

nTemperatureRequest

LREAL

Requested temperature value, possible via the slider in steps of 0.1.

The temperature requested via the slider is then displayed on the right side of the arrow.

sMode

STRING

Mode of the air conditioning system.

The currently displayed mode (left).

aModes

ARRAY [0..n] OF STRING

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

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

sMode_Strength

STRING

Mode of the stage of air conditioning system.

The currently displayed mode (centered).

aModes_Strength

ARRAY [0..n] OF STRING

Array of the different step modes adjustable by the user.

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

sMode_Lamella

STRING

Mode of the louvers of the air conditioning system.

The currently displayed mode (right).

aModes_Lamella

ARRAY [0..n] OF STRING

Array of the different louver modes adjustable by the user.

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