xPC Target    

Target Object Properties

When you are using the target PC command-line interface, target object properties are limited to parameters, signals, stop time, and sample time. Notice the difference between a parameter index (0, 1, . . .) and a parameter name (P0, P1, . . .).

The following table lists the syntax for the target commands that you can use on the target PC. The MATLAB equivalent syntax is shown in the right column, and the target object name tg is used as an example for the MATLAB methods.

Target PC Command
Description and Syntax
MATLAB Equivalent
getpar
Display the value of a block parameter using the parameter index.
Syntax: getpar parameter_index
set(tg, 'parameter_name', number)
setpar
Change the value of a block parameter using the parameter index.
Syntax: setpar parameter_index = floating_point_number
get(tg, 'parameter_name')
stoptime
Enter a new stop time. Use inf to run the target application until you manually stop it or reset the target PC.
Syntax: stoptime = floating_point_number
tg.stoptime = number
sampletime
Enter a new sample time.
Syntax: sampletime = floating_point_number
tg.sampletime = number
set(tg, 'SampleTime', number)
P#
Display or change the value of a block parameter. For example, P2 or P2=1.23e-4
Syntax: parameter_name, or
parameter_name = floating_point_number
parameter_name is P0, P1, . . .
tg.parameter_name
tg.parameter_name = floating_point_number
S#
Display the value of a signal. For example, S2.
Syntax: signal_name
signal_name is S0, S1, . . .
tg.S#


  Target Object Methods Scope Object Methods