User`s guide
Working with Target Objects
2-5
To get a list of the writable properties, type set(target_object). The build
process assigns the default name of the target object to
tg.
Getting the Value of a Target Object Property
You can list a property value in the MATLAB window or assign that value to a
MATLAB variable. With xPC Target you can use either a function syntax or an
object property syntax.
The syntax
get(target_object, property_name) can be replaced by
target_object.property_name
For example, to access the start time,
1 In the MATLAB window, type
endrun = tg.stoptime
2 Alternatively, you can type
endrun = get(tg,'stoptime') or tg.get('stoptime')
To get a list of readable properties, type target_object. Without assignment
to a variable, the property values are listed in the MATLAB window.
Signals are not target object properties. To get the value of the
Integrator1
signal from the model
xpcosc,
1 In the MATLAB window, type
outputvalue= getsignal (tg,0)
where 0 is the signal index.
2 Alternatively, you could type
tg.getsignal(0)
Note Method names are case sensitive. You must type the entire name.
Property names are not case sensitive. You do not need to type the entire
name as long as the characters you do type are unique for the property.