Adding baseline criteria to a test case. Signal did not align.
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Christian Hurtig
am 3 Aug. 2018
Bearbeitet: Christian Hurtig
am 10 Aug. 2018
I'm trying to add a baseline criteria from a mat file to a test case to compare the results of the test to the expected results. The tests fail with the status "Signal did not align. Comparison cannot be plotted". The file consists of a single Simulink.SimulationData.Dataset with several timeseries elements with the same name as the outports, which seems to work for the input values. I've tried adding the port number to the names i.e "Output:4" but that doesn't seem to make a difference.
Edit: To fix this I changed the model graphically by right clicking on the lines preceding the outports and selecting "Log selected signals" and then naming the signals. Removing the port number and logging the signals allowed mapping of the signals by name to the Simulink.SimulationData.Dataset object. I feed the dataset to testcases, and those test cases to the test manager and the tests are executed as expected.
0 Kommentare
Akzeptierte Antwort
Rong Mi
am 8 Aug. 2018
Could you please tell me which release of MATLAB are you using?
Usually when the signal names are different, we will get the message “Signal did not align. Comparison cannot be plotted”. ":4" can also make the signal misalignment. You can try to capture the signal using Capture baseline in Test Manager from your design model to see whether you need the ":4" or not or other numbers.
One more possible reason is that if the logged signal is un-logged in the design model, we will get this message.
1 Kommentar
Weitere Antworten (1)
Rong Mi
am 9 Aug. 2018
Hi, The blocks that you use find_system with the block type 'Outport' to obtained are blocks, not ports.
"Outport(1)" in the following code is a "Port":
ph = get_param('vdp/Mu','PortHandles');
set_param(ph.Outport(1),'DataLogging','on');
They are referring different things.
So when you log signals, the signal associated with the Outport(a port) can be logged using set_param command. For example, the port (Outport) is associated with a block ('vdp/Mu' in the vdp model) sending out signal.
The block "Outport" is a block not a port, and it is the reason you see the error message.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Inputs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!