Verifying Logged Signals in Simulink Test, Test Sequencer

3 次查看(过去 30 天)
I'm using Simulink Test Sequencer to verify a simulink model. In my model there is an intermediary signal that is not an input or output. How can I user a verify(statement) on that signal if it isn't an input or an output?

回答(1 个)

Alex Howard
Alex Howard 2021-8-13
Hi Wilson, it sounds like you're having an issue using verify for specific signals with Simulink Test Sequence blocks.
One method you might be able to use is the Goto and From blocks in Simulink. The Simulink Test documentation lists Goto-From Connections as valid connections for test harness construction.
This example shows how you can construct a test harness with Goto and From blocks:
open AutopilotTestFile.mldatx,
open_system RollAutopilotMdlRef,
sltest.harness.open('RollAutopilotMdlRef/Roll Reference',...
'RollReference_Requirement1_3')
In the test harness RollReference_Requirement1_3, click the TurnKnob_A input to the Test Assessment block. If you can't find that block, try entering this code at the MATLAB command prompt.
hilite_system('RollReference_Requirement1_3/In_From_3')
In the Block Paramters dialog box, click Goto Source to see an example of how to construct your model using a Goto block.
For more general information on authoring verify statements, see Assess Model Simulation Using verify Statements.

类别

Help CenterFile Exchange 中查找有关 Inputs 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by