in custom criteria function of simulink test the test.sltest_output is empty
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to use custom criteria by checking the custom criteria function in the test manager. The goal is to verify a signal acquired during real time testing on Speedgoat reaches two different values during testing.
I cannot access the signal data within the custom criteria function. I have logged the signal in the model, I have the logsout variable in the workspace after the model is executed, in the simulation output panel I added the signal, but the test sltest_simout is empty.
How can I access the data acquired by the real time test hardware within the custom criteria?
0 Commenti
Risposte (1)
Dimitri MANKOV
il 25 Ott 2021
Hi Stefano,
I would recommend logging the data in Simulink Real-Time using the Simuliation Data Inspector (SDI), which would enable you to base your custom criteria function on the following syntax :
% Extract desired run IDs from SDI
runID_List = Simulink.sdi.getAllRunIDs;
runID = runID_List(end);
% Export logged data to workspace
simDataset = Simulink.sdi.exportRun(runID);
% Unpack the data
signal_A = simDataset{1}.Values.Data(:,1);
signal_B = simDataset{1}.Values.Data(:,2);
...
Hope that's helpful!
Best,
Dimitri
0 Commenti
Vedere anche
Categorie
Scopri di più su Outputs in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!