Updating library information in script
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am creating a toolbox that allows others to embed user data onto some calibrations for later reporting. The block digrams they are manipulating are libraries so the changes they make will propagate to all models with links to the library. I first unlock the library using:
set_param(Library,'Lock','off')
but when I use the following command to update the library with the changes:
set_param(Library, 'SimulationCommand', 'update')
I get the following error:
??? Simulation of model Library is not allowed because it is a block diagram library.
How do I apply the changes to the library in code?
0 commentaires
Réponses (3)
Kaustubha Govind
le 17 Sep 2012
"set_param(Library, 'SimulationCommand', 'update')" is used to compile block diagrams for simulation (for example, signals datatypes/sizes are figured out in this phase, amongst other important things), and does not apply to models. Do you mean that you want to force changes in the library to propagates to models using the library? I believe that should happen automatically when a model using the library blocks is opened.
0 commentaires
Guy Rouleau
le 18 Sep 2012
Based on your description,. it looks like you want to PROPAGATE... not update.
When looking here:
I think you need to use this param:
LinkStatus
Link status of block. Updates out-of-date linked blocks when queried using get_param.
See Check and Set Link Status Programmatically .
'none' | 'resolved' | 'unresolved' | 'implicit' | 'inactive' | 'restore' | 'propagate' | 'propagateHierarchy' | 'restoreHierarchy'
0 commentaires
Abullah abutaleb
le 25 Avr 2020
Warning: Input port 1 of 'untitled/1//La1' is not connected.
Warning: Output port 1 of 'untitled/1//La1' is not connected.
Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be equal to or less than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog.
Warning: Input port 1 of 'untitled/1//La1' is not connected.
Warning: Output port 1 of 'untitled/1//La1' is not connected.
Warning: Using a default value of 0.2 for maximum step size. The simulation step size will be equal to or less than this value. You can disable this diagnostic by
setting 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics page of the configuration parameters dialog.
0 commentaires
Voir également
Catégories
En savoir plus sur Configure and View Diagnostics dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!