This document provides instructions on how to create a control model with imperix ACG blockset, starting from a blank Simulink model. This removes the need to start from a template file.
- Create a blank Simulink model (R2020a: accept when asked to switch to ert.tcl)
- Go in Model Configuration Parameters (Ctrl + E) -> Code Generation
- Browse for a System target file and select imperix_ACG_SDK.tlc
- Add imperix Configuration block to Model
- Either through the Library Browser under the imperix section
- Or by typing “Configuration” directly within the model
- That’s it!
imperix_ACG_SDK.tlc is not available in the Model Configuration Parameters
- In MATLAB, go in
imperix_ACG_SDK_setup.mto add paths for the imperix target to the MATLAB path.
savepathcommand makes the setup persistent but may not execute if you do not have admin rights on the computer (check MATLAB logs).
- An alternative is to use a startup script: create a file named
startup.mwhich contains the following code and place it in a folder which is in the MATLAB search path (for instance the MATLAB folder found in the Documents directory). If this script already exists, just add the following commands to the end of the file.
Code language: Matlab (matlab)
addpath('C:/imperix/BB3_ACG_SDK/simulink/target'); addpath('C:/imperix/BB3_ACG_SDK/simulink/blocks'); addpath('C:/imperix/BB3_ACG_SDK/simulink/functions');