NexaCode

Dev Report 04: NexaCode PLC Doc Generator

With the fourth Dev Report, we are providing another development update for NexaCode. In addition to our Code Generator, we are now also working on a PLC Doc Generator. While the Code Generator helps to efficiently create standardized PLC structures, the Doc Generator addresses another, but equally important, aspect of engineering: documentation. Especially with PLC block libraries, documentation is often a time-consuming issue in everyday work, quickly becomes outdated, and frequently requires manual updates when changes occur.

Why Documentation is So Important in PLC Engineering

Standardization in PLC engineering doesn't stop at the code. A cleanly structured block is truly sustainably usable only if its interfaces, functions, and changes are also clearly documented. In practice, powerful block libraries often emerge, but their documentation is difficult to keep up-to-date. As soon as blocks are extended, parameters are changed, or interfaces are adapted, the documentation must also be updated. If this step is performed manually, it creates additional maintenance effort. At the same time, the risk increases that documentation and actual code diverge.

What is currently being developed in the NexaCode PLC Document Generator

The NexaCode PLC Doc Generator is designed to evaluate existing component libraries and automatically generate usable documentation from them. The focus is on making technical component structures more understandable, up-to-date, and easier to maintain.

Currently, the following features are being developed:
    • automatic documentation from existing component libraries
    • Support for Siemens, Rockwell and CODESYS
    • Description of inputs, outputs, variables and parameters
    • Documentation of the basic functionality of individual modules
    • Using comments from functions, function blocks, and variables
    • fast regeneration on changes and better maintenance and versioning of growing libraries

Keep documentation closer to the code

An important approach is documentation based on existing comments within functions, function blocks, and variables. This information can be used to deduce what task a module performs, which interfaces are relevant, and how the function can be understood in an engineering context. This keeps the documentation closer to the actual code. At the same time, redundant maintenance is reduced because information no longer has to be manually maintained multiple times in different places.

Describe interfaces and functionality in an understandable way

In the generated documents, the interfaces of the modules are to be described comprehensibly. This includes inputs, outputs, variables, parameters, and the general functionality. Especially with growing module libraries, this transparency is important. Users must be able to quickly understand what a module is intended for, what information it requires, and what signals or data it provides. In this way, a technical module structure becomes understandable and usable documentation.

Faster updates for changes

A major advantage arises particularly when modules are further developed or adapted. Instead of manually revising existing documents, the documentation can be regenerated from the updated module library. This helps to keep documentation more consistent and up-to-date. At the same time, maintenance effort is reduced because changes in the code can be transferred more quickly into the documentation. This is an important step, especially in projects with many library modules or regular versions.

Improving the maintenance and versioning of libraries

As libraries grow, it becomes increasingly important to keep changes traceable. New versions, adapted interfaces, and extended functionalities must remain comprehensible not only in the code but also in the documentation. The PLC Doku Generator supports adapting documentation more easily to new versions. This improves maintainability and traceability in PLC engineering. In this way, documentation can become a strong part of the engineering process and be understood less as a subsequent manual task.

NexaCode Combines Code Generation and Documentation

With the PLC Doku Generator, NexaCode is evolving step by step. It's not just about code generation, but about a tool that brings together standardization, documentation, and maintainability in PLC engineering. The Code Generator supports the creation of standardized structures. The Doku Generator complements this approach by simplifying and keeping up-to-date the documentation of existing function block libraries. This creates a practical tool approach for engineering teams who not only want to efficiently create recurring structures but also document them understandably.

Conclusion: Documentation must grow with engineering

The NexaCode PLC Doc Generator addresses a crucial aspect of PLC engineering. Function block libraries are only truly useful long-term if their interfaces, functions, and changes remain clearly documented. Automatically generated documentation from existing libraries can help reduce maintenance effort, accelerate updates, and make versioning more traceable. With this, NexaCode is gradually becoming a tool that practically integrates code generation, documentation, and maintainability in PLC engineering.

Nächster Schritt

Discover NexaSwift Marketplace now