xPC Target | ![]() ![]() |
Change property values for target objects
Syntax
set(
target_object
)
set(
target_object
,
property_name1
,
property_value1
,
property_name2
,
property_value2
, . . .)
target_object
.set('
property_name1
',
property_value1
)
set(
target_object
,
property_name_vector
,
property_value_vector
)
target_object
.
property_name
=
property_value
Target PC command line - Commands are limited to the target object properties: stoptime
, sampletime
, and parameters.
parameter_name
=
parameter_value
stoptime
=
floating_point_number
sampletime
=
floating_point_number
Arguments
Description
Method of a target object. Sets the properties of the target object. Not all properties are user-writable.
Properties must be entered in pairs, or using the alternate syntax, as one-dimensional cell arrays of the same size. This means they have to both be row vectors or both column vectors, and the corresponding values for properties in property_name_vector
are stored in property_value_vector
.
The function set
typically does not return a value. However, if called with an explicit return argument, for example, a = set
(target_object
, property_name, property_value
)
, it returns the value of the properties after the indicated settings have been made.
Examples
Get a list of writable properties for a scope object.
sc1 = getscope(tg,1) set(sc1) xPC Target Object: Writable Properties StopTime SampleTime ViewMode LogMode : [0 | 1] ShowParameters : [On | {Off}] ShowSignals : [On | {Off}]
Change the property showsignals
to on.
As an alternative to the method set
, use the target object property showsignals
. In the MATLAB window, type
See Also
The xPC Target target object method get
. The scope object methods get
and set
. The built in MATLAB functions get
and set
. The xPC target M-file demo scripts listed in xPC Target Demos.
![]() | remscope | start | ![]() |