Skip to content

FBD editor

The Function Block Diagram (FBD) represents logic as blocks connected by wires: signals enter each block on the left and leave on the right. It is very convenient for combinational logic, comparisons and calculations with analog values.

FBD editor

  • The canvas is free and infinite (negative coordinates included) and shows a reference grid.
  • Drag with the right or middle mouse button to pan, and use the zoom buttons (or frame all) to adjust the view.
  • Drag with the left button on an empty area for a rectangle selection.
  • Blocks are placed where you drop them and can be moved by dragging.
Button Action
↶ ↷ ✂ ⧉ 📋 Undo, redo, cut, copy, paste and duplicate
Comment Adds a resizable text note to the canvas
Arrange Rearranges the diagram automatically
Input / Output Adds an input variable (reads) or an output variable (writes)
AND, OR, XOR, NOT Basic logic gates
Right side Grid and alignment tools, frame all and zoom

FBD editor library

Category Contents
Inputs / Outputs Input variable (reads a variable or a literal), Output variable (writes to a variable)
Logic AND, OR, XOR, NOT, NAND, NOR, XNOR, EQ_B, NEQ_B, BUF
Transfer, Arithmetic, Comparators, Selection, Math, Scaling… All standard blocks
Bitwise 16/32, Packing, Shift, Conversions, System Blocks available only in FBD (bit operations, type conversions such as INT_TO_REAL, cycle time, random numbers)
Project Your functions and function blocks

The complete list with pins is in the block library.

  1. Drag from an output pin (right side of a block) to an input pin (left side of another).
  2. One output can feed several inputs; branch points are marked with a red dot.
  3. An input accepts only one wire.
  4. To negate a Boolean input (IEC circle), right-click the input pin. Repeat to remove the negation.
  5. Double-click a free pin to automatically create an input or output variable already wired to it.

AND/OR/XOR gates accept more than two inputs: select the gate and use the + / − input buttons in the inspector.

  • An Input variable block can hold a variable (IO.Nivel) or a literal (20, TRUE, T#2s).
  • An Output variable block writes the value it receives to a variable.
  • Inputs accept variables and literals; outputs accept variables only.
  • Blocks with memory (TON, RS, CTU…) show the instance name above them (e.g. RS_Bomba), which is registered in the program’s Instance table.

ProtoCode works out the execution order from the signal flow: a block is evaluated after every block feeding its inputs. There is no need to number blocks.

With View states on, Boolean wires are coloured (green TRUE, red FALSE) and the current value is shown next to every pin, numeric signals included.

FBD during simulation