| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
| On this page… |
|---|
Updating Environment Properties Creating a Kernel/Target Application Copying the Kernel/Target Application to the Target PC Flash Disk |
Standalone mode combines the target application with the kernel and boots them together on the target PC from the hard drive (or, alternatively, flash memory). The host PC does not need to be connected to the target PC.
Before you start, set up your system as described.
Create a standard boot disk or network boot image for serial or network communication (depending on your configuration). You will need to do this so that you can copy your Standalone mode files to the target PC. See Serial Communication, Network Communication, Booting Target PCs from Boot Floppy Disk, and xPC Target Boot Options in the Installation and Configuration chapter of the xPC Target Getting Started Guide.
Boot the target PC.
Ensure that your target PC hard drive is a serial ATA (SATA) or parallel ATA (PATA)/Integrated Device Electronics (IDE) drive. The xPC Target product supports file systems of type FAT-12, FAT-16, or FAT-32. Ensure that the hard drive is not cable-selected and that the BIOS can detect it.
After you create the stand-alone target application files, you will copy them to the target PC hard drive using the File Transfer Protocol (FTP) functions of the xPC Target file system. You do not need to be familiar with the xPC Target file system before you start, but for further information on this feature, see Working with Target PC Files and File Systems.
The xPC Target software uses the environment properties to determine what files to create for the various target boot modes.
This procedure assumes you have serial or network communication working correctly between your host computer and a target PC.
xpcexplr
The xPC Target Explorer window opens.
In the xPC Target Explorer xPC Target Hierarchy pane, select a target PC Configuration node.
The xPC Target software updates the environment properties, and the build process is ready to create a stand-alone kernel/target application. See Creating a Kernel/Target Application. For Standalone mode, you do not create an xPC Target boot disk or network boot image. Instead, you copy files created from the build process to the target PC hard drive.
Use the xPC Target software with Standalone mode to create a combined kernel and target application with utility files. A combined kernel and target application allows you to disconnect your target PC from a host PC and run stand-alone applications.
After you set the Simulink and Real-Time Workshop parameters for code generation with the xPC Target software in your Simulink model, you can use the xPC Target software with Standalone mode to create a target application:
In the MATLAB window, type the name of a Simulink model. For example, type
xpc_osc3
A Simulink window opens with the model.
From the Tools menu, point to Real-Time Workshop, and then click Build Model.
Real-Time Workshop and xPC Target software create a folder xpc_osc3_xpc_emb with the following files:
autoexec.bat — This file is automatically invoked by DOS. It then runs xpcboot.com and the *.rtb file.
xpc_osc3.rtb — This image contains the xPC Target kernel and your target application.
xpcboot.com — This file is a static file that is part of the xPC Target Embedded Option software.
Refer to Copying the Kernel/Target Application to the Target PC Flash Disk for a description of how to transfer these files to the target PC.
Note If the size of the compiled target application (DLM) exceeds the Maximum model size you selected in xPC Target Explorer, the software will generate an error during the build process. |
You build a target application on a host PC using the Real-Time Workshop and xPC Target products, and a C/C++ compiler. One method for transferring the files from the host PC to a target PC is to use the FTP functions of the xPC Target file system.
After you build a stand-alone application on a host PC, you can copy files from the host PC to the target PC hard drive or flash disk. If you have not already created the necessary files, see Creating a Kernel/Target Application.
Ensure that your target PC is still booted from a target PC boot disk.
In the MATLAB Command Window, change folder on the host computer to the folder that contains the kernel/target application files.
Create the folder C:\xpcfiles and copy files to that folder. For example, type
f=xpctarget.ftp
f.mkdir('xpcfiles')
f.cd('xpcfiles')
f.put('autoexec.bat')
f.put('xpcboot.com')
f.put('xpc_osc3.rtb')If you want your stand-alone application to run when you reboot your target PC, remove the 3.5-inch disk or CD from the target PC, reboot the target PC, and bring up the DOS prompt. For example, if you see the message for selecting the operating system to start, select Microsoft Windows.
Note If the target PC that you want to boot in Standalone mode was previously booted from the network boot image, selecting the Enable Standalone Mode check box should disable the network boot capability. |
The boot process is stopped and a DOS prompt is displayed.
At the DOS prompt, save a copy of the target PC file C:\autoexec.bat to a backup file, such as C:\autoexec_back.wrk.
Edit the target PC file C:\autoexec.bat to include the following lines. Adding these commands to C:\autoexec.bat directs the system to execute the autoexec.bat file located in C:\xpcfiles.
cd C:\xpcfiles autoexec
Reboot the target PC.
The sequence of calls during the boot process is
C:\autoexec.bat
C:\xpcfiles\autoexec.bat
C:\xpcfiles\xpcboot.com
C:\xpcfiles\<application>.rtb
The stand-alone target application should now be running on the target PC.
![]() | Embedded Option Setup | Software Environment and Demos | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |