xPC Target    

Target Object Properties

Target object properties let you access information from your target application and control its execution. You can view and change these properties using target object methods.

The properties for a target object are listed in the following table. This table includes a description of the properties and which properties you can change directly by assigning a value.

Property
Description
Write
Connected
Communication status between the host PC and the target PC. Values are 'Yes' or 'No'.

Application
Name of the Simulink model and target application built from that model.

Mode
Type of Real-Time Workshop code generation. Values are 'Real-Time Singletasking', 'Real-Time Multitasking', or 'Accelerate'. The default value is 'Real-Time Singletasking'.


Note Even if you select 'Real-Time Multitasking', the actual mode can be 'Real-Time Singletasking'. This happens if your model contains only one or two tasks and the sample rates are equal.


Status
Execution status of your target application. Values are 'stopped' or 'running'.

CPUoverload
CPU status for overload. If the target application requires more CPU time than the sample time of the model, this value is set from 'none' to 'detected' and the current run is stopped. Correcting CPUoverload requires either a faster processor or a larger sample time.

ExecTime
Execution time. Time, in seconds, since your target application started running. When the target application stops, the total execution time is displayed.

SessionTime
Time since the kernel started running on your target PC. This is also the elapsed time since you booted the target PC. Values are in seconds.

StopTime
Time when the target application stops running. Values are in seconds. The original value is set in the Simulink Simulation Parameters dialog box.
When the ExecTime reaches the StopTime, the application stops running.
Yes
SampleTime
Time between samples. This value equals the step size, in seconds, for updating the model equations and posting the outputs.
Yes
AvgTET
Average task execution time. This value is an average of the measured CPU times, in seconds, to run the model equations and post outputs during each sample interval. Task execution time is nearly constant, with minor deviations due to cache, memory access, interrupt latency, and multirate model execution.

MinTET
Minimum task execution time. Corresponds to the fastest time (smallest time measured), in seconds, to update model equations and post outputs.

MaxTET
Maximum task execution time. Corresponds to the slowest time (longest time measured), in seconds, to update model equations and post outputs.

ViewMode
Display either all scopes or a single scope on the target PC. Values are 'all' or a single scope index. This property is active only if the environment property TargetScope is set to enabled.
Yes
TimeLog
Storage in the MATLAB workspace for the time or t-vector logged during execution of the target application.

StateLog
Storage in the MATLAB workspace for the state or x-vector logged during execution of the target application.

OutputLog
Storage in the MATLAB workspace for the output or y-vector logged during execution of the target application.

TETLog
Storage in the MATLAB workspace for a vector containing task execution times during execution of the target application.

To enable logging of the TET, you need to check the Log Task Execution Time box located at Simulation Parameters dialog box -> Real-Time Workshop page -> Category:xPC Target code generation options group.


MaxLogSamples
Maximum number of samples for each logged signal within the circular buffers for TimeLog, StateLog, OutputLog, and TETLog. StateLog and OutputLog can have one or more signals.

This value is calculated by dividing the Signal Logging Buffer Size by the number of logged signals. The Signal Logging Buffer Size box is located at Simulation Parameters dialog box -> Real-Time Workshop page -> Category:xPC Target code generation options group.


NumLogWraps
The number of times the circular buffer wrapped. The buffer wraps each time the number of samples exceeds MaxLogSamples.

LogMode
Controls which data points are logged.
  • Time-equidistant logging. Logs a data point at every time interval. Set value to 'Normal'.
  • Value-equidistant logging. Logs a data point only when an output signal from the OutputLog changes by a specified value (increment). Set the value to the difference in signal values.
Yes
Scopes
List of index numbers, with one index for each scope.

NumSignals
The number of signals from your Simulink model that are available to be viewed with a scope.

ShowSignals
Flag set to view or hide the list of signals from your Simulink blocks. This list is shown when you display the properties for a target object. Values are 'on' or 'off'.
Yes
Signals
List of viewable signals. This list is visible only when ShowSignals is set to 'on'.
  • Property name. S0, S1. . .
  • Property value. Value of the signal.
  • Block Name. Name of the Simulink block the signal is from.

S#
Property name for a signal.

NumParameters
The number of parameters from your Simulink model that you can tune or change.

ShowParameters
Flag set to view or hide the list of parameters from your Simulink blocks. This list is shown when you display the properties for a target object. Values are 'on' or 'off'.
Yes
Parameters
List of tunable parameters. This list is visible only when ShowParameters is set to 'on'.
  • Property name. P0, P1. . .
  • Property value. Value of the parameter in a Simulink block.
  • Type. Data type of the parameter. Always double.
  • Size. Size of the parameter. For example, scalar, 1-by-2 vector, or 2-by-3 matrix.
  • Parameter name. Name of a parameter in a Simulink block.
  • Block name. Name of a Simulink block
Yes
P#
Property name for only tunable block parameter. One block can have one or more parameters.


  What Is a Target Object? Target Object Methods