Table of Contents

FUPLA (Function Block Diagram) Language & Editor

FUPLA (Function Block Diagram - FBD) is a graphical programming language specifically designed for controller programming in the Mervis IDE. It is based on predefined blocks of code, where each block has a specific function, inputs, and outputs.

It is highly suitable for continuous processes, such as HVAC regulation and basic logic interlocking. Because the control logic is created simply by connecting blocks and variables, FBD is an excellent choice for users without deeper programming knowledge. In a single project, you can freely combine FUPLA with Structured Text (ST) depending on which language best suits each specific task.

Mervis IDE FBD Interface

Editor Structure and Workspace

Double-click a newly created program in the Solution explorer to launch the FUPLA editor. The editor follows a logical “Signal Flow” structure from left to right:

Resizing the Workspace & Ladders

You can increase or decrease the working area size using the grip points in the corners. You also have flexibility over the structural layout of your ladders:

Programming Workflow

To build an executable program, follow these standard proceedings:

1. Variable Placement

The work starts by placing the variables to read into the left ladder. Right-click a field in the ladder and select a command to insert an existing global variable or create a new one.

2. Adding Function Blocks

Right-click in the working area and select “Add library box”. Use the filter and/or arrow keys to locate the required function block, then click OK. Mervis IDE features a large library of default function blocks covering most basic PLC operations. If a required block is not in the list, most probably the library containing it is not referenced in the project.

3. Block Configuration & I/O Visibility

Click on any function block to display its properties in the property grid. In the Properties panel, the list of values is displayed, together with their values and visibility data. Here, the visibility of inputs, parameters, and outputs may be toggled, and fixed (default) values may be entered.

4. Wiring and Connections

Connecting blocks and input/output variables follows by dragging a connecting wire.

Editing Wires & Junction Points

The connecting wires can be edited by clicking an existing wire to view the editing points. You can change the shape by dragging its internal points, or move the endpoints to connect to a different input/output.

To organize a complex schematic, you can use knee points and junction points:

Color-Coded Wires & Debug Indicators

To help rapidly identify data types on the canvas, wire colors are hardcoded and automatically adjust for contrast in Light/Dark themes:

Data Type Wire Color
Booleans Blue
Analogs (Real/Float) Green
Pointers Brown
Others Black (or White Smoke in Dark Theme)

Additionally, when you are in Debug mode, the editor provides an immediate visual indication of boolean states:

5. Compiling and Deployment

Once your logic is wired, click the “Build solution” button to compile the program. Check for errors in the result window, and after fixing them, deploy the program to the controller.