Can we set programmatically parameters of 'Permanent Magnet Synchronous Machine' block?
조회 수: 9 (최근 30일)
이전 댓글 표시
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
채택된 답변
Ayush Singh
2024년 6월 11일
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:
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Permanent Magnet에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!