Is there a way of getting the "LoggingName" and "Source Port" of all the Logging Selected Signals directly in Matlab?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello all,
I have a Simulink model in which there are some Logging Selected Signals. I can manually check the "LoggingName" of all the Logging Selected Signals by opening the Simulink model and then going under Configuration Parameters > Data Import/Export > Signal logging > Configure Signals to Log... (see the image below).
Is there a way of getting the "LoggingName" and "Source Port" of all the Logging Selected Signals directly in Matlab without opening the Simulink Signal Logging Selector?
If I open the Simulink model and manually Log Selected Signal, the name of the signal is stored under "Source Port" but not under "LoggingName". Is there a way of storing the signal name under "LoggingName"?
It would be a great help to me if someone could give me a solution.
Thank you in advance.
0 Kommentare
Antworten (1)
Fangjun Jiang
am 28 Apr. 2021
After a simulation, your signal logging data is saved as, e.g. logsout
Run logsout.getElementNames and other API to get the info you need
You need to right click the signal line, select properties, and provide a signal name
2 Kommentare
Fangjun Jiang
am 29 Apr. 2021
Then do something like this. Use set() to change name in a for-loop after checking names
hLine=find_system('YourModel','FindAll','On','type','line');
index=cell2mat(get(hLine,'DataLogging'))
get(hLine(index),'name')
Siehe auch
Kategorien
Mehr zu Prepare Model Inputs and Outputs 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!