I’m excited to share a tool I’ve developed to help with documentation: BRLibToHelp - an application that automatically generates CHM help files from your Automation Studio libraries.
This tool follow the guidelines from the Automation Help here Creating help documentation for user libraries
What Problem Does It Solve?
If you’ve ever created custom libraries in Automation Studio, you know that proper documentation is essential but can be time-consuming to create manually. This tool automates the entire process by:
Parsing your library files (.fun, .typ, .var) automatically
Generating HTML documentation for all functions, function blocks, data types, and constants
Compiling a CHM help file ready for integration with Automation Studio
Enabling F1 context-sensitive help - just like native B&R libraries!
Key Features
Complete Documentation Coverage
IEC and ANSI C libraries
Functions and Function Blocks
Data Types (Structures, Enumerations)
Constants and Variables
Input/Output parameters with descriptions
F1 Integration
The generated CHM files work seamlessly with Automation Studio’s F1 help system. Place the CHM in your library’s Help/ folder, and users can press F1 on a selected function or function block in the logical view.
Full Source Access & Easy Rebuilds
All HTML source files are generated in the build folder, giving you complete control. Edit the documentation directly, add custom content, and rebuild the CHM file anytime using the included batch file - no need to regenerate from scratch!
Use Cases
This tool is perfect for:
Engineering teams maintaining internal function libraries
Anyone who wants professional documentation without the manual effort
Try It Out & Share Your Feedback!
Want to give it a try? You can find the complete project on GitHub:
I’m actively looking for feedback to improve the tool! Whether you have suggestions, found a bug, or just want to share your experience - your input is greatly appreciated. Feel free to:
Thanks for the feedback!
Currently there is no command-line interface, but it’s a good point! I will create an issue to implement a simple command-line interface!
Hi, thank you for this tool! It works really well and easy, good job!
I cant imagine how much afford it takes but it would be really nice to do a code analyses with AI to create a time diagram and a machinestate diagram. For example: My Maschine has the State NotReady, Ready, Done and Error. Which variables have to change to reach another maschinestate.
To be honest, parsing the source code to detect CASE statement from ST programming language could be pretty easy but the complexe thing is to handle all the programming languages available. Also it can be pretty complexe depending on how the user implemented the machine state in the function / function block.
From my side, I always try to follow PLCOpen recommendations:
And to document the executing part of the function block, I often do it by hand or using little script to generate Mermaid diagram and edit it by hand.
I agree that it could be a crazy feature but seems too complexe to implement.
But if someone has an idea of implementation feel free to implement it and submit a pullrequest on the repo!
I’m not entirely convinced that this functionality belongs in AS or the AS Code extension, given its reliance on third-party executables and DLLs. While these dependencies are bundled into the executable for this project, they remain mandatory and add complexity.
CHM files feel outdated as a documentation format for code or applications. Instead, I’d advocate for an AS Code extension that generates Markdown documentation directly from a library. This approach aligns better with modern practices—it would allow documentation to live seamlessly in a Git repository alongside the source code, which is how I’d prefer to document my own libraries.