Documentation Center

  • Trial Software
  • Product Updates

Software Components and Installed Files

Real-Time Windows Target™ is a self-targeting rapid prototyping system where the host and the target computer are the same computer.

MATLAB Environment

The MATLAB® environment provides the design and data analysis tools that you use when creating and testing Simulink® models. In particular, see:

Simulink Software

Simulink software provides an environment where you model your physical system and controller as a block diagram. You create the block diagram by using a mouse to connect blocks and a keyboard to edit block parameters. C code S-functions are supported by Simulink Coder™ code generation software.

With Real-Time Windows Target software, you can remove the physical system model and replace it with Real-Time Windows Target I/O driver blocks connected to your sensors and actuators. The Real-Time Windows Target I/O library supports more than 200 boards.

    Note:   Some of the functions on a board may not be supported by Real-Time Windows Target software. Check the MathWorks® Web site for an updated list of supported boards and functions at Supported I/O Boards.

Known limitations include:

  • Unsupported Simulink products — The Real-Time Windows Target software does not support the Simscape™ or SimDriveline™ products.

  • Unsupported Simulink blocks in external mode — You can use Real-Time Windows Target software with most Simulink blocks, including discrete-time and continuous-time systems. In external mode, Real-Time Windows Target software does not support blocks that do not run in real time, nor does it support To File blocks.

  • Limitations with Simulink Coder code generation software:

    • When you use a continuous-time system and generate code for external mode execution with Simulink Coder code generation software, you must use a fixed-step integration algorithm.

    • The Simulink Coder product provides an API for the MATLAB Distributed Computing Server™ or Parallel Computing Toolbox™ products to perform parallel builds that reduce build time for referenced models. However, this API does not support parallel builds for models whose system target file parameter is set to rtwin.tlc or rtwinert.tlc. In other words, you cannot perform parallel builds for Real-Time Windows Target.

    • MATLAB S-functions are not supported in external mode.

Simulink Coder Software

Simulink Coder code generation software provides the utilities to convert your Simulink models into C code and then compile the code into a real-time executable.

    Note:  

    • Simulink Coder is required for External Mode.

    • Compiler support is included as part of the product installation. No additional or external compiler is required.

    • MATLAB Coder is required for Simulink Coder installation.

Real-Time Windows Target software is designed for maximum flexibility during rapid prototyping. This flexibility allows parameter tuning and signal tracing during a real-time run, but increases the size of the generated code. However, Simulink Coder code generation software provides other code formats that generate more compact code for embedded applications.

Installed Files

You can install Real-Time Windows Target software as part of the regular installation process documented in MathWorks installation documentation. This section describes installed files that are unique to Real-Time Windows Target software. When using the product, you may find it helpful to know where these files are located.

  • MATLAB working folder — Simulink models (model) and the Real-Time Windows Target executable (model.rwd).

  • Simulink Coder project folder — The Simulink Coder C-code files (model.c, model.h) are in a subfolder called model_rtwin.

  • Real-Time Windows Target Files — The files included with Real-Time Windows Target software are located in the folder

    matlabroot\toolbox\rtw\targets\rtwin

Real-Time Windows Target software provides files to help Simulink Coder code generation software create C code from your Simulink model and compile that code to a real-time executable:

  • System Target File (rtwin.tlc) — Defines the process of generating C code by Real-Time Windows Target software.

  • Template Makefile and Makefile (rtwin.tmf, model_name.mk) — The template makefile serves as a template for generating the real makefile, which the make utility uses during model compilation. During the automatic build procedure, the make command extracts information from the template makefile rtwintmf.m and generates the makefile model_name.mk.

  • Make Command (make_rtw.m) — The standard make command supplied with Simulink Coder code generation software.

Other files provided with Real-Time Windows Target software include

  • I/O drivers (*.rwd) — Binaries for I/O device drivers. Real-Time Windows Target software does not link the driver object files with your real-time executable. The drivers are loaded into memory and run by the kernel separately.

  • Simulink external mode interface (rtwinext.mex*) — MEX-file for communicating between Simulink external mode and the Real-Time Windows Target kernel.

    Simulink external mode uses the MEX-file interface module to download new parameter values to the real-time model and to retrieve signals from the real-time model. You can display these signals in Simulink Scope blocks.

  • Kernel install and uninstall commands (rtwintgt.m, rtwho.m) — .m scripts to install and uninstall the Real-Time Windows Target kernel and check installation.

Initial Working Folder

Set your MATLAB working folder outside the MATLAB root folder. The default MATLAB root folder is c:\matlabN, where N is the MATLAB version number.

Set the Working Folder from the Desktop Icon

Your initial working folder is specified in the shortcut file you use to start the MATLAB environment. To change this initial folder, use the following procedure:

  1. Right-click the MATLAB desktop icon, or from the program menu, right-click the MATLAB shortcut.

  2. Click Properties. In the Start in text box, enter the folder path you want the MATLAB environment to use initially outside the MATLAB root folder.

  3. Click OK, and then start the MATLAB environment. To check your working folder, type pwd or cd.

Set the Working Folder from the MATLAB Environment

Use the following procedure as an alternative, but temporary, procedure for setting your MATLAB working folder:

  1. In the MATLAB Command Window, type cd c:\mwd.

  2. Check the current working folder, type pwd or cd.

    The MATLAB Command Window displays

    ans = c:\mwd or c:\mwd
Was this topic helpful?