LTspice
Production
LTspice® is a powerful, fast, and free SPICE simulator software, schematic capture and waveform viewer with enhancements and models for improving the simulation...
LTspice on Analog.com
Issue: When I run the simulator on my circuit, I get:
Unknown subcircuit called in:
xu1 n001 input n001 opamp aol=100k gbw=10meg
What's odd is that I've not specified any .subcircuit directives. Here's the entire net list:
*
XU1 N001 INPUT N001 opamp Aol=100K GBW=10Meg
XU2 N002 0 OUTPUT opamp Aol=100K GBW=10Meg
R1 N002 N001 10K
R2 OUTPUT N002 10K
R3 N001 INPUT {RPot*wiper}
R4 INPUT OUTPUT {RPot*(1-wiper)}
V1 INPUT 0 1
.param RPot 10k
.param wiper 0.5
.step param wiper 0.1 0.9 0.1
.tran 4m
.backanno
.end
I"m pretty sure this is a simple error on my part. Schematic and .asc file included.
4137.Draft3.asc
I think the UniversalOpAmp1 would work. Instead, I added a ".lib opamp.sub" along with the other changes you mentioned and the simulation works now. (Side question: what's wrong with a 0 ohm resistor? It would be handy if that were allowed...)
I think the UniversalOpAmp1 would work. Instead, I added a ".lib opamp.sub" along with the other changes you mentioned and the simulation works now. (Side question: what's wrong with a 0 ohm resistor? It would be handy if that were allowed...)
Hi rdpoor,
You asked "(Side question: what's wrong with a 0 ohm resistor? It would be handy if that were allowed...)"
SPICE doesn't allow them, that's all. Simulations involve several trials while converging on a result. If it ever tried it with even a femtovolt across the resistor, the current would blow up. So it is a restriction that they put into SPICE, some 50 years ago.
.step param wiper 0.001 0.999 0.1
Regards,
Andy