- Access Data in MATLAB Function During Simulation: https://www.mathworks.com/help/simulink/slref/simulink.hmi.instrumentedsignals.html
- Save and restore signal logging specification: https://www.mathworks.com/help/simulink/ug/create-custom-visualizations-during-simulation.html
- View Signal Logging Configuration using Model Explorer: https://www.mathworks.com/help/simulink/ug/view-the-signal-logging-configuration.html#:~:text=in%20model.-,View%20Signal%20Logging%20Configuration%20Using%20the%20Model%20Explorer,-To%20open%20the
Why "ObserverParams" property is empty eventhough the 'Function name' and 'Function paramater' are filled?
1 回表示 (過去 30 日間)
古いコメントを表示
On the 'Instrumentation Properties' dialog box ,I have filled the function name and function parameter necessary for the signal which is logged.
Now when I try to get the ObserverParams,it is returning an empty strucure.
Can anyone help me with this?
0 件のコメント
回答 (1 件)
Rahul
2024 年 10 月 21 日
Hi Praful,
I understand that you’re trying to find the “Data Access” Instrumentation Property of a Signal Marked for Logging in a Simulink Model, through “ObserverParams” when using “Simulink.HMI.SignalClients” command in MATLAB Command Window.
The specified command simply creates an empty object of type “Simulink.HMI.SignalClients” which has a default property of “ObserverParams” as an empty structure and does not represent the currently logged signals or their data access functions.
In case you want to access the file path containing the data access function, you can manually include following lines of code in its implementation:
disp(['Function Name: ', mfilename]);
disp(['Function Path: ', mfilename('fullpath')]);
This could help in identifying the exact function being executed upon simulation, and its exact path. You can then access the function implementation by using ‘open(filePath)’ function to open the function file, using the ‘filepath’ displayed in the command window.
For more information regarding data logging and accessing instrumented signals during simulation, refer to the documentation links mentioned below:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Prepare Model Inputs and Outputs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!