User`s guide

2 Targets and Scopes in the MATLAB Interface
2-2
Working with Target Objects
This topic describes how to work with target objects using target object
functions.
“Creating Target Objects” on page 2-2
“Deleting Target Objects” on page 2-3
“Displaying Target Object Properties” on page 2-3
“Setting Target Object Properties from the Host PC” on page 2-4
“Getting the Value of a Target Object Property” on page 2-5
“Using the Method Syntax with Target Objects” on page 2-6
See Chapter 14, “Function Reference,” for a reference of the target object
functions.
Creating Target Objects
To create a target object,
Build a target application. xPC Target creates a target object during the
build process.
To create a single target object, or to create multiple target objects in your
system, use the target object constructor function
xpc (see xpctarget.xpc on
page 14-116) as follows. For example, the following creates a target object
connected to the host through an RS-232 connection. In the MATLAB
window, type
tg = xpctarget.xpc('rs232', 'COM1', '115200')
The resulting target object is tg.