Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Run Confidence Test

Real-Time Windows Target™ includes several example models you can use to test your installation. These models are preconfigured with settings such as target and scope settings, sample time, and integration algorithm. To see these models, type rtwtdemo in the MATLAB® Command Window.

    Tip   You can run examples in both Simulink® Normal Mode (initial setting) and in Simulink External Mode.

Once you have finished installing the Real-Time Windows Target software and kernel, you should test the installation by running the model rtvdp. If you change your installation, you should repeat this test to confirm that the Real-Time Windows Target software is still working. To open the example model, type rtvdp in the MATLAB Command Window, or launch MATLAB Help, open Real-Time Windows Target, and choose Examples > Real-Time Van der Pol Simulation.

Run the Model rtvdp

The model rtvdp does not have I/O blocks, so that you can run this model regardless of the I/O boards in your computer. Running this model will test the installation by running Simulink Coder™ code generation software, Real-Time Windows Target software, and the Real-Time Windows Target kernel.

After you have installed the Real-Time Windows Target kernel, you can test the entire installation by building and running a real-time application. The Real-Time Windows Target software includes the model rtvdp, which already has Simulink Coder options selected for you:

  1. In the MATLAB Command Window, type

    rtvdp

    The Simulink model rtvdp window opens.

  2. Double click Switch To External Mode on the model.

      Tip   The model is initially in normal mode. At this point, you might start real-time normal mode simulation by clicking Simulation > Run.

  3. From the Code menu, click C/C++ Code > Build Model

    The MATLAB Command Window displays the following messages:

    ### Starting build procedure for model: rtvdp
    ### Generating code into build folder: C:\Work\rtvdp_rtwin
    ### Invoking Target Language Compiler on rtvdp.rtw
    . . .
    ### Successful completion of build procedure for model: rtvdp
    
  4. Click Simulation > Run or click the Run button   on the toolbar.

    The MATLAB Command Window displays the following message:

    Model rtvdp loaded
    

    The target application begins running.

  5. From Simulation menu, click Stop Real-Time Code.

    The real-time application stops running, and the Scope window stops displaying the output signals.

Display Status Information

The Real-Time Windows Target software provides the command rtwho for displaying the kernel version number, followed by timer, driver, and other information. To see this information, in the MATLAB Command Window type

rtwho

The command displays several lines of information in the MATLAB Command Window. Some possible lines and their interpretations are:

TIMERS:  Number    Period  Running
              1      0.01      Yes

The indicated timer(s) exist on your system with the period and run status shown for each timer.

DRIVERS:           Name    Address   Parameters
         Humusoft AD512      0x300    []
                    ecg          0     []

The indicated device driver(s) are installed on your system at the address and with the parameter(s) shown for each driver.

Examples Library

The examples library includes models with preset values and dialog boxes. These models include simple signal processing and simple control examples that use no I/O blocks, use A/D blocks only, and use both A/D and D/A blocks.

    Tip  

    • To run an example that uses I/O blocks, you must configure the Adapter block to match the I/O board installed in your computer.

    • You can run examples in both Simulink Normal Mode (initial setting) and in Simulink External Mode.

To see these models from the MATLAB environment:

  1. Type rtwtdemo in the MATLAB Command Window.

    The Real-Time Windows Target Demos window displays.

  2. From the list, select the example to open it.

Was this topic helpful?