xPC Target    

Setting Target Object Properties from the Host PC

You can change a target object property by using xPC Target methods on the host PC.

With xPC Target you can use either a function syntax or an object property syntax. The syntax set(target_object, property_name, new_property_value) can be replaced by

For example, to change the stop time mode for the target object tg:

  1. In the MATLAB window, type
  2. Alternatively, you could type

Parameters are also target object properties. For example, to change the frequency of the signal generator in the model xpcosc:

  1. In the MATLAB window, type
  2. Alternatively, you could type

When you change a target object property, the new property value is downloaded to the target PC. The xPC 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). The build process assigns the default name of the target object to tg.


  Displaying Target Object Properties Setting Target Object Properties from the Target PC