User guide

REX Controls s.r.o.

Version 2.50.7
Plzeň (Pilsen), Czech Republic


Chapter 1

REXYGEN Studio is a graphical tool designed for a creation of real-time control algorithms with the support of a large function block library of the REXYGEN system [1]. A developer may utilize many function blocks from simple comparators and timers to advanced and specialized blocks designated for analog signal processing and regulation. There are various specialized regulators including PID regulators with automatic tuning of parameters. Any algorithm developed in the REXYGEN Studio may be instantly compiled and downloaded into arbitrary target device (Linux IPC, WinPAC, Raspberry Pi etc.). After the algorithm is successfully compiled and downloaded to the target device, it is possible to switch REXYGEN Studio to a Watch mode in which all parameters and variables of all function blocks may be inspected or adjusted. A connection may be established locally or over Internet using standard protocol IPv4 or IPv6. A secure connection over SSL protocol is supported.

A detailed documentation for function block library may be opened at any time with the F1 key. The documentation is installed automatically in the default setup configuration and we advise not to uncheck it.

1.1 Starting REXYGEN Studio

The REXYGEN Studio development tool may be started without any parameters by double-clicking on its icon in a start menu of Windows. A main window of REXYGEN Studio consists of four main parts: a main menu (1), a toolbar (2), a working area (3) and a statusbar (4). There may be several files opened in the working area simultaneously. A name of opened and active file is shown in the title of REXYGEN Studio main window with an asterisk when there are unsaved modifications.


Figure 1.1: Main Window of REXYGEN Studio

1.2 Working Area

A working area is a main area where windows with opened project files are placed. Files with function block diagram have a file name extension .mdl. A zoom operation i supported in a function block diagram editor. Zoom in/out operations may be performed using a mouse wheel while keeping the Ctrl key pressed, clicking on those commands in the menu or in the toolbar and also by pressing the keys F2 and F3.

1.3 Application Modes

The application provides two modes: a design mode and a watch mode. An algorithm is developed in the design mode by drawing function block diagram on the canvas and by configuring function block parameters. The application may or may not be connected to a target device.

When connected to the target, the application may be switched to the watch mode. In the watch mode, the developed application can’t be modified. Instead, the function block diagram serves as a diagnostic interface to the running algorithm. User may inspect all signals, parameters, trends and detailed diagnostics of the target.

1.4 Main menu

1.4.1 File

The File menu provides commands which are connected with files.

  • Start: Opens a simple start dialog with multiple options that are available at the beginning of developing a control algorithms with REXYGEN Studio. The option is available only if no project is opened.
  • New: Creates a new diagram file.
  • Open: Opens an existing diagram file.
  • Close: Closes an active file.
  • Close All: Closes all opened files.
  • Save: Saves an active file.
  • Save as: Saves an active file under a new name.
  • Save all: Saves all opened files.
  • Start with a Plain Project: Creates and opens a new plain project.
  • Start from an Example Project: Opens a dialog in which a user may select an example project that is provided within installation of REXYGEN. The selected project is copied into specified directory and opened. A user may start developing a new application by creating a new project from one of these examples.
  • Open Project from Target Device: Storing of project source on target device is supported starting with REXYGEN version 2.50.4. If a project is stored on a target device, a user may upload it to the computer and open it using this option.
  • Export: Exports an active file to SVG format.
  • Set as Project Main File: Selects an active file as a main project file.
  • Save Project as: Duplicates an opened project into another directory, closes an opened project and re-opens it from the new location.
  • Print: Prints an active file.
  • Print Preview: Shows print preview before printing.
  • Print Setup: Shows printing options.
  • Exit Closes all files and exits REXYGEN Studio.

1.4.2 Edit

The Edit menu provides commands which are connected with objects and function blocks.

  • Undo: Discards last editing operation.
  • Redo: Restores discarded operation.
  • Select All: Selects all object in an active window.
  • Cut: Cuts selected objects.
  • Copy: Copies selected objects into a clipboard.
  • Paste: Pastes objects from a clipboard.
  • Properties: Shows properties of selected objects.
  • Subsystem mask: Shows a mask of a subsystem.
  • Look under mask: Opens a selected subsystem in a new windows.
  • Create subsystem: Create a new subsystem from selected blocks.

1.4.3 View

The View menu provides commands and operations with REXYGEN Studio windows and working area.

  • Toolbar: Show/hides the main toolbar.
  • Statusbar: Shows/hides the statusbar.
  • Zoom in: Zoom into in an active window.
  • Zoom out: Zoom out in an active window.
  • Zoom to 100 : Shows an active windows in default zoom scale.
  • Zoom to fit: Shows an active windows that all object fit to the screen.
  • Block Library: Opens a library with with function blocks.
  • Block Library on top: Ensures that block library window is always visible.
  • Compile window: Shows a window with all messages from last compilation.

1.4.4 Project

The Project menu provides commands for project compilation, download, activating the Watch mode and watching signals.

  • Compile: Compiles an active project into a binary configuration.
  • Compile and Download: Compiles an active project and downloads the binary configuration into specified target if compilation is successful.
  • Activate Watch Mode: Activates the Watch mode of REXYGEN Studio. A connection dialog is opened if REXYGEN Studio is not already connected to a target device. The Watch mode is indicated by a gray background of diagrams. A user may start monitoring signals after the Watch mode is activated. REXYGEN Studio remains connected to the target even if switched back to design mode and all diagnostic data acquisition tasks continue in background.
  • Watch Selection: Starts monitoring of blocks that are selected.
  • Exclude from Watch: Stops monitoring of blocks that are selected.
  • Signal to Watch: Shows a signal tree and advanced options for signal monitoring.
  • Check Parameter Changes: User may check parameter changes made in the watch mode anytime until the watch mode is left. User may apply such changes back to the drawing or discards them.

1.4.5 Target

The Target menu provides commands and operation for communication with a target device, signal monitoring and detailed on-line diagnostics. Some commands are available only after a connection with a target device is established.

  • Connect: Connects to a target device. The user is asked for target address and connection options. The application remains in design mode.
  • Disconnect: Disconnects from a target device and switches to design mode.
  • Identify: Shows target version and identification parameters of running configuration.
  • Show System log: Downloads and shows messages from a system log on a target device.
  • Configure System Log: Shows a dialog for configuration of system log on a target device.
  • Diagnostics: Shows a window with detailed diagnostics of a target device. The window is very similar to the REXYGEN Diagnostics diagnostic tool.
  • Backup: Offers a way of creating a backup of a control algorithm that is stored on a target device. A user specifies a local file name into which the backup is stored. These components of control algorithm are stored into a backup: executive, human-machine interface and project source (if project source is stored on the target). A text file is created beside the backup that contains a detailed information about the content of the backup.
  • Restore: Offers a way of restoring a control algorithm from a backup file to the target device. The operation is very similar to a download operation but a user may specify a file name of a backup.
  • Change password: Shows a dialog in which a password of a current user may be changed.
  • Licensing: Shows a dialog in which active licensed options are shown an a user may eventually add or modify licensing keys.
  • Web Interface: Opens a web interface of a target device in a user’s default web browser.

1.4.6 Project

1.4.7 Tools

The Tool menu is a shortcut for launching another tools available within REXYGEN.

  • RexView: Launches REXYGEN Diagnostics, a diagnostic tool for detailed inspection of running algorithm on a target device.
  • Cam Editor: Launches an editor for cam profiles and curves.
  • SFC Editor: Launches an editor for state automaton.
  • RexHMI Designer Launches a RexHMI Designer, a tool for a simple creation of web-based Human-Machine interface.

1.4.8 Settings

Dialogs with global a and diagnostics options are accessible within the Settings menu.

1.4.9 Window

The Window menu offers operations for an arrangement of opened windows.

1.4.10 Help

  • Function blocks manual: Shows a detailed documentation for the all function blocks that are available in the function block library of REXYGEN.
  • Examples: Shows all available examples and templates.
  • Documentation: Shows a list of documentation and manuals that are available for REXYGEN.
  • About RexDraw: Shows a version information about the REXYGEN Studio.

Chapter 2
Function blocks

All function blocks in the function block library of REXYGEN are described in the reference manual [1].

2.1 Using Function Blocks

All function blocks that are available in REXYGEN and that may be added into a function block diagram are accessible within a function block library dialog that is shown from menu View/Block Library or by Ctrl+L shortcut. The blocks are categorized into several groups by their intended purpose. A user may search for a specified function block by typing a name or a part of a name. The searching is performed only in a single library if the library is selected. A block is added to the diagram by simple drag and drop operation. Both the symbol of a block and then name of a block may be dragged.


Figure 2.1: Function block library

2.2 Block Properties

All block properties are modifiable from the properties dialog. The dialog is invoked by the Ctrl+E shortcut, by selecting Edit/Properties from the menu or by double-clicking on the block in design mode. Dimensions of a block on the canvas may be changed with a mouse by first clicking on the block a then dragging any of highlighted corners. A block may be moved by mouse or by keyboard arrows while the block is selected. The block may be rotated using the Ctrl+R shortcut.

Properties that may be modified by a user:

  • The Block tab: a block name, a block orientation, parameters,
  • The Arrays tab: array parameters,
  • The Font tab: a font type, a style, a size,
  • The Colors tab: a font color, a background color.


Figure 2.2: Block Properties

2.3 Common Block Properties

It is possible to modify common block properties by selecting several block at once. Such a multi-selection is performed by selecting arbitrary blocks one-by-one while keeping the Shift key pressed or by selecting an arbitrary area with a mouse while the left mouse button is pressed.

Properties may be edited using the property dialog by pressing Ctrl+E or by selecting Edit/Properties from the menu after arbitrary blocks are selected.

Only parameters that are common to all selected blocks may be edited in such a way. Other properties must be edited manually.

2.4 Connecting Blocks

To build a control algorithm the blocks have to be put onto the drawing canvas of a diagram, their input and outputs interconnected and their parameters adjusted. It is expected that the user is familiar with the Function Block Diagram (FBD) graphical language for programmable logic controllers.

The blocks are connected by so-called connection lines or links. A link has always a single source and one or more destinations. A source may be any block output and a destination is any block input. It is not possible to connect two outputs together. A warning is shown during compilation when a source or destination of a link is not connected.

A links are created using the mouse by clicking on any input or output pin and holding the button pressed while moving towards another pin. A red dashed line is show until the final pin is reached. When the final pin is reached, a green bold line is shown. The line becomes a standard link after the mouse button is released.

A branch may be created by right clicking on any point of an existing link. A link may be deleted by pressing the Delete key when the link is selected. A link may be disconnected from a pin by right clicking on the pin and selecting Break/Disconect line from the context menu.


Figure 2.3: Connection Between Blocks

2.5 Persistent memory

REXYGEN supports permanent storage of function block parameters and some specified function block internal states. Persistent memory performance is target platform specific. If the target platform does not have any supported persistent memory available, the permanent parameters will be stored to the permem.dat file by default (to the same directory as exec.rex is stored - \rex\rexcore on Linux machines or C:\ProgramData\REXControls\REX_<version>\RexCore\).

Persistent memory is internally limited by maximum 2048 bytes per function block (possible problems can come in using long strings).

In order to store the function block parameters, the checkbox Permanent in block properties must be checked - see Fig. 2.2. All function block parameters and some internally selected block states will be stored (excluding arrays). Internally selected block states list:

  • INTE:x
  • SINT:x
  • COUNT:cnt0

Default save period is 300 s or the period is inherited from the first hard drive archive if present.

The persistent memory can be reseted or cleaned up using Download Dialog - see Fig. 3.1. Switch Download option in Download Dialog to Expert mode and choose between Reset persistent memory or Cleanup persistent memory. Reset persistent memory will replace entire persistent memory however Cleanup persistent memory will erase just the parameters which are not used any more.

Be aware that the block parameters will be overwritten with the ones stored in persistent memory immediately after swapping executives if the Permanent option is enabled for the function block.

2.6 Function Blocks Reference

A detailed description of a block that is selected is invoked by the F1 key or by selecting the Help from its context menu. A HTML documentation is opened by default. If the HTML documentation is not availabl (it was deselected during installation), REXYGEN Studio tries to open a PDF documentation and a user must scroll down to the arbitrary block manually.

Chapter 3
Communication with a Target

A project must be compiled and the resulting binary configuration has to be downloaded into the target device in order to put a control algorithm into operation. Both actions are performed directly from the REXYGEN Studio development tool.

3.1 Project Compilation

After an algorithm is designed, it is necessary to validate its structure, device configurations and block interconnections by a process called compilation. The compilation results in a creation of a binary file called binary configuration which may be downloaded into a target device. The binary configuration is a platform/target independent file format with a .rex file name extension. The format of the binary configuration is optimized for fast-processing on a target device and has several consistency check mechanisms.

Warnings and errors may occur during a compilation. All warnings, errors and other various informational messages are print into the compiler console. A warning does not cause a termination of the compile process. But it should be observed carefully as it may probably indicate a problem that may lead into an unexpected behavior of the algorithm. All errors are treated as serious problems and cause a termination of the compiling process and no binary configuration is produced. All errors and warnings are indicated by theirs respective numbers and textual information message.

A compilation is started from the Compiler menu. A project is compiled by selecting Compiler/Compile from the menu, clicking on the icon on the toolbar or using the F5 shortcut.

3.2 Downloading Configuration

A configuration is downloaded into the target device by selecting Compiler/Compile and Download from the menu, clicking on the icon on the toolbar or using the F6 shortcut.

A compilation of a project into a binary configuration is always performed before it is downloaded into the target device to ensure consistency. If an error occurs during the compilation, a compiler window is shown and the download operation is not available. A user must fix all errors indicated by the compiler before he or she may process with the download.


Figure 3.1: Project Compilation and Download Dialog

3.3 License Activation

Before a binary configuration may be downloaded and activated the target has to be properly licensed. For a permanent target operation a full target license must be obtained from the REXYGEN Controls company. A DEMO license is available for experiments and development. A DEMO license may be obtained directly from the REXYGEN Studio application while connecting to unlicensed target. A user may also get the DEMO license from the web page of the REXYGEN Controls company.

An information dialog about licensing is shown while connecting to an unlicensed target (figure 3.2). A user has the following three options:


Figure 3.2: Missing License Notification

Get DEMO License: Select this option if you want to obtain a DEMO license directly by filling-in name and email address to which a licensing key is sent (figure 3.3).


Figure 3.3: DEMO License Dialog

I already have a license: Select this option if you already have a valid license and you want to submit a licensing key into target device (figure 3.4).


Figure 3.4: Insertion of a Licensing Key

Continue: Select this option if you want to continue without licensing the target. But be aware that most of its functionality is not available in an unlicensed mode.

3.4 Watch mode and Diagnostics

A comprehensive diagnostic tool is now integrated directly into the REXYGEN Studio development tool. All the diagnostic functionality that was previously accessible only from the REXYGEN Diagnostics diagnostic tool is now also available from the REXYGEN Studio.

Before using the diagnostic tool, a binary configuration must be successfully downloaded into the target device, loaded and started. For information about downloading a binary configuration into the target device see the section 3.2.

A diagnostic tool in REXYGEN Studio may be used only when there is an on-line connection established with the target device. The connection is established by clicking on Target/Connect from the menu, clicking on the icon on the toolbar or using the F7 shortcut. The connection may also be established after a binary configuration is downloaded into the target device and a dialog is shown in which a user is asked if the on-line connection with the target should be preserved and the so-called Watch mode should be activated.

A Watch mode is indicated by a gray background of all windows with function block diagrams. It is not possible to add, delete or move function block or connections between blocks in the Watch mode. Instead, a user may inspect signals of all block inputs, outputs and parameters and observe all signal values in real-time with a refresh period that may be adjusted in the settings dialog and which is one second by default. This is called Signal Monitoring.

3.4.1 Monitoring signals

It would be inefficient and bandwidth-consuming if all signals were monitored immediately when the Watch mode is activated. For that reason, only the DISPLAY blocks are monitored automatically. A user has to switch other function blocks into the so-called Monitoring State if signals of a particular block should be monitored.

When a block is in the Monitoring State, all input and output values are displayed at the corresponding pin of the monitored block. A block is added to the Monitoring State by selecting Project/Watch Selection from the menu or using the Ctrl+W shortcut. A block is removed from the Monitoring State by selecting Project/Exclude from Watch from the menu or using the Ctrl+Shift+W shortcut.

The values of parameters are shown in a floating yellow window when a user positions the mouse cursor over a function block. Parameters may also be inspected and adjusted from the on-line block properties dialog that is invoked by pressing Ctrl+E. Be careful when modifying the values of parameters as changes are immediately committed to the target when the OK or Apply button is clicked.

A dialog that allows to transfer all changes to the parameters made in the Watch mode back to the drawing is displayed before disconnecting from the target device. A user may accept or discard changes to all parameters individually. This simplifies an effort to keep a project synchronized with the run-time configuration.

A user should always observe a right part of the status bar where a state of the connection with the target device is indicated. A green color indicates that connection has been successfully established and the data is communicated periodically without any errors. A red color indicates that the connection with the target device has been unexpectedly closed or an error occurred during the data exchange.


Figure 3.5: Monitoring and Diagnostics in the Watch Mode

3.4.2 Viewing trends

The blocks TRND and TRND are available in REXYGEN to monitor signals over a period of time. The TRND allows to save up to 4 signals and the TRNDV allows to save up to 64 signals into the memory of the target device. The samples are stored synchronously during a task execution. This allows to store and observe very fast processes without loosing a single sample.

The diagnostic tool of the REXYGEN Studio makes possible to show all the data stored in the memory of the TRND block in the Watch mode. To show a windows with all data signals shown in a graphical trend simply double-click on a TRND block while the REXYGEN Studio is in the Watch mode. A data may be zoomed, a scale and a range of both axes may be changed and the data may also be exported do a CSV file from the window.

3.4.3 Viewing System Log

A system log with error, warning and other informational messages with timestamps is present on every target device. A user may display a content of the system log directly from the REXYGEN Diagnostics selecting Target/Show System Log from the menu or by clicking on the icon on the toolbar. A content of the system log is uploaded and shown in a dialog. A user may browse all messages, filter the content or export selected items into a CSV file.

The types and severities of messages that are written to the system may be configured by selecting Target/Configure System Log from the menu. The Safe print flags to the target option must be selected if it is required to store the configuration of the system log permanently on the target device. A last saved configuration is loaded during the next system boot if the option remains unselected.

3.4.4 Diagnostics

A detailed diagnostics tool may be launched by clicking on Target/Diagnostics from the menu or by clicking on the icon on the toolbar. The tool provides all the functionality that was previously available separately in a stand-alone application, the REXYGEN Diagnostics. The integration of the REXYGEN Diagnostics application into the REXYGEN Studio brings many advantages such a sharing a single connection with the target device, faster start-up and better user experience. The diagnostic tool window is closed automatically when a user initiates a disconnection from the target device.

Chapter 4
Human-Machine Interface

Another option for signal monitoring is to use any of Human-Machine Interfaces that are available within the REXYGEN. A web interface with a human-machine interface may be opened from REXYGEN Studio by selecting Target/Web Interface. Please, see the documentation of the HMI block in [1] and [2] where all available options provided by REXYGEN are described.


Figure 4.1: WebWatch – Monitoring Signals Using a Web Interface

Chapter 5
Stand-alone Tools

5.1 REXYGEN Diagnostics

The REXYGEN Diagnostics may be started directly from the REXYGEN Studio by clicking on Tools/RexView from the menu or by clicking on the icon on the toolbar.

The REXYGEN Diagnostics provides all the functionality that is also available from the diagnostic tool in the REXYGEN Studio in a stand-alone application.

5.2 HMI Designer

The HMI Designer may be started directly from the REXYGEN Studio by clicking on Tools/RexHMI Designer from the menu or by clicking on the icon on the toolbar.

Chapter 6
Supported Operating Systems

All 32-bit and 64-bit Windows 7 and later operating systems are supported by development tools of REXYGEN. Windows Vista may also work but no guarantee nor support is provided for this version.

It is also possible to run all development tools on GNU/Linux on a 32-bit or 64-bit x86 platform using Wine from We actively test the REXYGEN installer for Windows in Wine and we are submitting patches to make everything work smoothly. User should have at least version 2.0 of Wine installed. A corefonts must be installed using the command winetricks corefonts. Nevertheless, we give no guarantee that everything works always as expected in Wine and we provide no support for using REXYGEN in Wine.

Only REXYGEN Diagnostics is supported to run on GNU/Linux operating system natively and only the Debian Linux distribution is supported. Other development tools are not supported on Linux yet.

Chapter 7
Keyboard Shortcuts

Keyboard shortcut Function (as presented in the menu)
CTRL+N New File
CTRL+O Open File
CTRL+S Save File
CTRL+P Print
CTRL+A Select All
CTRL+V Paste
CTRL+R Rotate Block Clockwise
CTRL+SHIFT+R Rotate Block Counterclockwise
CTRL+E Properties
CTRL+M Subsystem Mask
CTRL+U Look under Mask
CTRL+G Create Subsystem
CTRL+L Block Library
F2 Zoom In
F3 Zoom Out
F4 Zoom Default
F1 Help
F5 Compile
F6 Compile and Download
F7 Connect
F8 Disconnect
F9 Activate Watch Mode
CTRL+W Watch Selection
CTRL+SHIFT+W Exclude from Watch

Table 7.1: Keyboard shortcuts in REXYGEN Studio

List of Figures


[1]   REX Controls s.r.o.. Function blocks of REXYGEN – reference manual, 2018.

[2]   REX Controls s.r.o.. REXYGEN HMI – User manual, 2018.

Documentation reference number: 9228

2018 © REX Controls s.r.o.,