0
\$\begingroup\$

I'm quite new on LTspice, and I wonder If it's possible to make a simulation of multiple user defined component (.asy files) without modify the schematic.

I have this circuit and I would like to change the component (1) in the doted box without edit it by myself and run again the simulation.

enter image description here

Is there a way to automate it with a command? And have all my measurements on the same graph?

All the components have the same dimensions and have the same number of inputs/outputs.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ It's unclear to me. Are you looking to automatically switch through all your SUBCKT models? Or will do you just want to avoid deleting and replacing the symbol, but are willing to use a drop down box to select a model? Or both? \$\endgroup\$ Commented Jul 9 at 19:52
  • \$\begingroup\$ Does the thing in the dotted box always have the same pin names and the same ordering of the pins? \$\endgroup\$ Commented Jul 10 at 0:03

1 Answer 1

4
\$\begingroup\$

You can do something like this:

enter image description here

(I'm not showing the SUBCKT code for the gen_ujt as it's not relevant to the point.)

Here, all I've done is to use numeric names for the SUBCKTs. This allows me to use an expression in the device and a .STEP card that will step through the two modeling SUBCKTs that are provided there.

Here's proof that this will run both SUBCKTs and provide the output on the same display:

enter image description here

That's two different devices applied into the same schematic, yielding two different runs with their results displayed together.

I hope that covers your interest.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.