# Predefined Sequences

A LTT testplan need to have certain predefined sequences.

{% hint style="info" %}
See chapters [order of execution](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/processmodel/orderofexecution), [operation modes](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/operationmodes) and [process model](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/processmodel) for a better understanding.
{% endhint %}

![Standard Sequences 1](https://1704635928-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH5etzy4TvPRLxLRNfHlb%2Fuploads%2Fgit-blob-537b7c9a29e1f50bd09c440d2d76cf9c83b40606%2FTS_StdSeq1.png?alt=media)

The green and purple sequences at the top are predefined **mandatory** TestStand sequence callbacks triggered by the process model. They will be triggered in the following order.

1. **SequenceFileLoad**: called at sequence file load. Initializes limits.
2. **ProcessSetup**: called one time after start for all stations. Use this to perform initializations per LTT and not per DUT.
3. **PreUUTLoop**: called one time after start for each DUT.
4. **MainSequence**: main sequence entry point. Do not make any changes here. It serves as a dispatcher to the various [operation mode sequences](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/operationmodes).
5. **PostUUTLoop**: called one time during stop for each DUT.
6. **ProcessCleanup**: called one time during stop for all stations. Use this to perform cleanup per LTT and not per DUT.

![Standard Sequences 2](https://1704635928-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH5etzy4TvPRLxLRNfHlb%2Fuploads%2Fgit-blob-f911dacd5628cc5f4991d8bccaef161c43fbf1c4%2FTS_StdSeq2.png?alt=media)

Additionally to the standard TestStand sequence callbacks there are a couple of other, **optional** sequences.

| Sequence              | Outcome                                                                                                                  |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Sync                  | Synchronizes the execution of all stations at this point. Optionally sets the power supply to a different voltage level. |
| MesSy Setup           | Performs the MesSy setup.                                                                                                |
| MesSy Analog Config   | Configures MesSy analog channels (scaling, offset).                                                                      |
| MesSy Activate Limits | Activates a given limit set on MesSy.                                                                                    |
| MesSy SSV Check       | Performs a SSV check on a given limit set.                                                                               |
| MesSy Clear Errors    | Clears any previous SSV check results.                                                                                   |

Besides those standard and optional sequences above, there are so called [operation mode sequences](https://docs.irs.systems/ltt/documentation/ltt-gui-manual/teststand/operationmodes), which are important for the LTT.

{% hint style="info" %}
A LTT testplan need to contain at least one operation mode sequence.
{% endhint %}
