Can we set programmatically parameters of 'Permanent Magnet Synchronous Machine' block?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nicolas CRETIN
le 11 Juin 2024
Commenté : Nicolas CRETIN
le 12 Juin 2024
Hello,
Does anyone know how to set programmatically parameters inside this BLDC motor block (like the initial condition for example)?
Thanks in advance!
Nicolas
0 commentaires
Réponse acceptée
Ayush Singh
le 11 Juin 2024
Hi Nicolas,
In order to set the parameters of 'Permanent Magnet Synchronous Machine' block, you can use 'get_param' and ' set_param' functions like below:
path = 'path_to_your_block';
h = getSimulinkBlockHandle(path,true);
get_param(h,'DialogParameters')
After executing the last line you will see list of Dialog parameters and then you can modify any parameter using 'set_param' for example:
set_param(h,'NbPhases','3')
% Here we are changing number of phases value to 3
For more information on above functions, refer the following links:
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Permanent Magnet dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!