Main Content

circuitWizard

Build block or analyze circuit from circuit object

Since R2025a

Description

Use the circuitWizard object to build a block from or perform linear or switched circuit analysis of a circuit object. The circuit object is created from a Simscape™ circuit diagram.

Creation

Description

cktObj = circuitWizard(cktObj,"build","AnalogCircuit") builds a Mixed-Signal Blockset™ block from the cktObj object and places it in the Simulink® model AnalogCircuit.

example

cktObj = circuitWizard(cktObj,"analyze") performs the linear and switched circuit analysis of the cktObj object. For more information about how to construct the circuit object or set up the analysis, see Simscape Automation Using Command Line Interface.

Properties

expand all

Circuit object from which to build the Mixed-Signal Blockset block or run analysis, specified as an object.

Determine whether to a build block or run analysis of cktObj object, specified as either build or analyze.

If you are building a block, you must specify the Simulink model name where to place the block.

Simulink model name where to place the block, specified as a string.

Examples

collapse all

Open the Simscape™ model containing the circuit diagram.

open_system("ThirdOrderPassiveLoopFilter.slx")

Create the variable and statement structures.

[variables,statements] = ssc2cw("ThirdOrderPassiveLoopFilter");

Create the circuit object by configuring the details of the block parameters.

cktObj = msblks.Circuit.CircuitConfiguration(variables,statements, ...
    "CircuitDesignName",'3rd order passive',"BlockName",'Loop Filter', ...
    "ConfigurationName",'3rdOrderPassive',"AttachConfiguration",true);

Build the block and place it in the Simulink® model AnalogCircuit.

cktObj = circuitWizard(cktObj,"build","AnalogCircuit");

Version History

Introduced in R2025a