Table of Contents

Siemens PLC (Built-in)

This document describes the built-in Siemens PLC driver available in x4Trace and outlines the available integration options.


Overview

x4Trace includes a built-in Siemens PLC driver based on the S7.Net library.

The driver is contained in the following assembly: x4Trace.Server.Drivers.dll

This built-in driver enables direct communication between x4Trace and Siemens PLCs and can also serve as a foundation for developing custom PLC drivers.


Integration Options

When integrating a Siemens PLC with x4Trace, you have two main options.


Option 1: Use the Built-in PLC Driver

Using the built-in driver is the fastest integration method.

In this case, you must:

  • Create the required variables in the Siemens PLC
  • Modify the PLC program to support communication
  • Configure memory addresses in x4Trace to match the PLC variables

x4Trace will communicate with the PLC using the predefined driver logic.

This approach is recommended when:

  • The built-in functionality meets your needs
  • You want minimal custom development
  • You prefer configuration over custom coding

Option 2: Develop a Custom PLC Driver

If the built-in driver is not sufficient, you can develop a custom PLC driver.

You can:

  • Reuse x4Trace’s Siemens PLC communication layer
  • Use all existing classes and algorithms
  • Extend or modify behavior as needed

To deploy a custom driver:

  1. Build your driver project
  2. Copy the resulting DLL into the Driver directory of the x4Trace Server

Open-Source Driver Implementation

The Siemens PLC driver implementation in x4Trace is open source.

Because of this:

  • You can inspect the code
  • You can modify or extend the driver
  • You can use it as a reference for other PLC integrations

The driver is based on the S7.Net library, which handles low-level Siemens PLC communication.


Development Environment

To develop or modify PLC drivers:

  1. Open the following solution: x4Trace.Server.UserPlugins.sln
  2. Modify or extend the Siemens PLC driver as needed
  3. Build and deploy the updated driver

Summary

x4Trace provides a flexible Siemens PLC integration strategy:

  • A built-in PLC driver for fast and reliable integration
  • An open-source implementation that can be customized
  • A clear extension path for custom driver development

This allows x4Trace to adapt to a wide range of Siemens PLC-based production lines.