User`s guide
Working with Target Ob jects
target_object.property_name = new_property_value
For example, to change the stop time mode for the target object tg,
• In the MATLAB window, type
tg.stoptime = 1000
• Alternatively, you can type
set(tg, 'stoptime', 1000)
When you change a target object property, the new property value is
downloaded to the target PC. The x PC Target kernel then receives the
information and changes the behavior of the target application.
To get a list of the writable properties, type
set(target_object).Thebuild
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 the xPC Target software you can use either a
function syntax or an object property sy ntax.
The syntax
get(target_object, property_name) can be replaced by
target_object.property_name
Forexample,toaccessthestoptime,
• In the MATLAB window, type
endrun = tg.stoptime
• 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 v ariable, the property values are listed in the MATLAB window.
2-5