How spice directive to add user defined signals

KiCad 8.0.

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).

“Syntax help” will show available functions .

1 Like

I use the BXXXX to do it. It works in the .trans, BUT it give me an unexpected result on .ac

B1 aol1 0 v=-V(/vo1)/V(/vn1)

Is there any place with examples with usage of the user defined signal, e.g how to invert signal, I mean simple -V(R1) does not work.

Regards
Mariusz

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.