What’s Included in the Download
The install places a folder called "Matrix" on your top level C drive. Inside the Matrix folder there are four sub-folders:
- Models – This folder contains the project folders, one per model. Each project has a System.matrix file which is the Matrix model code file that can be found in the $Main folder. The System.matrix is a plain text file and can be edited with any text editor such as Notepad. TextPad is the recommended text editor for use with such files and a syntax colouring file is available upon request. Also in the $Main folder is a Scenario.mcx file. This contains a complete test scenario using Matrix Simulator commands and may be easily edited in any text editor.
- Command – This folder has a number of batch files to generate code and also to run the Simulator on model executables. For example, to generate C source code from the Matrix models in the Models folder, double click on the batch file called AllMatrixCompile.bat file. The C code is placed in the folder called Generated.
- Generated – All generated C code, both headers and procedure files for each model are contained in this folder. For example, on running the AllMatrixCompile.bat file, the existing code in the model folders will be overwritten (any superfluous files in these folders will be deleted).
- Build – The Visual Studio solution is held in this folder. To compile the generated code, double click on the Build.sln file and this will cause Visual Studio to open showing all four model projects.
In addition, a folder is created under Program Files which contains auxiliary files such as the Model Compiler executable. Refer to the AllMatrixCompile.bat file in the Command folder to see accepted arguments. This provides a convenient method to run the Model Compiler.
Download Visual Studio
We recommend the generated C code is compiled with Microsoft Visual Studio. The version of Visual Studio to download and install depends on which version of Windows you are using.
Users with Windows 7, Windows 8 and Windows 10 can install the latest version of Visual Studio Community 2015 by clicking on the button below:
Machines with Microsoft Windows XP and Windows Vista cannot run Visual Studio 2015 and you must install an earlier version such as Visual C++ 2010 Express which is known to work with XP and Vista.
Unfortunately, the Express versions of Visual Studio appear to be no longer available from the Visual Studio website but you may want to try Visual Studio 2012 or Visual Studio 2013 which looks to be compatible or obtain Visual C++ 2010 Express from elsewhere.
Installing Visual Studio Community 2015
The new version of Visual Studio no longer comes set up to compile C++, but it can be configured to very easily. During the install process this window below will appear:
Change the "Default" setting to "Custom" and click "Next". The Select Features page will appear:
On this page select the "Visual C++" option under "Programming Languages" and click "Next". The download and install will then proceed.
All editions of Visual Studio Community and Express are free to download and can be used without registration for 30 days. Free registration is mandatory after this time.
Troubleshooting
When compiling in Visual Studio some build fail intermittently - This is caused by the virus checker accessing the freshly compiled object files. To fix this problem add the path C:\Matrix to virus checker exclusions list.
Visual Studio complains that it cannot find the Simulator.Lib file - This is caused by Windows 10 systems that require a reboot after the installation of Matrix. To fix this problem reboot your computer.
Projects in Visual Studio show as Loading but don't open - When installing Visual Studio 2015 the "Custom" was not checked or "Custom Tools for Visual 2015 C++ 2015 was not selected. To fix this problem find the option to install C++ from with Visual Studio.
How to Uninstall Matrix
Matrix can be uninstalled through the Control Panel as normal. Another quicker way is to find the Analysis Design Matrix menu on the Windows Start Menu and simply click on the "Uninstall Matrix" option.
Remnants of the C:\Matrix folder may have to be removed manually if any new files have been created within it since installation.
|