Dieser Artikel ist derzeit nur auf Englisch verfügbar.

MXAM for Beginners: An Introduction to Static Testing with MXAM
In the automotive and automation industries, practitioners in Model-Based Development (MBD) aim to ensure model quality while maintaining model efficiency. In this context, the effective use of modeling tools becomes particularly crucial. The right tools not only analyze and test model quality through modeling standard checks but also automatically improve the model based on the analysis results. This article introduces the widely recognized static testing tool - MES Model Examiner® (MXAM). This article provides an in-depth understanding of how MXAM can effortlessly help you achieve high-quality modeling.

Getting Started: What is MXAM?
MXAM is a professional tool for comprehensive static analysis of MATLAB/Mathworks Simulink, Stateflow, Embedded Coder, and TargetLink models. It is primarily used on the left side of the V-model software development process, focusing on the design phase. MXAM covers the entire process from architecture design to unit design and implementation, ensuring model quality and compliance with industry standards such as ISO 26262. Since MXAM v10.0, MES Model & Refactor® (MoRe) has been integrated into MXAM. MoRe simplifies and accelerates model creation and refactoring, making it a valuable extension to MXAM’s capabilities.
Static testing can be executed through the workflow in the model development process. MXAM provides strong support for modeling at different stages of the workflow. As shown in the figure below, the workflow begins with model creation, followed by model analysis of model metrics and modeling guidelines. This analysis yields a clear and comprehensive report, which serves as the basis for promptly addressing and resolving any issues encountered in the model. Ultimately, this ensures the model meets quality gate requirements, facilitating high-quality modeling with ease.
In summary, MXAM mainly supports:
- Continuous integration in static analysis
- Modeling guidelines checking & automated violation repair
- Model metrics evaluation & structure analysis
- Model refactoring and auto layout (functions from MoRe)
- Model compliance with safety or quality industrial standards
The integration of these functions makes MXAM a professional and comprehensive tool for static testing. The following section provides a detailed introduction to further explore these features.

Why Choose MXAM for Static Model Analysis?
Model-Based Development (MBD) relies on a requirement-based, test-driven workflow to continuously ensure quality. Both design quality and functional quality are equally important, as well-structured model design significantly enhances functional suitability.
How can model design quality be ensured? Static model testing helps engineers guarantee the model design suitability. It not only improves models already in development but also supports early quality assurance——helping identify issues before code generation and thereby enhancing both model and code quality.
In practice, MXAM supports highly automated static analysis and focuses on improving the readability, robustness, and error prevention of models, while also enhancing the quality of the generated code. Modeling guidelines play an important role here. The figure below presents a subsystem of a Simulink model:

Several issues are evident in this model, such as:
- Issue 1: The block name should be positioned below the block, not above.
- Issue 2: Constant blocks should not use specific numeric values (e.g., "5" or "10") directly as names; instead, they should be defined as parameters. Exceptions are "0" and "1".
- Issue 3: The subsystem ports are misaligned, affecting model readability.
- Issue 4: Blocks should be clearly identifiable, but this instance does not comply with layout modeling guidelines.
- Issue 5: An input port is hidden within the system layout, which reduces model transparency.
- Issue 6: The Product block should not have more than two input ports, because this can lead to unexpected results.
These issues significantly degrade the design quality of this Simulink model. The figure below shows the optimized version of the model after applying modeling guidelines with MXAM. All previously discussed issues have been accurately corrected, leading to a substantial improvement in model readability and code quality:
It is evident that evaluating a model’s compliance with modeling guidelines is crucial for ensuring model quality in practical applications. This process primarily assesses model layout, data and control flow, data types, and configuration settings. MXAM covers more than 700 modeling guidelines: from MISRA, MAB, MES, or other applicable modeling specification documents. Following the analysis, MXAM provides options to automatically repair the identified errors in just one click.
In addition, models may follow design principles derived from functional safety and are achieved through the assessment of model metrics defined by the respective standards. For example, the ISO 26262-6 provides specific recommendations and principles for automotive software architecture in software-level product development. Key metrics include model complexity, size, incoherence, clone detection, and more. By using MXAM, the validation and analysis of these model metrics can be implemented early in the model development process, enhancing model quality while ensuring the stability and safety of the software system. Read the article: “Do You Want to Assess Your Model's Architecture?” to know the details.
This raises several important questions: How to improve the layout of the model, and automate some repetitive actions? Now part of MXAM, MoRe is here to provide support. With 30 actions across 6 categories, MoRe streamlines the modeling processes, saves time, and enhances overall model quality.

Working with MXAM: A Glimpse
To begin working with MXAM, a project needs to be set up, as it is the basis of each analysis. Please refer to MXAM FAQ page to see how to set up a project, select the model, and start analyzing.
By initiating model analysis, MXAM provides users with a detailed analysis report on the model’s compliance with selected modeling guidelines. As shown in the below figure, the analysis results are displayed in a structured results view, offering clear insights into potential issues and areas for improvement.

Regarding the presentation format of the tree menu, as shown in the figure below, the MXAM report view offers two different navigation options:
- Document Navigation: Displays aggregated analysis results at each level of the report and document, including model name and analysis completion time. Users can also view analysis results using a tree structure in the toolbar.
- Artifact Navigation: Presents analysis results based on the model’s structural hierarchy, displaying aggregated results for the corresponding system or subsystem in a model structure tree format.

In terms of content, the figure below presents the model compliance report view in MXAM, it displays Findings: A list of compliance analysis results for the model. Various analysis components are available with just a click:
- Metrics – Relevant indicators from the model architecture analysis
- Annotations – A list of comments related to model compliance
- Analysis Configuration – Details of the model analysis settings
- Metrics Summary – A summary of key model analysis metrics

Users can also select and view specific analysis results through the Menu or Filter options. Detailed information on the analysis findings can be accessed in Finding Details view. As shown in the below figure, users can review detailed descriptions of violations against the relevant modeling guidelines, along with the corresponding analysis results.

Findings are displayed with specific paths (Path) and block names (Name), along with the exact reasons for the failed finding. Users can directly navigate to the location within the model where a guideline is violated via hyperlinks embedded in the path and block name. Additionally, the Repair Finding option allows users to fix errors with a single click, streamlining the guideline violation resolving process.
For modeling guidelines, take the guideline mcheck_misra_slsf_030_c as an example. On the details page (see the figure below), users can find a comprehensive description of this guideline, including the pass-fail criteria that determine whether a check item complies with the rule. Additionally, the page provides corresponding solutions, and a detailed description of the repair actions required to resolve any issues.
In MXAM, the final report can be conveniently exported in various formats, including HTML, PDF, Excel, XML, and mxmr (from MXAM).
Further “Quick Start Offers“ for MXAM Beginners
To provide comprehensive and practical support for MXAM beginners, MES has prepared a wide range of learning materials and training classes. Feel free to explore them and know more.
Webinar: MXAM in Action
In this webinar we showed you that MXAM is the leading tool to ensure the comprehensive static analysis of your Simulink, Stateflow, Embedded Coder, and TargetLink models.
Training: Our Training Offers for MXAM
We offer various training classes on MXAM-related topics to meet the needs of MXAM users at all levels: MXAM tool training for beginners and advanced users. Check the offer and secure your spot!