in custom criteria function of simulink test the test.sltest_output is empty
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Dimitri MANKOV
el 25 de Oct. de 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 comentarios
Ver también
Categorías
Más información sobre Outputs en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!