The interactive simulation build-in with KiCad is very cool and easy to use. How to I use spice directive to tell the simulator dialog that I have may own defiended signals. This way, I can just enable/disable that directive text from the schematic instead.
Are there a way? I’m look that the ngpsice manual and add use the let, but it don’t seem to make the signal show up in the signal list in KiCad Simulation dialog.
.control
set controlswait
let aol1=-V("/models/vo1")/V("/models/vn1")
.endc
Currently it is not possible to get a user defined signal from a .control section into the Eeschema signal list. This might be a wishlist item to be posted on the issue tracker.
However you may define “user defined signals” by
Inspect->Simulator->Simulation->User defined signals->+ ->type in your equation/signals (from the Eeschema list).
If you look at the right of the simulator window, you will see all the signals available. I am sure that there is no signal V(R1). For user defined signals you may only use the ones from the list.
Only component currents and node voltages are computed, not voltages across components. You’ll have to build your -V(R1) from the available node voltages on the right.
The original request is still not officially supported.
But you may trick Eeschema.
In the project attached VCO_briscoe.7z (15.0 KB)
you will see a dummy resistor RV3 with its node labelled test1, set by a global label. During the transient simulation this node v(test1) will contain the value 0. But now V(test1) is in the list of signals recognized by the Eeschema plot window.
In the .control section you wait until the simulation has finished, and then you assign another value to V(test1).
.control
set controlswait
let v(test1) = v(rfout)/2
.endc
When you now plot v(test1), its indeed v(rfout) divided by 2.
You have to take care that the x axis (here time) is not changed by your manipulations, otherwise the outcome may be buggy.