Updating CM4SL/TM4SL models containing user modifications to version 10.0
Question
How to correctly update user's custom CarMaker for Simulink (or TruckMaker for Simulink) models from versions 9.0.x/9.1.x to 10.0?
Please note that this article is valid for CarMaker version 10. For newer versions an update script (e.g. ModelUpdate_CM13.m) is provide to update Simulink models including user modifications.
Please refer to the Release Notes of your CarMaker version, for detailed information regarding the current workflow.
Solution
Typically, updating to a new CarMaker version involves 2 main steps as described in the Release Notes, namely Project folder upgrade and Updating the source code and other user specific extensions.
This article specifically focuses on the part about updating user's own CM4SL and TM4SL Simulink models to CM-10.0 and provides a simple automation solution to ease the process.
- As can be seen from the above image, which is an excerpt from the Release Notes, the fundamental model provided for CM4SL and TM4SL has been extended by the Suspension Forces block (highlighted above in red). In case of CarMaker, this additional block is located under generic/CarMaker/IPG Vehicle/CarAndTrailer/Forces
- It is necessary due to the introduction of Suspension Model Classes in version 10.0 and therefore is also indispensable for user's custom models which are to be updated from 9.x
- The regular Project Update step updates the standard templates (generic.mdl, generic_truck.mdl, etc.) which are part of the installation (highlighted above in green) and subsequently includes the Suspension Forces block automatically, if unmodified.
- In case the standard templates have been modified by user, backup copies of these files are created and the new templates from 10.0 installation are copied into the project folder.
- In case of user's own models (e.g. started from generic.mdl but saved under a different name after project-specific model additions), it is the user's responsibility to ensure that the Suspension Forces block is included AND signal routing in/out of the blocks (highlighted above in yellow)
- If this block is missing, the following error is reported by the CarMaker S-function upon starting a TestRun.
Script to automate the model update
- Depending on the number of projects to be updated and the models/project, the effort involved for this step can be quite high.
- The attached files provide an automation that can simplify this step, by automating the addition of the Suspension Forces block and the signal routing in all user's custom models under a project folder.
- Method 1: This approach provides an Add-On package and allows the user to use CM4SL/TM4SL GUI to trigger the update of user-specific models. It is intended for users working with entire CM/TM projects.
- Method 2: This approach provides the update script and blockset directly. It is intended primarily for Model Developers who work in CM4SL/TM4SL environments.
- A ReadMe and an illustrative .gif are included for each method.
- Date: 13.04.2021
- Product: CarMaker
- Version: 10.0
- Component: CM4SL
- Language: English
Tags
TM4SLProject Update
Matlab
Simulink