What is MXRAY?
MXRAY is a tool that has been designed to perform architectural analysis on Simulink/Stateflow and TargetLink models, thereby supporting model development and the model review process. MXRAY has been developed to analyze models of every size: from single subsystems to complex models consisting of hundreds of subsystems and dozens of libraries. The results of analysis are compiled in reports designed for use in model development and model reviews. The reports can also be used to evaluate model quality as well as for project management purposes.
Highlights in MES M-XRAY® (MXRAY) v.4.0
- Extended support of a Jenkins-automated MXRAY analysis:
Use the MES Jenkins Plugin to easily set up an automated analysis with configurable success criteria.
- The level metric excludes libraries and referenced models when evaluating hierarchical levels
The following system requirements must be in place to use MXRAY:
- Windows (XP, Vista, Windows 7+8+10 - 32 and 64-bit versions)
- MATLAB® R2009b ... R2018b
- Simulink and Stateflow, depending on the models you wish to analyze
- (Optional) TargetLink V 2.x, 3.x, 4.x (base suite)
- (Optional) Excel for Windows
Update to the latest version
- If you added MXRAY folders permanently to the MATLAB path, please remove all these folders from the path.
- If you added a call to path_mxray to your startup.m and used a folder with version postfix (e.g. x:\project\matlab\mxray_3_7), then please update the call to the folder of the new installation (e.g. run('C:\Program Files\mxray_4_0\path_mxray');
- If you installed the old version to a folder with version postfix (e.g. x:\project\matlab\mxray_3_7), you can keep that directory as a backup.
- If you installed without version postfix, you could rename the old installation directory to one with version postfix as a backup.
- Then proceed according to the installation instructions given below (including license configuration).
- Extract the MXRAY zip file (e.g. mxray_4_0.zip) into a target folder with write access. Suggestions:
- C:\Program Files\mxray
- Note: If you want to install MXRAY on a Jenkins machine to use it together with the MES Jenkins-Plugin, it is recommended to skip the next steps and proceed with the license configuration. The next steps add MXRAY permanently to the MATLAB path. But for the Jenkins Plugin it is recommended to specify the MXRAY installation path in Jenkins' global tool configuration.
- Add a call to the path_mxray.m script from the target folder to your MATLAB startup.m file. Example call: run('C:\Program Files\mxray\path_mxray'); Please make sure, that there is no call to path_mxray of an old MXRAY installation left! If you are not sure whether you have any startup.m file yet, type which startup.m in MATLAB command line. If result is not empty, add the call from above to this file. If result is empty, create a new startup.m file in your userpath. Type userpath in MATLAB command line to get your userpath. Add the call from above to the newly created file (type also doc startup in MATLAB command line for help).
- Restart MATLAB. Please check if you correctly added the path_mxray call to your startup.m file by typing which('mxray') in the MATLAB command prompt which should return the path of the mxray.p file.
- Open MATLAB.
- Type mxray in the command prompt.
- If an 'Undefined function' error occurs, please ensure that you added the correct call to path_mxray to your startup.m (see installation instructions above). If a license exception occurs, please ensure that you followed the license configuration instructions above.
Starting an analysis
- Open a model in MATLAB/Simulink
- Press "Add open models" in the MXRAY GUI
- Press "Create Report" in the MXRAY GUI
If you have any suggestions to help us improve MES M-XRAY, please do not hesitate to contact us:
The MES User Guide presents clear instructions on how to work with M-XRAY® (MXRAY). It provides users with information about getting started and working with MXRAY.
You can easily call the User Guide by clicking on “Help” in the tool (see image).
4.0.0 / September 2018
- Success Criterion for mxray_createReport (CI license required):
- To support the new MES Jenkins Plugin and to generally support the use of MXRAY in a continuous integration (CI) setup, a success criterion (or quality gate) can be defined for mxray_createReport with the new 'SuccessCriterion' parameter. If this parameter is given, the function returns a boolean that indicates whether the defined success criterion has been met. This return value can be used by continuous integration tools to mark quality assessment jobs as successful or unsuccessful. The success criterion can be defined as 'good', 'acceptable', 'bad', or 'error'. The respective success criteria are met under the following conditions:
- 'good': All quality metrics are 'good' (green) and no analysis error occurred.
- 'acceptable': All quality metrics are 'good' (green) or 'acceptable' (yellow) and no analysis error occurred.
- 'bad': No analysis error occurred.
- 'error': No conditions => always met.
- Improvements to the level metric:
- The level metric is no longer computed for subsystems that are library or model references themselves. Background: Library and model references are listed on individual rows in the report tables to visualize the use of references in the model. Given that the level metric should compute the level depth inside the model, but the content of library and model references is no longer part of the model, it is not appropriate to evaluate the level for such subsystems.
- BugFix: If the analysis is started (via mxray_createReport) below the two intermediate helper subsystems below a TargetLink subsystem, the level metric will also exclude these two helper subsystems when computing the metric. Previously, this was only done when the analysis was started above the TargetLink subsystem.
- License check for opening subsystems via HTML links:
- MXRAY now checks for a valid license (feature MXRAY_CAL) when opening subsystems (or Stateflow elements) via the links in the HTML report because this kind of interactive work is a basic MXRAY feature.
(Opening systems via the links only works in the MATLAB browser).
- Ineffective interface metric considers the comment status of subsystems:
- Previously, the ineffective interface analysis did not take into account whether subsystems are commented out or commented through, it just followed the signal into the subsystems. Now, the analysis does not follow signals into subsystems that are commented out and follows signals through subsystems that are commented through, regardless of the subsystems' content.
- BugFix: When the analysis was started via mxray_createReport directly on
- a subsystem that is itself a library/model reference, the analysis aborted with an error. This has been fixed.