User`s guide
Scope Objects
Scope Objects
In this section...
“What Is a Scope Object?” o n page 1 -3
“Scope Object Types” on page 1-4
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 T arget software uses scopes and scope objects as an alternative to
using Simulink
®
scopes and external m ode. A scope can exist as part of a
Simulink model system or outside a model system.
• A scope that is part of a Simulink model sys tem is a scope block. You add
an xPC Target scope block to the model, build an application from that
model, and download that application to the target PC.
• A sco pe that is outside a model is not a scope block. For example, if you
create a scope with the
addscope method,thatscopeisnotpartofa
model system. You add this scope to the model after the model has been
downloaded and initialized.
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
conditionall y executed (triggered/en abled) subsystem executes whenever the
containing subsystem executes. Note that in the latter case, the scope might
acquire samples at irregular intervals.
Ascopethatisnotpartofamodelalwaysexecutesatthebasesampletime
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
1-3