Skip to Main Content Skip to Search
Product Documentation

Working with Test Points

What Is a Test Point?

A test point is a signal that Simulink guarantees to be observable when using a Floating Scope block in a model. Simulink allows you to designate any signal in a model as a test point.

Designating a signal as a test point exempts the signal from model optimizations, such as signal storage reuse (see Signal storage reuse) and block reduction (see Implement logic signals as Boolean data (vs. double)). These optimizations render signals inaccessible and hence unobservable during simulation.

Signals designated as test points will not have algebraic loops minimized, even if Minimize algebraic loop occurrences is selected (for more information about algebraic loops, see Algebraic Loops).

Test points are primarily intended for use when generating code from a model with Simulink Coder. For more information about test points in the context of code generation, see Signals with Test Points in the Simulink Coder documentation.

Designating a Signal as a Test Point

To specify that a signal whose storage class is Auto is a test point, open the signal's Signal Properties dialog box and select Logging and accessibility > Test point. The signal is now a test point. Selecting or clearing this option has no effect unless the signal's storage class is Auto.

Any signal whose storage class is not Auto is automatically a test point, regardless of the setting of Signal Properties > Logging and accessibility > Test point. You can specify a non-Auto signal storage class in three ways:

Using a base workspace signal object to specify that a signal is a test point can be convenient, because it allows you to control testpointing without having to change the model itself. Assigning storage class SimulinkGlobal has exactly the same effect as assigning storage class Auto and selecting Signal Properties > Logging and accessibility > Test point.

See Signal Properties Dialog Box for more information about specifying signal properties.

Test Points in Referenced Models that Use Library Blocks

Simulink might not log all signals configured for signal logging in a referenced model, if both of these conditions exist:

To ensure proper signal logging for the referenced model, use one of the following two approaches:

Also, when a referenced model uses a library, if you make a change that affects the set of test points in a library, or that changes the set of models that a library references, then all test pointed signals in a referenced model might not be available for display. To ensure the display of all test pointed signals, update the referenced model, as described above.

Displaying Test Point Indicators

By default, Simulink displays an indicator on each signal whose Signal Properties > Test point option is enabled. For example, in the following model signals s2 and s3 are test points:

A signal that is a test point can also be logged. See Importing and Exporting Simulation Data for information about signal logging. The appearance of the indicator changes to indicate signals for which logging is also enabled.

To turn display of test point indicators on or off, select or clear Port/Signal Displays > Testpoint/Logging Indicators from the Simulink Format menu.

  


Related Products & Applications

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

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