# Subsystem Definition and Identification

## Layer Definition

The main focus of this protocol definition lays on material flow handling and therefore on the most common used communication layers in a TMS, starting with the most upper communication partner – a parallel-processing computing unit. Communication between all layers happens duplexed, in both directions. A typical layering in a material flow system is shown in Illustration 1.

![Illustration 1: Model of typical material flow layers](https://2644160117-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNQZ0gF9GkOP_AEbTzE%2F-LNQaQQLnAKMFRr_IVJi%2F-LNQafIKL-hyZk3DqDkt%2Fimage.png?alt=media\&token=8716a16d-cd25-4280-9eb1-34f6f8b0e135)

A server computer is on top (Layer N) of the TMS model that is responsible to control the logical transportation orders between physical or virtual locations. Transport orders are created and managed by this system and backed up in some persistent storage. Communication to the underlying layer N-1 can be implemented different and specific to the project. Whether it happens on TCP/IP sockets directly or on a higher level protocol (HTTP) does not influence the logical protocol that is defined here. Devices on layer N-1 are mostly small but powerful industrial PC (IPC) that act as telegram handlers or data concentrators. The main function of those devices is to collect information that is sent by devices on lower layers, analyse that data and send logical messages (telegrams) to the upper layer – the material flow controller (MFC). The way back, an IPC receives telegrams from the MFC, translates them into control commands for devices on the layer below (N-2). Devices on layer N-2 are responsible to coordinate actuator and sensor units of a particular area within the system. Controller logic is implemented in these PLC devices that decide on the state of input ports and on incoming control commands from an IPC which output ports to activate respectively deactivate. Like the IPC an PLC is implemented in a higher order programming language, like C/C++ or some kind or functional language. Instead of microcomputers (e.g. Arduino), products like SIEMENS S5/S7 can be used, too. Sensors and actuators can be directly connected to the PLC or indirectly through a sensor adapter (like a XBee) on layer N-3. The number of sensors and actuators used in a system does often exceed the number of available I/O ports of a PLC. That makes it necessary to group sensors and actuators that are physically close to a XBee that is wireless connected to the PLC of an area.

## System / Subsystem Definition

Both of them are communication partners. A system is consistently a communication endpoint that is located in the higher ordered layer, whereas the Subsystem is an underlying component; doesn't matter if directly of indirectly connected to each other. Communication between both systems in both directions is definitely desired in the context of this protocol definition.

## Location Definition

Most messages, defined in this document, keep the location where they've occurred, as part of the message.


