| xPC Target™ | ![]() |
MATLAB® command line
get(target_object, 'target_object_property')
target_object | Name of a target object. |
'target_object_property' | Name of a target object property. |
get gets the value of readable target object properties from a target object.
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 | Writable |
|---|---|---|
Name of the Simulink® model and target application built from that model. | No | |
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. The TET includes:
Note that the TET is not the only consideration in determining the minimum achievable sample time. Other considerations, not included in the TET, are:
| No | |
Communication status between the host PC and the target PC. Values are 'Yes' and 'No'. | No | |
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. | No | |
Execution time. Time, in seconds, since your target application started running. When the target application stops, the total execution time is displayed. | No | |
Controls which data points are logged:
| Yes | |
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 menu Configuration Parameters > xPC Target options pane. | No | |
Maximum task execution time. Corresponds to the slowest time (longest time measured), in seconds, to update model equations and post outputs. | No | |
Minimum task execution time. Corresponds to the fastest time (smallest time measured), in seconds, to update model equations and post outputs. | No | |
Type of Real-Time Workshop® code generation. Values are 'Real-Time Singletasking', 'Real-Time Multitasking', and 'Accelerate'. The default value is 'Real-Time Singletasking'. 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. | No | |
The number of times the circular buffer wrapped. The buffer wraps each time the number of samples exceeds MaxLogSamples. | No | |
The number of parameters from your Simulink model that you can tune or change. | No | |
The number of signals from your Simulink model that are available to be viewed with a scope. | No | |
Storage in the MATLAB workspace for the output or y-vector logged during execution of the target application. | No | |
List of tunable parameters. This list is visible only when ShowParameters is set to 'on':
| No | |
Time between samples. This value equals the step size, in seconds, for updating the model equations and posting the outputs. (See User Interaction in the xPC Target™ Getting Started Guide for limitations on target property changes to sample times.) | Yes | |
List of index numbers, with one index for each scope. | No | |
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. | No | |
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' and 'off'. | Yes | |
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' and 'off'. | Yes | |
List of viewable signals. This list is visible only when ShowSignals is set to 'on'.
| No | |
Storage in the MATLAB workspace for the state or x-vector logged during execution of the target application. | No | |
Execution status of your target application. Values are 'stopped' and 'running'. | No | |
Time when the target application stops running. Values are in seconds. The original value is set in the Simulation menu Configuration Parameters dialog. When the ExecTime reaches the StopTime, the application stops running. | Yes | |
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 select the Log Task Execution Time check box located at Simulation menu Configuration Parameters > xPC Target options pane. | No | |
Storage in the MATLAB workspace for the time or t-vector logged during execution of the target application. | No | |
Display either all scopes or a single scope on the target PC. Value is 'all' or a single scope index. This property is active only if the environment property TargetScope is set to enabled. | Yes |
List the value for the target object property StopTime. Notice that the property name is a string, in quotation marks, and not case sensitive.
get(tg,'stoptime') or tg.get('stoptime')
ans = 0.2The xPC Target™ target object method set (target application object).
The scope object methods get (scope object) and set (target application object).
The built-in MATLAB functions get and set.
![]() | get (scope object) | getfilesize | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |