xPC Target | ![]() ![]() |
Setting the Value of a Scope Property
With xPC Target you can use either a function syntax or an object property syntax. The syntax set(scope_object, property_name, new_property_value)
can be replaced by:
scope_object_vector.property_name = new_property_value.
scope_object(index_vector).propety_name = new_property_value.
For example to change the trigger mode for the scope object sc1
:
sc1.triggermode = 'signal'
set(sc1,'triggermode', 'signal') or sc1.set('triggermode', 'signal')
Assignment for may also be done for a vector of scope objects, for example allscopes([1, 2]).numsamples = 500. Notice, the indices are MATLAB vector indices and not xPC Target scope indices.
To get a list of the writable properties, type set(scope_object)
.
![]() | Displaying Scope Object Properties for All Scopes | Getting the Value of a Scope Property | ![]() |