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

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' := 'Stepper'}
stStepperWidgetSample : ST_StepperWidgetSample;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: Stepper motor. |
TYPE ST_PlugWidgetSample :
STRUCT
sDisplayName : STRING := '';
nError : USINT;
bBack : BOOL;
bForward : BOOL;
END_STRUCT
END_TYPEAttribute | 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. |
nError | USINT | Determines whether the widget is in an error state. | Between icon and display name of the widget. |
bBack | BOOL | Switches the BOOL for "back". The BOOL must be reset to FALSE by application in the PLC. | Left button. |
bForward | BOOL | Switches the BOOL for "before". The BOOL must be reset to FALSE by application in the PLC. | Right button. |