get (target application object) - Return target application object property values

Syntax

MATLAB® command line

get(target_object, 'target_object_property')

Arguments

target_object

Name of a target object.

'target_object_property'

Name of a target object property.

Description

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

Application

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

No

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.

The TET includes:

  • Complete I/O latency.

  • Data logging (the parts that happen in a real-time task). This includes data captured in scopes.

  • Asynchronous interruptions.

  • Parameter updating latency (if the Double buffer parameter changes parameter in the xPC Target options node using the model Simulation > Configuration Parameters dialog box).

Note that the TET is not the only consideration in determining the minimum achievable sample time. Other considerations, not included in the TET, are:

  • Time required to measure TET

  • Interrupt latency required to schedule and run one step of the model

No

Connected

Communication status between the host PC and the target PC. Values are 'Yes' and 'No'.

No

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.

No

ExecTime

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

No

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

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 menu Configuration Parameters > xPC Target options pane.

No

MaxTET

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

No

MinTET

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

No

Mode

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

NumLogWraps

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

No

NumParameters

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

No

NumSignals

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

No

OutputLog

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

No

Parameters

List of tunable parameters. This list is visible only when ShowParameters is set to 'on':

  • 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.

No

SampleTime

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

Scopes

List of index numbers, with one index for each scope.

No

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.

No

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' and 'off'.

Yes

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' and '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.

No

StateLog

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

No

Status

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

No

StopTime

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

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 select the Log Task Execution Time check box located at Simulation menu Configuration Parameters > xPC Target options pane.

No

TimeLog

Storage in the MATLAB workspace for the time or t-vector logged during execution of the target application.

No

ViewMode

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

Examples

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.2

See Also

The 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.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS