Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Variable from a subsystem as global

0 votes
I have a subsystem with two tabs, each with one Combo Box. Let's say that I chose from my Combo Box 'NVB082N65S3F'. How can I initialize FET_bridge as global? because based on the combo box selection I have a switch case function in my simulation parameters.
asked Feb 20, 2023 by Darius (14 points)

1 Answer

0 votes

The model initialization done top-down where the Model Initialization Commands (Simulation + Simulation parameters... + Initialization tab) are run first, then the various masked subsystem initialization commands (right-click component + Subsystem + Edit mask... + Initialization tab).

Your question suggests you want a bottom-up approach, which is to modify the Model Initialization Commands behavior from a dialog setting in a masked subsystem.  That is not possible with PLECS.

What you can do is assign a variable in your Model Initialization Commands (e.g. "FET_bridge_device = 2") and then assign that value to your Combo Box by clicking combo box in the block parameters window, opening the drop-down, an then replace the "<reference>" string with the variable you defined ("FET_bridge_device").


answered Feb 21, 2023 by Bryan Lieblick (1,941 points)