GUI Builder module
Table of Contents
This user guide explains how to use the GUI Builder module of imperix Cockpit to interact with imperix power converter controllers, namely the B-Box RCP the B-Board PRO, the Programmable Inverter and the B-Box Micro. This page describes in detail how to use this module.
For new users, it is recommended to read the following articles beforehand to get started with the imperix software development kit (SDK) and imperix Cockpit monitoring software:
What is the GUI Builder module
The GUI Builder module enables users to create custom dashboards for interacting with their user code running on an imperix controller.
Users can place a variety of widgets on a dedicated canvas to design tailored dashboards. These widgets are linked to user variables, allowing for real-time monitoring and modification of variables without requiring a rebuild of the control code.
This module can be integrated into a project view of Cockpit monitoring software alongside other modules, such as the Scope module and the Rolling Plot module, as detailed in the Cockpit – User guide.
Editing/Operating Modes
The GUI Builder module has two distinct modes: Editing Mode and Operating Mode. The user can switch between these modes by clicking the Edit/Stop Editing button in the top bar of the GUI Builder module.
Editing Mode
In Editing Mode, users can design and configure the GUI. The following operations are available:
- Add, remove, and configure widgets.
- Link user variables to widgets.
- Apply test values to widgets.
- Import or export a GUI Builder file.
Operating Mode
In Operating Mode, the GUI Builder module is linked to the target. Changes made within the GUI Builder module directly affect the user code running on the target.
In this mode:
- The GUI cannot be modified or configured.
- Users can only interact with the widgets themselves (e.g., adjust the values of command widgets).
When switching from Editing Mode to Operating Mode, the GUI Builder module widgets synchronize with their corresponding user variables. The values from the target are applied to the GUI Builder module, not the other way around.
Widgets
The GUI Builder module offers three types of widgets for tuning and visualizing user variables: Command widgets, Display widgets, and Graphic widgets. These widgets can be added to the GUI Builder module by dragging and dropping them from the widget library onto the GUI Builder’s canvas.
Commands
Command widgets can be connected to user variables linked to Tunable parameter blocks
Displays
Display widgets can be connected to user variables linked to Probe blocks or Tunable parameter blocks.
Graphics
Graphic widgets are visual tools to add to the GUI, they cannot be linked to any user variable.
How to configure a widget
To configure a widget, select it by either clicking on the desired widget or drawing a selection rectangle around it. When a single widget is selected, a configuration pane will appear on the right bar of Cockpit.
Note that the configuration pane will not appear if multiple widgets are selected.
From this pane, it is possible to:
- Lock/unlock the widget.
- Configure the widget’s label.
- Apply test data.
- Link the widget to a user variable.
- Set specific configurations for each widget type.
Alternatively, widgets can be configured using the context menu. The context menu can be accessed by right-clicking on a widget. It provides additional configuration options, such as aligning widgets or sending a widget to the back/front.
How to configure the label of a widget
Double-clicking a widget’s label enters label editing mode. While in this mode, a mini-toolbar appears in the top-left corner of the GUI Builder module, offering rich text formatting options.
How to select, move and place widgets
Widgets can be selected by left-clicking on them. To select multiple widgets, hold down the Ctrl key while clicking. Alternatively, widgets can be selected using a selection rectangle.
Once selected, widgets can be freely moved on the canvas or dragged into or out of container widgets.
To align widgets, right-click on one of the selected widgets and use the alignment options from the context menu.
How to link a variable to a widget
Before linking a variable, ensure a target is connected, that a user code is running, and that the GUI Builder module is in edit mode.
To link a variable to a widget, drag and drop a variable from the User Variables pane, located on the left side of Cockpit, onto the widget. Alternatively, click on the widget to link. Then, from the widget’s configuration pane, under the section “Variable”, choose the desired variable from the drop-down list.
How to zoom/unzoom
To zoom in and out, hold down the Ctrl key and scroll the mouse wheel up to zoom in or down to zoom out.
The current zoom level is displayed in the bottom-right corner of the GUI Builder module.
When widgets no longer fit completely on the screen, scroll bars will appear. Scrolling the mouse wheel up and down moves the vertical scroll bar. Holding down the Shift key while scrolling the mouse wheel moves the horizontal scroll bar left and right.
A Fit to Screen button is also located in the bottom-right corner of the GUI Builder module.
Autosave and Import/export
The GUI Builder module automatically and periodically saves its current state. This ensures that if Cockpit is closed and reopened, the current dashboard is saved and restored. However, if the GUI Builder module itself is closed or the project containing it is deleted, any unsaved work will be lost. To avoid this, the import/export feature can be used to save and reload dashboards created with the GUI Builder module.
The Export feature allows the user to save a dashboard, including any images added to image widgets or swappable image widgets. The Import feature enables the user to load previously exported dashboards into the GUI Builder module.