Hi all.
I would like to do measurements ( for example average current) using the ngspice simulator available in Eeschema without using cursors . How could I do it?
Thanks
Hi all.
I would like to do measurements ( for example average current) using the ngspice simulator available in Eeschema without using cursors . How could I do it?
Thanks
Hey hey! Give this a shot. Putting the following command as a text box on the schematic will tell the simulator to calculate the average voltage on a node I labeled on my schematic called “output”. It does this computation across the entire transient start/stop times.
.meas tran test1 AVG V(/output)
Current is a little goofier because the data vector is named less intuitively. A good way to check is to find the “Simulation->Show SPICE Netlist…” on the menu bar of the simulator. The .save
commands in the netlist show how the simulator saves the data vectors so you can reference them later. Anyway, here is me doing the same average calculation for the current through R3/
.meas tran test2 AVG @r3[i]
And then it’ll print out the result of test1 and test2 at the end of the simulation log:
.meas
commands.
Anyway, for more information, you can check out 15.4 of the ngspice manual.