| Contents | Index |
| On this page… |
|---|
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:
xPC Target
Simulink
Simulink Coder
MATLAB Coder
A C compiler
And connect the host computer to the target computer via a single TCP/IP or RS-232 connection. You then:
Connect the target computer to the hardware you want to test.
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:
Access and interactively control the target computer and target application.
Tune parameters before, during, and after real-time execution.
Acquire, monitor, and log signal data.

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
Target application — Download a target application from the host to the target computer.
Control — Change properties and control the target application. This includes starting and stopping the target application, changing sample and stop times, and getting information about the performance of the target application and CPU.
Signal data — Upload signal data from the target computer for analysis after the target application is finished running, or view signal data during the run.
Parameter values — Download parameter values to the target computer between runs or during a run.
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.
Note The xPC Target Embedded Option software is a separate product that requires an additional license from MathWorks. With this additional license you can deploy an unlimited number of real-time applications for standalone operation. |
For more information on the xPC Target Embedded Option product, see Embedded Target Boot Method in the xPC Target Getting Started Guide.
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.
Select StandAlone mode from the Configuration node in the xPC Target Hierarchy pane of the xPC Target Explorer tool.
Copy DOS system files, utilities, kernel/application files, and helper files to the target computer hard drive or flash memory.
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.
![]() | Hardware Description | User Interaction | ![]() |

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 |