question about measuring currents with the ammeter symbol . If I insert it, then the sim runs with n...
m
question about measuring currents with the ammeter symbol . If I insert it, then the sim runs with no errors, but after there is no data to plot. removing the ammeter, the circuit works as intended. Any ideas why?
h
I think you need to
plot i(Vmeas)
. Doing a
plot signal
means
plot v(signal)
.
m
nothing can be plotted, all vectors are now "no such vector"
s
@Matt Venn edit the ammeter(s) and set or change the attrbute savecurrent to false:
savecurrent=false
This is due to a strange behavior of ngspice. If you dont save anything the default is used, that is save all voltage nodes and all voltage source currents (including ammeters, 0V sources). But if one ammeter is inserted with savecurrent=true it will add a .save i(vammeter) into the netlist to ask ngspice to save its current. When this happens ngspice takes the action and saves only the ammeter current. Another possibility is to add
save all
into the control block before the simulation (tran, dc, ac) line
for very big designs (20000+ nodes) only a subset of nodes is saved, to prevent excessive size of the simulation data. In this case no
save all
is used and I place these
devices/spice_probe.sym
components on '_interesting_' nodes causing a .save to be emitted into the netlist. Likewise ammeters with '`savecurrent=true`' will cause '_interesting_' currents to be saved.
👍 1
m
thanks! that was it!
image.png
💪 1