Huntkil
Huntkil

Reputation: 131

Testpoint and its use in Matlab

What is a test point and its intended use in matlab ? I am working on a model and have to use 3 AND gates in conjunction coupled with similar 2 more AND gates. While checking the model I am getting warning "Identify single logical operator blocks with more than 9 inputs signals.", which is not shown if I use testpoint on each of these AND gate output.

Upvotes: 0

Views: 1062

Answers (1)

Phil Goddard
Phil Goddard

Reputation: 10772

Think of a signal in Simulink as corresponding to a memory location. In an effort to reduce memory consumption, one of the standard optimizations used by Simulink is to re-use the same memory address when possible.

For instance, assume the input to a gain block is stored at memory location X. Then the output of the gain block would overwrite the data in X. Consequently the input value would no longer be available. But it doesn't need to be as it's value is never used again. (This assumes that the input value is not used elsewhere, such as feeding a block like a Scope.)

In your case, the warning is telling you something about Simulink storing the logical values in memory locations that it subsequently overwrites when possible.

Note that Simulink will never re-use memory when it needs the signal value in subsequent calculations, i.e. when it would effect the simulation result if it did so.

Nor will it re-use memory (for a specific signal) when you designate the signal as being a test point. This is why the warning is going away in your case.

One particular use of a test point is if you are using a Floating Scope. Floating Scopes cannot be made to look at signals where the memory is being re-used because then it wouldn't be clear which signal was being displaying. By looking at only test points it is guaranteed that you are looking at the expected data/memory.

Upvotes: 1

Related Questions