about test point during code generation
显示 更早的评论
hello, what's the purpose of test point in code generation, an how it realized. i'm not clear about this.

采纳的回答
更多回答(1 个)
Hi,
I see that you want to understand the purpose of test points in code generation.
A test point is a signal in Simulink that is guaranteed 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 and block reduction. These optimizations can render signals inaccessible and unobservable during simulation. Signals designated as test points will not have algebraic loops minimized, even if the "Minimize algebraic loop occurrences" option is selected.
Test points are primarily intended for use when generating code from a model with Simulink Coder. Marking a signal as a test point ensures that it remains observable and is not affected by model optimizations that can obscure its behavior.
Please refer to the documentation below to learn more about configuring signals as test points and the appearance of test points in the generated code.
Configure Signals as Test Points: https://www.mathworks.com/help/simulink/ug/working-with-test-points.html
How Generated Code Stores Internal Signal, State, and Parameter Data - Appearance of Test Points in the Generated Code: https://www.mathworks.com/help/rtw/ug/how-generated-code-stores-internal-signal-state-and-parameter-data.html#f1043283
I hope this helps.
类别
在 帮助中心 和 File Exchange 中查找有关 Test Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!