Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Scope Objects

What Is a Scope Object?

The xPC Target software uses scope objects to represent scopes on the target PC. Use scope object functions to view and collect signal data.

See Function Reference and Functions for a reference of the scope functions.

The xPC Target software uses scopes and scope objects as an alternative to using Simulink® scopes and external mode. A scope can exist as part of a Simulink model system or outside a model system.

This difference affects when and how the scope executes to acquire data.

Scope blocks inherit sample times. A scope block in the root model or a normal subsystem executes at the sample time of its input signals. A scope block in a conditionally executed (triggered/enabled) subsystem executes whenever the containing subsystem executes. Note that in the latter case, the scope might acquire samples at irregular intervals.

A scope that is not part of a model always executes at the base sample time of the model. Thus, it might acquire repeated samples. For example, if the model base sample time is 0.001, and you add to the scope a signal whose sample time is 0.005, the scope will acquire five identical samples for this signal, and then the next five identical samples, and so on.

Understanding the structure of scope objects will help you to use the MATLAB command-line interface to view and collect signal data.

Refer to Target and Scope Objects for a description of how to use these objects, properties, and methods.

A scope object on the host PC represents a scope on the target PC. You use scope objects to observe the signals from your target application during a real-time run or analyze the data after the run is finished.

To create a scope object,

A scope object has associated properties and methods specific to that object.

To read about scope object types, see Scope Object Types.

Scope Object Types

You can create scopes of type target, host, or file. Upon creation, The xPC Target software assigns the appropriate scope object data type for the scope type:

Each scope object type has a group of object properties particular to that object type.

The xpcsctg scope object of type target has the following object properties:

The xpcschost scope object of type host has the following object properties:

The xpcfs scope object of type file has the following object properties:

The xpcsc scope object has the following object properties. The other scope objects have these properties in common:

See the scope object function get (scope object) for a description of these object properties.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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