wishlist: add custom vectors to plot window by name

Bug #1851373 reported by Jonatan Liljedahl on 2019-11-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Undecided
Jonatan Liljedahl

Bug Description

Using ngspice `let foo=...` is a powerful way to create custom vectors by doing math on existing vectors, etc. For example `let AB=V("/m2")/V("/m1")` as in this example: https://forum.kicad.info/t/ac-analysis-of-op-amp-loop-gain-and-phase/19661/4

The problem is that such custom vectors does not show up in the list of signals in the built in simulator plot window. An easy solution would be to just allow adding any signal by name via a text entry. This could then auto-complete to the available net names, but also allow names that are *not* in the list of nets, such as `AB` above. It would also greatly speed up the process of adding signals instead of having to scroll through all the auto-named `Net-(Device-PadN)` signals.

As can be seen in the above forum post, I did found a trick to have custom vectors show up, by adding a global netlabel using the same name, connected to a dummy resistor. This works, but is a work-around, and has the problem that those curves are not updated when you change values in the schematic and re-run the simulation. One has to either close and re-open the plot window, or re-add the signals again.

In any case, this shows that such functionality would be an easy add! Unfortunately I haven't managed to compile kicad on macOS, otherwise I'd give it a go myself :)

Application: Eeschema
Version: (5.1.5-rc1-4-g47deb8dea), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1
Platform: Mac OS X (Darwin 18.5.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (wchar_t,STL containers,compatible with 2.8)
    Boost: 1.69.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Jonatan Liljedahl (kymatica) wrote :

I've now sent an updated patch that implements this feature to the dev mailing list.

Changed in kicad:
assignee: nobody → Jonatan Liljedahl (kymatica)
status: New → In Progress
tags: added: eeschema
Changed in kicad:
milestone: none → 6.0.0-rc1
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision c71202d143d827d713c7e9912184843a25730bbd
https://git.launchpad.net/kicad/patch/?id=c71202d143d827d713c7e9912184843a25730bbd

Changed in kicad:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers