- Tutorials >
- Creating subcircuits and custom libraries
- Modeling a system in electrical and mechanical domain
- Stop at steady state
- AC Sweep analysis
- Parameter Sweep analysis
- Using the C-Code block
- Using the "C code (external file)" block for debugging purpose
- Using the Controlled PWM Generator model
- Using the Thermal modeling of power switches
- Import thermal library file (xml)
- Modeling coupled inductors
- Basic >
- PS and Drives >
Creating subcircuits and custom libraries
This tutorial explores the creation of sub-circuits and custom libraries.
This feature can help you organize your circuit:
- for example, to separate your control circuit diagram from your power circuit from your power circuit diagram,
- or to repeat an identical part of your circuit.
How to create and modify a subcircuit
To describe this feature, the example of a single-phase controlled rectifier is considered. A sub-circuit for controlling the ignition delay angle will be created.
Step 1: Select the part of your schematic that you want to include in your sub-circuit, and click on sub-circuit: this automatically creates a sub-circuit component.
Step 2: To enter this component, just select it and click on open to view the delay control diagram.
If you want to add an input or output pin, go to the library panel and you can notice that you have a new library with all the necessary pins for sub-circuits.
Step 3: If you rotate an input or output pin, it automatically changes the direction of connection in the upper main circuit, as shown below.
Step 4: This sub-circuit can now be copied and glued to be used for the second branch of the rectifier.
Warning: Note that if a sub-circuit is modified, this modification will automatically be applied for all copies in your schematic.
How to add a sub-circuit to the custom library
Step 5: To take it a step further, this sub-circuit can be added to a custom library. Start by creating your custom library.
Step 6: To add a sub-circuit to this new custom library:
- click on "new subsystem", choose a name and prefix for your sub-circuit, select the sub-circuit you want to add, and choose* the "from current selection" option for the initial content.
This component can now be used in all the designs of the project.
This concludes the introduction of subcircuit creation and custom libraries.