Supervisor¶
The Supervisor interface lets Horus communicate with external equipment - PLC, robot, and MES systems - to run fully automated measurement cycles.
PLC communication¶
Horus communicates with a Siemens S7 PLC over an RJ45 Ethernet connection, using the S7.Net library to read and write a PLC data block.

The connection requires the following parameters, found in the PLC settings:
- IP address: the IP address of the CPU's Ethernet card.
- PLC model (CPU type): S7-200, S7-300, S7-400, S7-1200, or S7-1500.
- Data block rack: found in the hardware configuration in Step 7.
- Data block slot: found in the hardware configuration in Step 7.
These four parameters map directly to the S7.Net connection call:
public Plc(CpuType cpu, string ip, Int16 rack, Int16 slot)
Loading a project¶
The data block is a memory location that can store variables; to load a program, the PLC must write the project name to it:
| Location | Type | Value |
|---|---|---|
| 0 | string | Project to load |
| 1 | string | Project loaded |

- Horus continuously reads the data block for changes.
- The PLC writes the name of the project to load to location 0.
- Horus detects the change and loads the corresponding project from the projects folder.
- Horus writes the name of the loaded project to location 1.
- The PLC can compare the project to load and the project loaded to confirm the correct program was loaded.
Robot communication¶
Once a project is loaded, a robot can drive a measurement cycle through the PLC's digital inputs and outputs. Horus exposes predefined I/O functions:

| I/O | Function |
|---|---|
| Digital IN 0 | Analysis |
| Digital OUT 0 | State / Ready |
| Digital OUT 1 | Result OK |
| Digital OUT 2 | Result Not OK |
| Digital OUT 4 | Analyzing |
A typical cycle:
- The robot places the object under the equipment.
- The robot sets Digital IN 0 to start the measurement.
- Horus measures the part and saves the result to the database.
- Horus replies via Digital OUT 1 (Result OK) or Digital OUT 2 (Result Not OK).
- The robot removes the object.
Storing measurement results¶
Horus automatically saves the result of each project to a SQLite database, which can be located on the local machine or on a shared folder. The database can be read and edited directly.
MES communication¶
Horus communicates with an MES system over TCP/IP, sending data in the following format:
INDEX-NAME-VALUES-DATE (yyyy/mm/dd HH:mm:ss)-USER
A minimum number of data points can be configured - for example, sending 20 values at a time.
Error handling¶
Horus can report a machine error state through a digital output. Additional options are available on request:
- Adding more digital error outputs.
- Connecting a signal alarm.
- Sending the error message to the PLC via the data block, since it is already used for PLC communication.