Borrar filtros
Borrar filtros

PowerGui Block Message Suppression

1 visualización (últimos 30 días)
Raptorial
Raptorial el 20 de Mayo de 2022
Editada: Riya el 5 de Feb. de 2024
I have an electro-mechanical Simulink model that is implementing the PowerGui Block in a massive loop of parameters. The parameters are created in the MATLAB script that calls the Simulink model via the "sim" command. I was hoping to suppress the statement: "The electrical initial states of your model are forced to zero by the powergui block."
I have turned off all warning and error message statements possible in Simulink. I have set the PowerGui block not to display specialized power warning messages. I have set warning off all in the MATLAB script that calls the Simulink model.
Does anyone know how to suppress this message? I am concerned about the speed of my program with the constant desire to echo to MATLAB.

Respuestas (1)

Riya
Riya el 5 de Feb. de 2024
Editada: Riya el 5 de Feb. de 2024
Hi
Suppressing specific messages in MATLAB, especially those that come from Simulink models, can sometimes be a bit tricky. The message you are referring to might be considered an informational message rather than a warning or error, which is why the typical warning suppression commands might not be effective.
Here are a few steps you can try to suppress the message:
  • Diagnostic Viewer: Check if the message appears in the Diagnostic Viewer during simulation. If it does, you can configure the Diagnostic Viewer to suppress certain messages.
  • Simulink Diagnostics: Go to `Home > Preferences > Simulink > Diagnostics` and adjust the diagnostic settings for "Algebraic loop," "Artificial algebraic variables," and other parameters to see if that suppresses the message.
  • PowerGui Block Configuration: Double-click on the PowerGui block and ensure that all the settings under "Simulation Status" or similar tabs are set to minimize verbosity.
  • Custom S-Function: If none of the above methods work, consider writing a custom S-Function that initializes the electrical states to zero and use it instead of the PowerGui block for initial state configuration.
Use "evalc":You can try running the simulation command inside `evalc`, which captures the output that would normally go to the command window. This doesn't suppress the message but prevents it from slowing down the simulation by printing to the command window.
T = evalc('sim(model)');
For more information about evalc function refer: https://www.mathworks.com/help/matlab/ref/evalc.html
Remember that suppressing messages that are not warnings or errors can be more complex, and sometimes the capability to suppress them is not exposed to end-users. Always make sure that suppressing such messages does not hide important information about the state of your model that could affect simulation results.
For more information refer following article:

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by