Required Products: Simulink®, Simulink Real-Time™, MATLAB® Compiler™, and MATLAB Compiler SDK™
This example shows how to deploy a test script as a standalone executable by using
Compiler. The test script performs a frequency-response test of the
xpcosc model. Using this information, in the design phase, you
can modify the internal parameters of the model to meet your frequency requirements. In
the production phase, you can bin manufactured parts based on frequency response.
The test script is
This procedure assumes that you have:
Completed the steps in MATLAB Runtime Setup.
Opened MATLAB from the Windows® command prompt window within which you performed MATLAB run-time setup.
Configured TCP/IP communication between the development and target computers, recorded the required settings in the test script
slrt_freq_sweep_test.m, and saved the script in a
xpcosc real-time application.
Open Apps > Application Compiler.
Enter the name of the application as
slrt_freq_sweep_test. Add summary information as
To save the project, click Save. Save the project
under a name such as
Click the Add main file button , and then navigate to the file
Under PACKAGING OPTIONS, select the Runtime included in package check box.
Click the Package button .
The compiler generates the application and opens the
slrt_freq_sweep_test folder in Windows Explorer.
To save the project, click Save.
In Windows Explorer, navigate to
Copy the real-time application file (
The application assumes that the model file is in the folder where you run the application.
If you are connected to the target computer within MATLAB, close the connection. Use the
To run the application, click
The application runs and displays a plot for each frequency.
After the run is complete, the application displays a text box containing the test results.