Skip to Main Content Skip to Search
Product Documentation

Real-Time Test Environment

Software Setup

The real-time test environment is a place to design, build, and test a target application in nonreal time and real time. It also includes communication between the host and target computers.

You create a nonreal-time test environment by creating an initial model in regular Simulink.

You create a real-time test environment for Simulink models by connecting a host computer, target computer, and the hardware you want to test. You run the following software on the host computer:

And connect the host computer to the target computer via a single TCP/IP or RS-232 connection. You then:

  1. Connect the target computer to the hardware you want to test.

  2. Download code generated by Simulink Coder from a Simulink model to the target computer via the communications connection.

Once you make the connections, you can:

Host-Target Communication

Whether using a serial connection (RS-232) or a network connection (TCP/IP), information is exchanged between the host computer and target computer. This information includes

xPC Target Embedded Option

xPC Target Embedded Option enables applications generated with xPC Target to run on a target computer without being connected to a host computer. You can run your applications on a standalone target computer for data acquisition, calibration, testing, and small-batch production scenarios. You can distribute the applications royalty-free to any number of target computers.

When you have completed developing and testing, you can use the target application as a real-time system that runs on a dedicated target computer without needing to connect to the host computer.

The xPC Target Embedded Option product has one mode of operation, StandAlone. In this case, the target computer boots into the Microsoft DOS environment, starts the DOS program xpcboot.com from autoexec.bat, and then starts the kernel from xpcboot.com:

When using Boot Floppy or CD Boot, you do not need DOS environment to load and run the xPC Target kernel. DOSLoader mode, like StandAlone mode, boots the target computer into DOS, starts the DOS program xpcboot.com from autoexec.bat, and then starts the kernel from xpcboot.com.

For more information on the xPC Target Embedded Option product, see Embedded Target Boot Method in the xPC Target Getting Started Guide.

StandAlone Mode

StandAlone mode combines the target application with the kernel and boots them together on the target computer from a hard disk drive or flash memory. The host computer does not have to be connected to the target computer.

  1. Select StandAlone mode from the Configuration node in the xPC Target Hierarchy pane of the xPC Target Explorer tool.

  2. Build a kernel/target application.

  3. Copy DOS system files, utilities, kernel/application files, and helper files to the target computer hard drive or flash memory.

  4. Boot the target computer.

    When you boot the target computer, the target computer loads DOS environment, which then calls the xPC Target autoexec.bat file to start the xPC Target kernel (*.rtb) and associated target application. If you set up the boot device to run the xPC Target autoexec.bat file upon startup, the target application starts executing as soon as possible. The xPC Target application executes entirely in protected mode using the 32-bit flat memory model.

For more information on the xPC Target Embedded Option product, see Embedded Target Boot Method in the xPC Target Getting Started Guide.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS