Syntax rules for user-defined format files

With user-defined format files you can create your own log file format.

Rules and syntax in the configuration file:

Variables:

%DEF_SEPARATOR

Defines a separator character other than ";" or "," for the CSV file.

Example: %DEF_SEPARATOR="/"

%DEF_INVALID

Defines an error string (max. 16 characters) for invalid values, communication errors (no data received), or difference values when initial values are missing.

Default value: "-"; the error string for invalid REAL values is always "NaN".

Example: %DEF_INVALID="invalid"

%DEF_FILENAME

Specifies the log file name. Any ASCII character and the following designators (including ISO 8601 date and time designators) can be used:

  • %y (small year, two characters)
  • %Y (full year, four characters)
  • %m (month as number, 01–12)
  • %d (day as number, 01–31)
  • %W (calendar week)
  • %j (day of the week)
  • %H (hour)
  • %M (minute)
  • %S (second)
  • %F (log file name set in Data Logger > Log file settings
  • %x (batch number with 5 digits, 0–65535)
  • %X (batch number with 10 digits, 0–4294967293)

Example: %DEF_FILENAME="%F(%Y%m%d_%H%M%S_TRG).csv"

%DEF_DATA_TIMESTAMP

Sets the data point number (n) that contains time stamp information. Specify n-1 because "0" refers to the first data point.

Example: %DEF_DATA_TIMESTAMP="0"

%DEF_DATA_FILEEXT

Sets the data point number (n) that contains batch number information (used together with %x or %X in %DEF_FILENAME). Specify n-1 because "0" refers to the first data point.

Example: %DEF_DATA_FILEEXT="0"

%DEF_TIME

Specifies a user-defined time format for the time stamp.

  • %H (hour)
  • %M (minute)
  • %S (second)

Example: %DEF_TIME="%H:%M:%S"

%DEF_DATE

Specifies a user-defined date format for the time stamp.

  • %y (small year, two characters)
  • %Y (full year, four characters)
  • %m (month as number, 01–12)
  • %d (day as number, 01–31)
  • %W (calendar week)
  • %j (day of the week)

Example: %DEF_DATE="%Y/%m/%d"

%DEF_DATETIME

Specifies a user-defined time and date format for the time stamp (combines %DEF_DATE and %DEF_DATE).

  • %y (small year, two characters)
  • %Y (full year, four characters)
  • %m (month as number, 01–12)
  • %d (day as number, 01–31)
  • %W (calendar week)
  • %j (day of the week)
  • %H (hour)
  • %M (minute)
  • %S (second)

Example: %DEF_DATETIME="%Y-%m-%d %H:%M:%S"

%DEF_SPLIT_MINUTES

Specifies a user-defined file splitting interval in minutes. Valid settings: 1, 10, 60, 1440 (1 day), 10080 (1 week). Example: %DEF_SPLIT_MINUTES="10"

%DEF_INT

Text to display if %DATAFORMATS is used. Example: %DEF_INT="S16"

%DEF_UINT

Text to display if %DATAFORMATS is used. Example: %DEF_UINT="US16"

%DEF_WORD

Text to display if %DATAFORMATS is used. Example: %DEF_WORD="HEX4"

%DEF_BIN

Text to display if %DATAFORMATS is used. Example: %DEF_BIN="BITS"

%DEF_DINT

Text to display if %DATAFORMATS is used. Example: %DEF_DINT="S32"

%DEF_UDINT

Text to display if %DATAFORMATS is used. Example: %DEF_UDINT="US32"

%DEF_DWORD

Text to display if %DATAFORMATS is used. Example: %DEF_DWORD="HEX8"

%DEF_REAL

Text to display if %DATAFORMATS is used. Example: %DEF_REAL="FLT"

%DEF_REALEXP

Text to display if %DATAFORMATS is used. Example: %DEF_REALEXP="FLT"

%DEF_ASCII

Text to display if %DATAFORMATS is used. Example: %DEF_ASCII="CHAR2"

%DEF_DT

Text to display if %DATAFORMATS is used. Example: %DEF_DT="DATE AND TIME"

%DEF_TITLE

Included for compatibility reasons only. Example: %DEF_TITLE="KW Watcher"

Header variables:

Example:
  • %HEADER="Date","Time",%NUMBER_DYN
  • %HEADER+=,,%NAMES
  • %HEADER+=,,%COLUMNS
  • %HEADER+=,,%COM
  • %HEADER+=,,%TYPES
  • %HEADER+=,,%DATAFORMATS
  • %HEADER+=,,%REGISTER
  • %HEADER+=,,%UNITS
%HEADER

Use %HEADER to specify an arbitrary text and variables.

If the header consists of more than one row, each row must begin with %HEADER followed by "+=" instead of "=".

%NUMBER_DYN

Automatically adds sequential numbers to all columns.

%NAMES

Writes the name of all data points separated by the separator character.

%COMS

Writes the station number of all data points separated by the separator character.

%REGISTERS

Writes the register address (e.g. DT100) of all data points separated by the separator character.

%TYPES

Writes the register type (MOMENT/DIFFERENCE) of all data points separated by the separator character.

%DATAFORMATS

Writes the data format (INT, DINT...) of all data points separated by the separator character.

The text for each data format can be set with the %DEF_... variables.

%UNITS

Writes the unit (m³, °C, kWh...) of all data points separated by the separator character.

%COLUMNS

Writes the column number for each data point separated by the separator character.

Record variables:

Example:
  • %LOGDATA=%DATE,%TIME,%VALUES
%LOGDATA

Specifies the order of the data in a record row (e.g. for date, time, additional text and data).

%DATE

Use the date format set with %DEF_DATE.

%TIME

Use the time format set with %DEF_TIME.

%UNIXTIME

Use the Unix time format (seconds since 1970-01-01). Example: %LOGDATA=%UNIXTIME,%DATE,%TIME,%VALUES

%VALUES

Writes the logged data values separated by the separator character.

NOTE

Make sure you put a separator character between variables and text.

Modified on: 2022-08-10Feedback on this pagePanasonic hotline