> For the complete documentation index, see [llms.txt](https://infosys.selmotech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infosys.selmotech.com/selmo-solution/selmo-solution-en/selmo-structure-and-standard/selmo-technical-standard-and-structure/layer-overview/layer-concept.md).

# Layer concept

### 📘 The layer concept in Selmo

The Selmo system is structured in three layers – in so-called **layers**.\
Each layer fulfills a clearly defined function:

* **Logic Layer** – describes the sequence
* **System Layer** – defines the behavior of the signals
* **Parameter layer** – manages data such as times, counters, values

This separation creates transparency, verifiability and reusability – from the model to code generation.

***

#### 🔷 1. Logic Layer – the sequence plan

The Logic Layer is the centerpiece of the model. Here the **process is described in states**.

| element          | Function                                        |
| ---------------- | ----------------------------------------------- |
| `State`          | normal state (e.g. “clamp part”)                |
| `Timer`          | automatically continue after a defined time     |
| `Decision`       | conditional branching (e.g. sensor ok?)         |
| `Repeater`       | repetition loops (e.g. “up to max. 3 attempts”) |
| `Jump`           | jump to another state (e.g. in case of error)   |
| `Sequence cross` | synchronous transition to another SEQ           |

**The Logic Layer forms the deterministic automaton (SDEA)** – i.e. a fully describable sequence, free of side effects.

***

#### 🔷 2. System Layer – bit control & zone behavior

The System Layer determines **how each zone should behave in each state**.\
It consists of a matrix (bit control) in which:

* the rows are states,
* the columns are zones,
* and each cell position contains an **operand** carries:

| Operant | Meaning                                            |
| ------- | -------------------------------------------------- |
| `0`     | Zone is inactive in this state                     |
| `S`     | sequence check – zone is actively expected         |
| `i`     | interlock – zone must be fulfilled, otherwise stop |

Additionally, the following are:

* HMI texts
* colors
* safety linkages (CMZ, MXIC)\
  are automatically generated from the System Layer.

***

#### 🔷 3. Parameter Layer – data logic

The Parameter Layer allows **non-binary values** to be integrated into the model – e.g.:

* times (`TIME`)
* counters (`INT`)
* flags (`BOOL`)
* positions (`REAL`)

Each parameter can be used as:

| direction | Function                                     |
| --------- | -------------------------------------------- |
| `IN`      | adjustable by the operator (e.g. cycle time) |
| `OUT`     | determined by the system (e.g. actual time)  |
| `IN/OUT`  | combinable (e.g. teachable setpoints)        |

Parameters can:

* be used in states (e.g. timer time)
* be displayed or modified in the HMI
* communicate via OPC UA or MES interfaces

***

#### 🎯 Advantages of layer separation

| Advantage       | Meaning                                                    |
| --------------- | ---------------------------------------------------------- |
| **Clarity**     | Each function has its defined level                        |
| **maintenance** | Changes affect only the affected layer                     |
| **export**      | Each level produces its own documentation                  |
| **Modularity**  | Layers can be reused between projects                      |
| **Validation**  | Logic, signal behavior and data checking clearly separated |

***

### ✅ Conclusion

The layer concept makes Selmo **clean, maintainable, extendable and traceable**.

📌 *Logic → defines the sequence*,\
📌 *System → secures the behavior of the technology*,\
📌 *Parameter → provides values for variability, performance and interface.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://infosys.selmotech.com/selmo-solution/selmo-solution-en/selmo-structure-and-standard/selmo-technical-standard-and-structure/layer-overview/layer-concept.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
