Workaround to Goto problems in Enabled Subsystems
Afficher commentaires plus anciens
Hello MATLAB Community,
I'm currently working on a Simulink model that includes a Powergui block set to EquivalentMode2 and a Current Measurement block. I need to use an Enabled Subsystem to manage part of my model, but I'm encountering issues with dynamically created Goto blocks when converting the subsystem.
Problem Description:
- Setup:
- My model includes a Controlled Voltage Source (in AC mode) and a Current Measurement block.
- These blocks are part of a larger subsystem that needs to be enabled and disabled based on specific conditions.

- Issue:
- When I convert the subsystem to an Enabled Subsystem, Simulink dynamically creates Goto blocks within the Powergui's EquivalentMode2 block, specifically inside the Current Measurement block.
- This results in an error: Goto/From connections cannot cross nonvirtual subsystem boundaries.
Steps I’ve Taken:
- I tried to manage the Current Measurement using standard Simulink blocks and physical signal converters but encountered issues with solver requirements.In other words, I cant add more complexity to an already fairly complex model, it would take forever.
- I also attempted to create custom measurement logic but faced difficulties with integrating it seamlessly into the existing physical simulation. Again, here whatever I do requires a Solver and it turns it unfeasible to run (takes forever).
- I took the AC Source, Current Measurement and even the Diode out... but the problem still persist...
Error message I got:
Multiple Gotos found with tag named 'DOC'
Component:Simulink | Category:Model error
First offending Goto 'integrated_bat_fuel_2/powergui/EquivalentModel2/Yout/Goto2'
Component:Simulink | Category:Model error
Second offending Goto 'integrated_bat_fuel_2/FuelCell Subsystem/FuelCell 1 kW 24V DC/Fuel Cell Stack/Current Measurement1/source'
Component:Simulink | Category:Model error
Additional Context:
- I'm using Simulink with a combination of Simscape Electrical components.
- The model involves a mix of physical and Simulink signals, making it critical to maintain compatibility across different simulation domains.
Any guidance or recommendations would be greatly appreciated!
Thank you, [Your Name]
Feel free to modify the draft as needed to better fit your situation or to add any other relevant details.
4o
Any ideas? Please advice , I already ran out of ideas and I have no clue on how to solve this, any guidance or recommendations would be greatly appreciated!
Thank you,
Raul
2 commentaires
tom
le 12 Juil 2024
Steps to Resolve Goto Problems in Enabled Subsystems
- Scope Verification
- Ensure the Goto block’s tag visibility includes the From block. Adjust scope settings if necessary.
- Use Data Store Memory
- Replace Goto/From blocks with Data Store Memory, Data Store Read, and Data Store Write blocks to manage signal access across the model.
- Enable Port Configuration
- Verify the enable port settings to ensure the subsystem executes correctly.
- Model Advisor and Diagnostics
- Run Model Advisor checks and enable signal resolution diagnostics in Configuration Parameters.
- Simplify Model Structure
- Break down complex enabled subsystems into smaller parts for easier troubleshooting.
Example with Data Store Memory:
- Add a Data Store Memory block named "mySignal".
- Use Data Store Read within the enabled subsystem to access "mySignal".
- Use Data Store Write elsewhere to update "mySignal".
Raul
le 13 Juil 2024
Réponses (0)
Catégories
En savoir plus sur Component-Based Modeling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!