# History Configuration

{% hint style="info" %}
[Click](https://github.com/irs-systems/IRS-LTT/blob/GitBook/doc/30%20User%20Documentation/.gitbook/assets/ltt_history_config.xml) to open the history configuration file **ltt\_history\_config.xml**. Be aware that after a fresh installation, this file is not present and will be created after you start the LTT GUI for the first time.
{% endhint %}

{% hint style="info" %}
For training or demonstration purposes you can take the default history configuration and go on with your setup.
{% endhint %}

The history configuration defines what columns and in which order they should be written to the history files.

The LTT GUI creates a so called history log file for every station (DUT) and test order. The main purpose of the history files is to **log failed limit tests** during test execution. But also other **generic status information** will be logged to the history files. You can create custom history log entries by yourself from any TestStand sequence.

* [How to create a history log entry?](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/customsteptypes/sendlog)
* [More information about history data](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/dialogs/altf10historydata)

Each **history log entry** is put into a separate line in the history file and is accompanied by a number of auxiliary information, such as date, time, climatic chamber temperature and so on.

You can choose what additional information are logged with each log entry and in which order they should appear in the file.

## Available Column IDs

There is a predefined set of available data, which you can pick by using a certain identifier. The following table gives a list of all possible data you can pick.

| ID                     | Meaning                                                                                                                                                                                                                                                                |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DATE                   | The current date.                                                                                                                                                                                                                                                      |
| TIME                   | The current time.                                                                                                                                                                                                                                                      |
| INFORMATION            | The actual log message. This is either an error message (limit or runtime error) or a custom log message ([how to create a log entry?](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/customsteptypes/sendlog)).                                  |
| MEASUREMENT\_VALUE     | The actual measurement value, in case this log entry is a limit error.                                                                                                                                                                                                 |
| MEASUREMENT\_UNIT      | The measurement value unit, in case this log entry is a limit error.                                                                                                                                                                                                   |
| LIMIT\_MIN             | The measurement value min. limit, in case this log entry is a limit error.                                                                                                                                                                                             |
| LIMIT\_MAX             | The measurement value max. limit, in case this log entry is a limit error.                                                                                                                                                                                             |
| MEASUREMENT\_ID        | The measurement ID, in case this log entry is a limit error ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/limittests)).                                                                                                             |
| ERROR\_COUNTER         | The count of how many times this measurement already had a limit violation ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/dialogs/f6errorconfiguration)).                                                                               |
| OPERATION\_MODE        | The current operation mode ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/operationmodes)).                                                                                                                                          |
| STATUS                 | The current station status ([more info](https://github.com/irs-systems/IRS-LTT/blob/GitBook/doc/30%20User%20Documentation/documentation/ltt-gui-manual/TestStand/CustomStepTypes/sendstatus.md)).                                                                      |
| TEST\_CYCLES           | The current test cycle ([more info](https://github.com/irs-systems/IRS-LTT/blob/GitBook/doc/30%20User%20Documentation/documentation/ltt-gui-manual/TestStand/CustomStepTypes/cyclestartend.md)).                                                                       |
| TCC                    | The current TCC value ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/hwcontrol/tcc-control-gui)).                                                                                                                                       |
| DUT\_VOLTAGE           | The current DUT voltage ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/hwcontrol/ps-control-gui)).                                                                                                                                      |
| CHAMBER\_TEMPERATURE   | The current climatic chamber temperature ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/hwcontrol/ts-control-gui)).                                                                                                                     |
| CHAMBER\_HUMIDITY      | The current climatic chamber humidity. This value is only available if your temperature sensor also supports measuring humidity (for example the Omega iThx) ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/hwcontrol/ts-control-gui)). |
| STEP\_TIME             | The time passed since the station status was last updated ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/additionalfeatures/steptime)).                                                                                                        |
| TOTAL\_TEST\_TIME      | The time this test had run in total so far.                                                                                                                                                                                                                            |
| ELECTRICAL\_TEST\_TIME | The time this test had run in total so far, but only in electrically active operation modes ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/operationmodes)).                                                                         |
| TEST\_STATION          | The test station index ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/mainwindow/stationdisplay)).                                                                                                                                      |
| DUT\_NAME              | The DUT name ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/dialogs/f11testconfiguration)).                                                                                                                                             |
| DUT\_TYPE              | The DUT type ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/dialogs/f11testconfiguration)).                                                                                                                                             |
| CABLE\_ID              | The cable ID ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/dialogs/f11testconfiguration)).                                                                                                                                             |
| VIBRATION\_AXIS        | The vibration axis, if applicable ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/dialogs/f11testconfiguration)).                                                                                                                        |
| COMMENT                | A custom comment, which can be set afterwards ([more info](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/dialogs/altf10historydata)).                                                                                                               |
| CUSTOM                 | Used for custom columns (see below)                                                                                                                                                                                                                                    |

For each history column you write a line

```xml
<HistoryColumn ID=[SOME_ID] name="MyColumnHeader" />
```

where you set the ID to one of those in the table above and provide a name for the column header. The default history configuration already contains all available columns in a certain order. You can change the order and/or maybe remove some unwanted columns or add additional **custom columns**.

## Format Specifier

You can also add an optional `format` attribute to each `HistoryColumn` entry.

```xml
<HistoryColumn ID=[SOME_ID] name="MyColumnHeader" format="F2" />
```

The following format specifier are available:

| ID           | Meaning                                                                               |
| ------------ | ------------------------------------------------------------------------------------- |
| Fx           | Floating point number with x digits after the decimal separator, examples: F1, F2, F3 |
| D            | Decimal number                                                                        |
| dd.MM.yyyy   | date format                                                                           |
| HH:mm:ss.fff | time format                                                                           |

If no format is specified, string is assumed.

## History File Split Size

Usually history files will be split into several chunks if the file size exceeds a certain limit. The default file split size is 1 MB (1048576 bytes). You can change this value by adding a `size_limit` attribute to the top level `<LttHistoryColumnConfig>` element.

```xml
<LttHistoryColumnConfig size_limit=10485760>
```

The above will set the file split size to 10 MB.

## History File Column Separator

By default the history columns are separated by a semicolon `;`. You can change the column separator with the following attribute:

```xml
<LttHistoryColumnConfig separator="|">
```

The above will set `|` as a column separator.

## Custom Columns

You can define any number of custom columns for the history files. To do so add `HistoryColumn` entries with the ID `CUSTOM`. The provided `name` will be the column header.

```xml
<HistoryColumn ID="CUSTOM" name="HV Voltage" />
<HistoryColumn ID="CUSTOM" name="HV Current" />
<HistoryColumn ID="CUSTOM" name="U_Kl30_Sense" format="F2" ShowInStationPanel="false" />
```

Custom columns get their values from [TestStand](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/customsteptypes/sendvaluestringvalue). Those so called runtime values are displayed in GUI for each [station display](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/lttgui/mainwindow/stationdisplay) as well as inserted into the history file's custom column with the matching name.

{% hint style="info" %}
If you do not want to have such a runtime value to be displayed in GUI but only be shown in history file you can add a `ShowInStationPanel="false"` attribute to that `HistoryColumn` element.
{% endhint %}
