- 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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Torben
el 27 de Sept. de 2024
Comentada: Torben
el 4 de Oct. de 2024
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 comentarios
Respuesta aceptada
Githin George
el 3 de Oct. de 2024
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!
Más respuestas (0)
Ver también
Categorías
Más información sobre Electrical Sensors en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!