Configuration
The storage function blocks are located in the SEW_MK_PES_PowerMode.SEW_StorageMon library or in the SEW_MK_PES_EnergyMode.SEW_StorageMon library. Each storage function block must first be initialized. The function block of the Storage type has an init method, which must be called up once in User_PRG.Init. See the following code example:
StorageMan.Init(
rMaxTemperature := 60.0,
rTemperatureWarnLevel := 55.0,
rMinTemperature := -20.0,
xIsOverTempAvailable := FALSE,
xIsOverTempWarningAvailable := FALSE,
xIsOverVoltageAvailable := TRUE,
xIsTempValAvailable := TRUE,
xIsUnderTempAvailable := TRUE,
xIsWireBreakAvailable := TRUE,
xStorageErrorAvailable := FALSE,
sStorageName := 'Storage1',
usiStackID := 1);
Explanation of the code example:
The xIs variables and xStorageErrorAvailable specify which signals the storage unit provides. If, for example, it does not supply an overtemperature signal but a temperature value, an overtemperature can still be detected. If the storage unit supplies a corresponding bit and value, the results are ORed.
The following variables are available for initializing the Storage function block:
Variable name | Description |
|---|---|
rMaxTemperature | Data type – REAL |
Temperature limit for overtemperature | |
rMinTemperature | Data type – REAL |
Temperature limit for undertemperature | |
rTemperatureWarnLevel | Data type – REAL |
Temperature limit for overtemperature warning | |
xIsTempValAvailable | Data type – BOOL |
| |
xIsOverTempAvailable | Data type – BOOL |
| |
xIsOverTempWarningAvailable | Data type – BOOL |
| |
xIsUnderTempAvailable | Data type – BOOL |
| |
xIsOverVoltageAvailable | Data type – BOOL |
| |
xStorageErrorAvailable | Data type – BOOL |
| |
xIsWireBreakAvailable | Data type – BOOL |
| |
usiStackID | Data type: USINT |
Freely selectable ID in the range 0..255 that the energy storage module assigns to a stack. (Default: 1) |
The usiStackID input variable of the init method is used to identify a storage bundle. The software module internally assigns each storage module with the same ID to a storage bundle. This is mainly necessary for plausibility checks of the temperature sensors. The ID can be freely selected between 1 and 255 and must be the same for all modules that belong to the same storage bundle.
The complete initialization from the code example is only necessary if the type StorageManual or StorageOCE1n_On_PTnSensor is used, because in this case the storage type is not predefined. The variants SewEKS, LSMtron and MDC only need the value for sStorageName.
INFORMATION

The init function must also be called for the storage-unit specific variants because the name of the storage unit to be assigned is required for the messages.
The energy storage units must also be linked to the respective software module via the following call in the User_PRG.Init. In the following example, MDP92A is the function block of the type EnergyHubPowerMode integrated by automatic code generation.
MDP92A.LinkStorage(itfQueryInterfaceSEW :=StorageMan);
MDP92A.LinkStorage(itfQueryInterfaceSEW :=StorageEKS);
MDP92A.LinkStorage(itfQueryInterfaceSEW :=StoragePTn);
MDP92A.LinkStorage(itfQueryInterfaceSEW :=StorageLSMtron);
MDP92A.LinkStorage(itfQueryInterfaceSEW := Storage_Phoenix_AXLFBKEC_On_LSMtron);
Variable name | Description |
|---|---|
itfQueryInterfaceSEW | Data type – IQueryInterfaceSEW |
Interface for linking a Storage or Storage_SEW_StandardSet function block |
