This file contains some links and some videos for OFB usage in Libre/Open office graphic programming, code generation and test

New created on 2025-March-27: Git repository on Gitlab. (The repository itself is grown since 2019):

[title="BandpassFilter_FBgl_srcC-en"

FBcl means 'Function Block Connection Language' which is the textual description of the graphic. The idea comes from ~2018.

What is the approach? Drawing the software with graphic and code generation in C/++ (maybe later also in Rust, or in Java) so that the functionality is seen and understandable by everybody with physic knowlege, obviously, no code lines. But the code lines are generated and follows guaranteed the graphic. Graphical software development does not save effort (money) for development. It improves the documentation! That’s the benefit. The basis for the graphics should be an available, proven tool (without basic costs, usable by anyone at any time). LibreOffice was chosen for this purpose. It is well-known and easy to use for this approach of graphics. The translation is an algorithm written in Java, which reads the graphic data and have capabilities for Code generation.

In March 2025: Most of the functionality is given. My own main focus should now be on improving the comprehensibility of the sources (programmed in Java) All tagged or downloadable versions are (and should be in the future) tested and fulfill the examples shown. The second effort should go into the documentation. The state machines are not yet available, but are in progress. Follow the videos. They show what is available.

The page is in progress, not all is published yet. Most following content is from ~ 2024-May, docu partially newer. Please wait a short time and look later here to get current content.


A download zip file which contains all files to reproduce the content in the videos and have own experience is contained in

Hint: Use the newer file to test whether all features are ok, use the older one as fall back if you know that in the older version a detail has worked, to compare with the new one.

This are experience versions.

A documentation can be viewed or downloaded, see start of this page.

Older and not complete documentation:

Javadoc html of the converting tool

Note: Use two-page view if you have a larger monitor (1980 x 1020 or more). The documentation is page-oriented. The odd page should be on right side ('book view'), but because usual the Browser-pdf view don’t support the book view an empty left page is introduced for that.

1. First example, goal of graphic in Libre/Open office

CopyTplFirstModule
Figure 1. CopyTplFirstModule

This first video (12 min) shows how to copy and use the template in LibreOffice for a first simple own UFBgl-diagram. It shows the general approach drawing UFBgl diagrams.


UFBgl 2 CodeGenerationFirst
Figure 2. UFBgl-2-CodeGenerationFirst

This second video (16 min) shows the code generation for this first example,


2. Comprehensive example: Bandpass Filter for 50 Hz electrical grid

BandpassFilter FBgl srcC en
Figure 3. BandpassFilter_FBgl_srcC-en

This video (8 min) explains a more comprehensive module or graphical model. It is the first video for that example and shows the approach how to deal really with graphical modelling.


BandpassFilter Test Scope en
Figure 4. BandpassFilter_Test_Scope-en

This video (13 min) shows how test results are output in a curve view, and how the functionality can be designed, tested and improved in the graphic module, with help of execution the generated code.


CodeGeneration Scope en
Figure 5. CodeGeneration_Scope-en

In this video (10 min) it is shown how the code generation for this specific scope program is done, with preparing of an ethernet telegram to the scope "Curve View" application, inclusively generation of the configuration of the code generation script


3. Details about running mode

UFBgl 3 VisitDebugTheCode
Figure 6. UFBgl-3-VisitDebugTheCode

In this third video (6 min) it is shown in single step in the generated code how the initialization works. It is also the concept of ../../emC/index.html[emC] for the phases constructor, initialization and run.


UFBgl 4.AggregationInCtor
Figure 7. UFBgl-4.AggregationInCtor

This video (8 min) enhances the example in the video above with the possibility to assign the aggregation between the classes in the constructor instead in the init…​() routine. Both is possible.

Also the possibility of vice-versa aggregations are explained. But not full completely. The topic is, vise-versa aggregations in the constructor are not possible if allocated memory is used. Because the other instance does not exists if it is necessary for referencing in the constructor. That’s why aggregations can also be assigned in the init, after construction of all instances. This topic should be explained in an extra video, yet todo

4. Hints Handling load, file tree

Also handling with "load tools"


Hint for the file tree in the examples: The generally approaches for the file tree are described in ../../SwEng/html/srcFileTree.html.

It means here:

Working_tree_where_zip_is_unpacked
 +-tools           This is created after src/load_tools
 +-IDE             This is created after executing a +spawn_IDE_....bat
 |  +-Example_Component
 |     +-CB        for Codeblocks projects to execute and test
 |     +-MSC       for Visual Studio projects to execute and test
 +-src             The sources, only this directory is contained in the zip
    +-load_toos    To load the translation tools for UFBgl from vishia page
    +-src_emC      Version of used sources from emC (embedded multiplatform C/++)
    +-Templates_odg contains the odg template file, and makescripts to create onw stuff
    +-Example_Component
    |  +-IDE...        The IDE files to spawn it.
    |  +-+spawn_IDE_....bat click it to spawn
    |  +-odg           Here is the odg file for this example
    |  +-cpp           Some C/++ files
    |  |  +-genSrc     This are the destination for generated C/++-Files
    |  +-cmpGen        This directory contains the versions from older generations, to compare
    |  +-curveView     Files for the CurveView toool
    |  +-makeScripts   Files to translate the module.
    +-ExmplBandpass    It is such an example
       +-IDE
       +-odg           ... etc.