Table of Contents
This note gives step-by-step instructions in order to install the Software Development Kit (SDK) for the Automated Code Generation (ACG) from Simulink or PLECS.
A general overview of software-related notes is given on this page.
The Automated Code Generation (ACG) SDK enables engineers to program imperix controllers directly from Matlab Simulink or PLECS. This Software Development Kit (SDK) provides a blockset and an automated toolchain to achieve both simulation and device programming with just a few clicks. The kit also includes Cockpit, the built-in software tool for real-time access, monitoring, and tuning of the controllers’ variables.
|ACG SDK used with||Simulink||PLECS|
|Imperix tools||Imperix ACG SDK||Imperix ACG SDK|
|Main simulation software||Matlab Simulink||None required|
|Plant simulation plug-in||– PLECS Blockset for Simulink,|
– Simscape Electrical
|Imperix ACG SDK||Free software. Paid license only for loading code on B-Box or B-Board.|
|Matlab Simulink||Paid license issued by MathWorks|
|PLECS standalone||Paid license issued by Plexim (trial version available)|
|PLECS blockset for Simulink||PLECS blockset: Paid license issued by Plexim (trial version available)|
PLECS Viewer: No license (editing of model disabled)
|Simscape Electrical||Paid license issued by MathWorks|
Installing the software
In order to generate run-time code for B-Box RCP or B-Board PRO, and/or simulate this code, the necessary software must be installed on a computer:
- Imperix ACG SDK
- The main simulation software (Matlab Simulink or PLECS)
- In case Simulink is used, for simulation: a plant simulation software (Simscape Electrical or PLECS blockset for Simulink). With PLECS, no extra simulation software is needed.
|Operating system||≥ Windows 8 (not tested on Windows 7 – macOS not supported)|
Imperix ACG SDK
The ACG SDK can be downloaded directly from imperix’s website, under Support > Downloads.
Download the latest version and follow the install instructions. It is highly recommended to keep the default destination folder
C:\imperix\BB3_ACG_SDK and to avoid spaces or special characters in the pathname.
At the end of the installation procedure, the installer shows detected MATLAB installations as shown on the image below. Clicking Next opens the selected MATLAB instances and launches the script
<install dir>\simulink\target\imperix_ACG_SDK_setup.m. which setup the imperix ACG SDK target path.
imperix_ACG_SDK_setup.mscript can be manually executed from the MATLAB Command Window.
Main simulation software
[Option 1] Matlab Simulink
A compatible version of Matlab Simulink can be downloaded directly from MathWorks’ website. The compatible versions are R2016a and newer.
To activate a Matlab installation, a paid license issued by MathWorks is needed. This license is neither provided nor sold by imperix.
When prompted (figure below), select the following products during the installation :
- Matlab Simulink
- Embedded Coder
- Matlab Coder
- Simulink Coder
They are the only mandatory packages to start working.
Mex compiler add-on
When installed, launch Matlab and make sure that a MEX compiler for C++ language is installed.
The list of available compilers can be displayed with the Matlab command
If no compiler is configured, you can install MinGW-w64 directly from Matlab’s Add-Ons menu.
- On the MATLAB Home tab, in the Environment section, click Add-Ons > Get Add-Ons.
- Search for MinGW or select from Features.
Alternatively, download and execute the installer proposed in the Matlab article “MATLAB Support for MinGW-w64 C/C++ Compiler”.
[Option 2] PLECS Standalone
A compatible version of PLECS Standalone Packages can be downloaded directly from Plexim’s website. The compatible versions are 4.4.2 and newer, in 64-bit.
Download link: https://www.plexim.com/download/standalone
To use PLECS with Imperix ACG SDK, a paid license is required. Both PLECS and PLECS Coder licenses are needed. These licenses are neither provided nor sold by imperix.
Installing “Imperix Controllers” support package on PLECS Standalone
In order to use Imperix library on PLECS standalone, “Imperix Controllers” support package needs to be installed.
- Launch PLECS and click on File > PLECS Preferences.
- In the Coder tab, change the Target support packages path and select the path to the “Imperix Controllers” support package installed with the Imperix ACG SDK.
- If the Imperix ACG SDK default destination was not changed, the target support packages path is
- Once the correct path entered, the “Imperix Controllers” should appear under Installed targets.
Note: When using multiple Target Support packages, PLECS requires that they are placed in the same folder. Therefore, the Imperix_Controllers support package folder in
C:\imperix\BB3_ACG_SDK\plecs can be moved to any location on your computer.
Plant simulation software
When using Simulink, third-party plug-in software and blocksets may be useful to ideally support computer-based offline simulation. Imperix recommends using
- Plexim’s PLECS Blockset for Simulink, or
- MathWorks’ Simscape Electrical.
The same installer includes the files for either:
- PLECS Blockset: allows to create, edit, save and simulate a PLECS electrical circuit inside Simulink. It requires a paid license from Plexim. The license is neither provided nor sold by imperix.
- PLECS Viewer: allows only to view and simulate a PLECS electrical circuit that has been exported to work with PLECS Viewer. It is free of use but doesn’t allow editing the circuit schematic.
Simscape Electrical is a Simulink toolbox that allows modeling and simulating electrical power systems. It requires a paid license from MathWorks. The license is neither provided nor sold by imperix.
To install Simscape Electrical, re-run the Matlab installer and select Simscape Electrical in the list of products to install.
Getting-started instructions regarding the ACG SDK can be found in the following notes
- Getting started (PN134) and Simulation essentials (PN135) are related to Simulink.
- Getting started (PN136) and Simulation essentials (PN137) are related to PLECS.
- Programming and operating imperix controllers (PN138) addresses the run-time execution.
- Cockpit – User guide (PN140) gives a full guide on how to use Cockpit monitoring software.