xPC Target | ![]() ![]() |
Defining xPC Target Scope Block Parameters
Scope block parameters define the signals to trace on the scope, trigger modes, and the axis range.
This procedure uses the Simulink model xpcosc.mdl
as an example, and assumes you have added an xPC Target scope block to your model. To add a scope block, see Adding xPC Target Scope Blocks.
If you selected Host for the Scope Type, then you can only choose either Numerical or Graphical (redraw) for the Scope Mode.
0
for both elements, then the scaling is set to auto
.xpcscope
.1
) or to collect data at less than every sample time (2
or greater).If you selected Signal Trigger, then in the Trigger Signal box, enter the index of a signal. In the Trigger Level text box, enter a value for the signal to cross before triggering. And from the Trigger Slope list choose either, rising, or falling.
If you choose Scope Trigger, then in the Trigger Scope Number box, enter the block number of a scope block. If you use this feature, you must also add a second scope block to your Simulink model.
Your next task is to build and run the target application. As soon as the target application is built and downloaded, a scope and scope object are automatically created. However, the scope object is not assigned to a MATLAB variable.
![]() | Adding xPC Target Scope Blocks | Target PC Command Line Interface | ![]() |