EDW LPEX V2.0 communication protocol

Communication line configuration
Communication station configuration
I/O tag configuration
I/O tag address
Error indication
Changes and modifications
Document revisions


EDW LPEX V2.0 protocol is a simple text file protocol. Its implementation is based on the sequential processing of file rows. Two types of files are supported:

  • LPEX file
  • MPX file

The LPEX file consists of a header and part with data. The header contains a description of data, that are separated by a defined separator. This separator is used to separate also data in each row of a document.

An example of LPEX file body:


One row of a table corresponds to one row in a text file. A symbol ";" is used as a separator, which may be redefined in the station parameters - the "Column Delimiter" parameter.

For better readability, the data is displayed in the table below. The header columns are described in Protocol parameters in the Communication station configuration section.



ZPB Kennzahl Einheit Wandlerfaktor MPDauer Werte 



SK40000041499000000000BESENOVA_T2AP-M kWh1012700000


The MPX file is an even more primitive text file protocol that has only a data portion. The body of the MPX file may look as follows:



For better visibility, the data is displayed in the table below. The header columns are described in Protocol parameters in the section Communication station configuration.

SK10000022099000000000ETRENCIN_G1AP-M  1 0100  0180515113692.4kWh
SK10000022099000000000ETRENCIN_G2AP-M 1 0100  0180515113694.8kWh
SK10000022099000000000ETRENCIN_T1AP-M  1 0100  0180515113691 kWh

When MPX files are analyzed, the column order is fixed, and the protocol parameters that specify the column names in the LPEX header, as well as the maximum number of columns (Date Column Name, Time Column Name .. Interval Name, and Max. Columns Number), are ignored. Date Conversion Mask and Time Conversion Mask

 parameters, specifying the date and time format, are also ignored, and yymmddhhmi format is assumed.

Communication line configuration

  • Communication line category: File I/O.
  • The parameter "Input File" is used only if the parameters Primary FTP Server and/or Secondary FTP Server are specified and by parameter ZIP File Mask specifies, that input files are in ZIP format (*.zip) - the input files are downloaded from the specified FTP servers and the ZIP files are searched for in the directory specified by the "Input File" parameter.

  • The parameter "Archive" specifies a folder for storing processed files.

Communication station configuration

Communication station - configuration dialog box, Protocol parameters.
They influence some of the optional protocol parameters. A user may define the following station protocol parameters:

ParameterDefault valueMeaning

File Type

LPEXType of processed files - LPEX (*.lpx) or MPX (*.mpx).

Date Column Name

DatumColumn name containing the date.
Time Column Name
ZeitColumn name that contains time data.
Address Column Name
ZPBColumn name that contains a value address.
Tech. Units Column Name
EinHeitColumn name that contains a unit of a measured value (or IMP for a KSP value type).
Value Column Name
WerteColumn name that contains the measured values.
Value Type Column Name
KennzahlColumn name that contains a value type (AP+ ,AP- ,AQ+ ,AQ-, KSP).
Interval Name
MPDauerColumn name that contains a granularity of measurements [min].
Max. Columns Number
30Defines maximum count of columns, that are scanned when data acquisition.
Column Delimiter
;Value separator in the header and body.
Date Conversion Mask
dd.mm.rrA mask for the conversion of the date in the text format to an internal date. In the case of MPX files, the mask is ignored.
Time Conversion Mask
hh:mi:ssA mask for the conversion of time in the text format to an internal time. In the case of MPX files, the mask is ignored.
Note: time in LPEX, as well as the MPX file, is presumed to be in the wintertime. 
Command Path

Directory for storing the batch files (e.g. unpacked ZIP archive).
Command Path VMS

Only for OpenVMS. Directory (e.g. DKA0:[IFAZD]) containing the batch files TESTZIP.COM and UNZIP.COM.
Download Command File
ftp_download.comBatch file for downloading data from the FTP server.
Delete Temporary Files
deltmp.comBatch file for deleting temporary files (FTP_DELETECMD, MAKE_TESTZIP.COM, MAKE_UNZIP.COM).
ZIP File Mask
GOEONL{rrrr}-{mm}-{dd}-{hh}-{mi}-{ss}.zip*Time and date mask for the name of the ZIP file. If the parameter is empty, it is assumed that LPEX or MPX files are located in the directory specified by the parameter Directory for Unzipped files.
LPX File Mask

Time and date mask for the name of unzipped LPEX files. If MPX files are processed, their name must match mask *{yy}{mm}{dd}{hh}{mi}.mpx or at least *{yy}{mm}{dd}{hh}{mi} e.g. ETREN_03_1805151136.mpx

Directory for Unzipped files
DKA200:[000000.IFAZD.UNZIPPED]Directory, from which the unzipped LPEX or MPX files will be read.
Remote Data Directory
2RoveDirectory on the FTP server that contains ZIP files.
Primary FTP Server address of the primary FTP server.
Secondary FTP Server address of the secondary FTP server.
FTP User
azdinterfaceFTP user name on both the primary and secondary FTP servers.
FTP Password
***FTP user password on both the primary and secondary FTP servers.
FTP Connection Timeout
30If the downloading or deleting of files on the FTP server took longer than this setting, this information is written into the log file of the KOM process.
Active Energy Tech. Units
MWHTechnical units of active energy.
Reactive Energy Tech. Units
MVARHTechnical units of reactive energy.
Expected Interval
1 minThe expected time interval of all values. If the value in the processed file in the "Interval Name" column is higher than "Expected Interval", the value of energy will be evenly split into several intervals of "Expected Interval" size.
The value 0 disables this feature.

Hour Subdirectories in Archive

NOThe parameter activates the archiving of processed files in subdirectories according to the hours within the day (i.e. 00 to 23).
In the case of a large number of processed files, further work with them is simplified.

Analyze Archived Files on Startup

YESWhen starting, the KOM process inspects old data sources to recalculate the value of electrical work.
Note: if the "Hour Subdirectories in Archive" parameter is activated, only old files from the last hour will be inspected.
Send Old Values
NOAnalyzes also the files that are older than "Maximum File Age".
Maximum File Age
3 hodIf the interval is exceeded, the values are either ignored or processed as Old Values, depending on the "Send Old Values" parameter.

Debug unknown and lost tags  

NOEnables displaying warnings about addresses of measurement points with missing I/O tags.

Old Values As New Values

NOAll values from communication (even old ones) go to the system as new values.

I/O tag configuration

Permitted I/O tags: Ai

I/O tag address

I/O tag address consists of three parts.

The first one defines the type of value:

  • P - Power (calculated from Energy read from the input file)
  • W - Work (calculated by integrating Power within the current hour)
  • E - Energy (directly from the input file with possible recalculations due to the size of the Interval -  see the Expected Interval parameter)

The second one - "Primary EAN Code" and "BackupEAN Code" - is used as a unique identifier of value, which is placed in the "Address Column Name" of the source file.

The third part represents the value type (AP+, AP-, AQ+, AQ-, KSP), which is in the "Value Type Column Name".
Note: KSP means pulse values from the KSP devices (units are IMP = impulses). Such I/O tags should have a type of value equal to E (Energy), the technical units are ignored (the conversion is not performed).

Note: configuration of two I/O tags of types Power and Energy and the next two parts of their address is identical, is not currently supported. Only one of these I/O tags will work. Combinations of Power + Work or Work + Energy are supported.

The following special addresses exist:

  • I/O tag with TRIGGER address will be set to a value equal to the number of processed LPEX or MPX files immediately after the processing is done.
  • I/O tag with INVALIDS address will be set to a value equal to the number of I/O tags the data for which were not found in a file that was just processed.

Error indication

The flags FA and FB are used to indicate the situations when data processing was not done as expected. FB flag is set only for power values on the condition that the files come from another server, i.e. they are transmitted through FTP. It relates to the following situations:

  • time in the file is older than "Maximum File Age" and the "Send Old Values" parameter is enabled at the same time,
  • data are processed outside of the current hour, for example, if the record with a timestamp 13:45 comes at 14:03,
  • older data, as already processed, come for the I/O tag.

In the following cases, the values are archived without a flag. The most recent valid value will have an FB flag set:

  • The data with the same timestamp as the current timestamp of the I/O tag were received, but with a different value. An FB flag is set for this particular value.
  • The name of each processed file contains also information about time. If this time is different from the timestamp of a value stored in the file, this data has also an FB flag, both for historical and current value.

The performance values will be preprocessed before sending them to the D2000 Server. If the values are received in N-minute intervals, the value from the file will be divided by a number (N* 60), which ensures that the average power will be obtained from the integral value of work. The timestamp of this artificial power value will be moved to the beginning of the interval.

If the protocol is configured so that data are downloaded from FTP servers, it is possible to configure the primary and secondary FTP servers. If the data downloading from the primary server failed, the secondary one is used. Data processed in such a way have FA flag. These abovementioned value flags are displayed in the archival dialog box of the I/O tag, in the "Value flag" column.


Changes and modifications


Document revisions

  • Ver. 1.0 - April 23, 2014 - New document.
  • Ver. 1.1 - May 17, 2018 - Support for MPX files.
  • Ver. 1.2 - August 1, 2023 - Support for KSP (impulses) in LPX files.

Write a comment...