- findall: https://www.mathworks.com/help/matlab/ref/findall.html
- guidata: https://www.mathworks.com/help/matlab/ref/guidata.html
- guihandles: https://www.mathworks.com/help/matlab/ref/guihandles.html
- set: https://www.mathworks.com/help/matlab/ref/set.html
- feval: https://www.mathworks.com/help/matlab/ref/feval.html
After each restart, the parameters of the multimeter blocks change randomly (Simulink Simscape Electrical - Specialized Power Systems)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey everyone,
I am currently using Simulink Simscape Electrical Specialized Power Systems extensively for my work. However, I have encountered a persistent issue that I find quite bothersome.
In order to perform measurements of voltages, currents, etc., I rely on several multimeter blocks. Unfortunately, after each program restart, the output parameters/measurement parameters of these multimeter blocks change randomly. As a result, I have to reconfigure the multimeter blocks every time I restart the program. This process is quite cumbersome and time-consuming.
I was wondering if any of you have experienced the same or a similar issue and could provide me with some guidance or assistance in resolving it.
Thank you in advance for your help.
Best regards,
Torben
댓글 수: 0
채택된 답변
Githin George
2024년 10월 3일
Hello Torben,
I have never encountered a similar issue with the “Multimeter Block”. From your description this seems like a bug to me. But it would be great if you could share the model to take a closer look at the issue.
As a workaround, I would suggest trying to configure your measurement parameters for the “Multimeter Blocks” programmatically. You can refer to the following script as an example:
block = 'myModel/Multimeter';
open_system(block); % open the 'Multimeter' block
hm = findall(0,'type','figure','name',block);
guidata(hm) % list all availbe handles
hAll = guihandles(hm); % get all handles
set(hAll.SelectedListBox,'Value',1:3); % select all 3 measurements in the 'Selected Measurements'
feval(get(hAll.RemoveButton,'Callback'),hAll.RemoveButton,[]); % remove them
set(hAll.AvailableListBox,'Value',1); % select the first 2 measurements in the 'Available Measurements'
feval(get(hAll.SelectButton,'Callback'),hAll.SelectButton,[]); % add them into the 'Selected Measurements'
feval(get(hAll.CloseButton,'Callback'),hAll.CloseButton,[]); % close the 'Multimeter' block
The above example involves configuring the Block Dialog box for the “Multimeter Block” in the path “myModel/Multimeter”. You can extend the script to configure your other blocks.
Refer to the following documentation links for more information on the functions used:
I hope this helps!
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Electrical Sensors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!