Charging station
The widget described is suitable for displaying and operating a charging station 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' := 'ChargingStation'}
{attribute 'iot.ChargingStationReserveVisible' := 'true'}
{attribute 'iot.ChargingStationPhase2Visible' := 'true'}
{attribute 'iot.ChargingStationPhase3Visible' := 'true'}
stChargingStationWidgetSample : ST_ChargingStationWidgetSample;
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: ChargingStation. |
ioT.ChargingStationReserveVisible | BOOL | Specifies whether the reserve button is displayed (TRUE) or not (FALSE). |
iot.ChargingStationPhase2Visible | BOOL | Specifies whether the values of the second phase are displayed (TRUE) or not (FALSE). |
iot.ChargingStationPhase3Visible | BOOL | Specifies whether the values of the third phase are displayed (TRUE) or not (FALSE). |
TYPE ST_ChargingStationWidgetSample :
STRUCT
sDisplayName : STRING;
bStartCharging : BOOL;
bStopCharging : BOOL;
bReserveCharging : BOOL;
sStatus : STRING;
nBatteryLevel : UINT;
nCurrentPower : LREAL;
aThreePhaseMaxPower : ARRAY[0..2] OF LREAL;
aThreePhaseCurrentPower : ARRAY[0..2] OF LREAL;
aThreePhaseAmperage : ARRAY[0..2] OF LREAL;
aThreePhaseVoltage : ARRAY[0..2] OF LREAL;
nChargingTime : UDINT;
nChargingEnergy : LREAL;
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. |
bStartCharging | BOOL | Intended to trigger the start of a charging process. | The left button. |
bStopCharging | BOOL | Intended to trigger the stop of a charging process. | The center button. |
bReserveCharging | BOOL | Intended to trigger the reservation of a charging station. | The right button. |
sStatus | STRING | Intended to indicate the status of charging. | Text under the display text of the widget. |
nBatteryLevel | UINT | The charge status of the vehicle, if known. | Marked as "Battery Level" in this figure. |
nCurrentPower | LREAL | The current power at which the vehicle is charging in kW. | Marked as "Power" in this figure. |
aThreePhaseMaxPower | ARRAY [0..2] OF LREAL | The three maximum power values of the three phases in kW. | Scaling of the three red-filled circles. |
aThreePhaseCurrentPower | ARRAY [0..2] OF LREAL | The current power of the three phases in kW. | Fill in the red circles and value above the circles. |
aThreePhaseAmperage | ARRAY [0..2] OF LREAL | The current amperage of the three phases in A. | Upper value within the three circles. |
aThreePhaseVoltage | ARRAY [0..2] OF LREAL | The current voltage of the three phases in V. | Lower value within the three circles. |
nChargingTime | UDINT | The elapsed time of the charging process in seconds. | Marked as "Charging Time" in this figure. |
nChargingEnergy | LREAL | The energy charged so far during the current charging process in kWh. | Marked as "Energy charged" in this figure. |