MATLAB XPC TARGET RELEASE NOTES Uživatelská příručka Strana 29

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 531
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 28
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
Zobrazit stránku 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 530 531

Komentáře k této Příručce

Žádné komentáře