CODESYS and OPC UA Integration

 
20th June, 2024

 

CODESYS, developed by 3S-Smart Software Solutions and launched in 1994, gained significant traction in the late 1990s and early 2000s. Its adoption surged when it aligned with the IEC 61131-3 standard, enhancing its credibility and appeal to automation engineers globally. Over the years, CODESYS has evolved into a leading platform for PLCs and automation devices, widely used across various industries such as manufacturing, energy, and automotive. Its versatility, standards compliance, and strong community support have cemented its success in the automation sector.

CODESYS supports a variety of programming languages defined by the IEC 61131-3 standard, which are crucial for developing automation solutions. These include textual languages like Structured Text (ST) and the now-deprecated Instruction List (IL), as well as graphical languages such as Ladder Diagram (LD), Function Block Diagram (FBD), and Sequential Function Chart (SFC). Additionally, CODESYS offers the Continuous Function Chart (CFC) for more flexible function block placement.

The journey of integrating OPC UA with CODESYS began with the goal of enhancing industrial automation. OPC UA (Open Platform Communications Unified Architecture) is a machine-to-machine communication protocol for industrial automation developed by the OPC Foundation. CODESYS (Controller Development System), on the other hand, is a development environment for programming controller applications according to the international industrial standard IEC 61131-3. 

 

Compatibility and Synergy

The compatibility of OPC UA with CODESYS is rooted in their shared goal of standardization and interoperability in industrial automation. CODESYS provides an OPC UA server as part of its standard installation, allowing seamless access to the variable interface of the controller via a client1. This integration enables the use of OPC UA’s secure, platform-independent communication within the programming environment of CODESYS. The automation system of SALZ Automation is compatible with such software as we deploy them using docker containers on our linux based firmware. For more details on our approach and application of this technology, feel free to explore the website and use cases.

 

How It Works

The integration works by setting up an OPC UA server on the CODESYS platform, which then communicates with OPC UA clients over a separate TCP connection. This server can be secured using encrypted communication and OPC UA user management1. The server supports various features like browsing of data types and variables, standard read/write services, and notification for value changes through subscription and monitored item services1.

The OPC UA Server in CODESYS is an additional option for CODESYS runtime systems to publish variables via the OPC UA protocol. It allows for advanced use cases, such as linking an information model to the PLC application. Here’s how it operates:

  1. Exposing Variables: The OPC UA Server exposes specified variables of a CODESYS project to the OPC UA address space. Clients can then read, write, and monitor the values of the PLC1.

  2. Custom Information Models: Custom information models can be imported and linked to the PLC application. This enables the execution of PLC methods by clients and supports the use of OPC UA methods1.

  3. Security and Compliance: The server can be secured using encrypted communication. It adheres to various security policies, including Basic256Sha256 and Aes128-Sha256-RsaOaep, ensuring data integrity and confidentiality1.

Features Supported by the OPC UA Server:

  1. Browsing of data types and variables
  2. Standard read/write services
  3. Notification for value changes through subscription and monitored item services
  4. Encrypted communication with an OPC UA Client
  5. Support of multitasking and OPC UA methods
  6. Support of Alarms & Conditions1

 

Moreover, CODESYS leverages OPC UA information models, which provide plant information according to the OPC UA standard, including data and metadata. This makes the connection and analysis of OPC UA-based plants faster and more efficient2.

 

Practical Implementation

In practice, implementing OPC UA with CODESYS involves:

  1. Project Creation: Create a new project with a CODESYS Control. Declare variables and add a Symbol Configuration object to support OPC UA features2.

  2. Building and Downloading: Build the project, specify access rights for the variables, and download the project to the controller2.

  3. Certificate Creation: Generate a certificate for the OPC UA server to enable secure data exchange with the client. This involves defining certificate parameters and restarting the runtime system after the certificate is created2.

  4. Encrypted Connection Setup: Set up an encrypted connection with an OPC UA client, such as “UaExpert,” to ensure secure communication2

 

In a smart factory setting, we recently implemented a system to streamline the production process using CONTROLLER  80-C. The objective was to enable real-time monitoring and control of the manufacturing equipment through a centralized interface.

In conclusion, the seamless integration of OPC UA with CODESYS is a testament to our company’s commitment to innovation and versatility in industrial automation. Our use case is prime examples of how our software can be effortlessly integrated with a variety of hardware platforms. This flexibility is not limited to our controllers; our software is designed to be compatible with any hardware, ensuring that our clients have the freedom to choose the best tools for their specific needs.

At SALZ Automation, we understand that each project has its unique challenges and requirements. That’s why we promote an approach that is adaptable to non-specific projects, providing a robust solution that can be tailored to the precise demands of any task. Our philosophy is simple: make integration easy, efficient, and secure. By doing so, we empower our clients to focus on what they do best, while we handle the complexities of communication and control.

Whether you are looking to upgrade your existing systems or embark on new industrial ventures, SALZ Automation stands ready to support you with state-of-the-art automation solutions that are as flexible as they are powerful. Embrace the future of industrial automation with us, where integration is not just a feature—it’s a promise.

Automation for drone landing pad | © Freepik

Use case:

Automation for drone landing pad

Today, drones perform tasks that used to be expensive, time-consuming, or risky. One customer for unmanned aerial systems uses them for efficient surveying, mapping, and inspection of industrial facilities. For monitoring an automated goods handling area, they relied on SALZ Automation—with OPC UA, Codesys, and EtherCAT for safe, autonomous operation.

Explore the use case

For any further information or your individual offer, please feel free to contact our Technical Sales directly:

Christian Kürten.

christian.kuerten@salz-automation.com

WhatsApp Chat

  +49 5222 93 53 5-30

Contact form