MATLAB XPC TARGET 4 - IO Guide de l'utilisateur Page 167

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 182
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 166
Using Scope Objects
7-9
Displaying Scope Object Properties for All Scopes
To list the properties of all scope objects associated with the target object tg:
1 In the MATLAB window, type
getscope(tg) or tg.getscope
MATLAB displays a list of all scope objects associated with the target object.
2 Alternately, type
allscopes = getscope(tg) or allscopes = tg.getscope
allscopes
The current scope properties are uploaded to the host PC, and then
MATLAB displays a list of all the scope object properties with the updated
values. To list some of the scopes, use the vector index. For example, to list
the fist and third scopes, type
allscopes([1,3]).
For a list of target object properties with a description, see “Target Object
Properties” on page 6-4.
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:
1 In the MATLAB window, type
sc1.triggermode = ’signal’
2 Alternately, you could type
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).
Vue de la page 166
1 2 ... 162 163 164 165 166 167 168 169 170 171 172 ... 181 182

Commentaires sur ces manuels

Pas de commentaire