How can I access the signals and parameters of un referenced or Local configuration model

3 visualizzazioni (ultimi 30 giorni)
I want to Access, the Signals, Parameter, States of a un-referenced model or local configuration model ,
How can i do that?

Risposte (1)

Shubham
Shubham il 4 Dic 2024
Hi Manoj,
To access signals, parameters, and states in an unreferenced or local configuration model in Simulink, follow these methods:
  • Log Signals: Right click the signal, select Properties, and check 'log signal'. Use the Simulation Data Inspector to view them.
  • Programmatic Access: Use get_param and set_param to access and modify parameters:
param = get_param('model_name/block_name', 'ParameterName');
set_param('model_name/block_name', 'ParameterName', 'newValue');
  • Initial States: Use Simulink.BlockDiagram.getInitialState('model_name').
  • Workspace Export: In Configuration Parameters, enable 'States' and 'Signal logging' under Data Import/Export, and then run the simulation.
  • Use find_system to locate blocks and signals.
blocks = find_system('model_name', 'Type', 'Block');
Ensure that the model is loaded with load_system('model_name') if unreferenced.
For more information, refer to the following documentation links:
Hope this helps.

Categorie

Scopri di più su Programmatic Model Editing 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!

Translated by