eeschema ngspice .op simulation is buggy

Bug #1821360 reported by Holger Vogt
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Unknown

Bug Description

eeschema ngspice
simulation .op with error

take example C:\Program Files\KiCad\share\kicad\demos\simulation\sallen_key
copy to user writable place
start eeschema
load sallen_key.sch
edit text window (mark as comment) -> *.ac dec 10 1 1Meg
Tools --> Simulator --> Settings --> Operating Point --> ok
run/Stop Simulation

simulation runs, but emits only error messages:
Error: no such vector 3
Error: no such vector 6
Error: no such vector 2
Error: no such vector 1
Error: no such vector 4
Error: no such vector 5

Reason is that after command 'bg_run' has finished, commands
print v(3)
print v(6)
...

are sent to ngspice.

The netlist
Spice Simulator --> Simulation --> Show Spice Netlist ... does not
contain node names 1 to 6 (see below), so ngspice reports errors.

.title KiCad schematic
.include "D:\Spice_general\kicad\sallen_key-op-test\ad8051.lib"
V1 Net-_R1-Pad2_ GND AC 1
XU1 Net-_C2-Pad1_ /lowpass VDD VSS /lowpass AD8051
V2 VDD GND DC 10
V3 GND VSS DC 10
R2 Net-_C2-Pad1_ Net-_C1-Pad2_ 1k
R1 Net-_C1-Pad2_ Net-_R1-Pad2_ 1k
C1 /lowpass Net-_C1-Pad2_ 100n
C2 Net-_C2-Pad1_ GND 100n
.save @v1[i]
.save @v2[i]
.save @v3[i]
.save @r2[i]
.save @r1[i]
.save @c1[i]
.save @c2[i]
.save V(/lowpass)
.save V(GND)
.save V(Net-_C1-Pad2_)
.save V(Net-_C2-Pad1_)
.save V(Net-_R1-Pad2_)
.save V(VDD)
.save V(VSS)
.op
.end

Application: eeschema
Version: (5.1.0)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.61.1 OpenSSL/1.1.1 (WinSSL) zlib/1.2.11 brotli/1.0.6 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.34.0
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.68.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.61.1
    Compiler: GCC 8.2.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    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

tags: added: ngspice
Changed in kicad:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 5.1.1
Revision history for this message
Jon Evans (craftyjon) wrote :

Not sure OP mode in the simulator GUI is fully baked yet.
See: https://bugs.launchpad.net/kicad/+bug/1821366

Changed in kicad:
milestone: 5.1.1 → 5.1.2
Changed in kicad:
milestone: 5.1.2 → 5.1.3
tags: added: eeschema
Revision history for this message
Jon Evans (craftyjon) wrote :

This is actually a feature request since OP simulation was never implemented before, so I'm bumping this to 6.0

Changed in kicad:
milestone: 5.1.3 → 6.0.0-rc1
importance: Medium → Wishlist
Revision history for this message
andrea verdi (andreaverdi) wrote :

for now i am using a gui written in lazarus by me. it starts the ngspice reading the netlist.

Revision history for this message
Sylwester Kocjan (skocjan) wrote :

Attached some helpful comments from Holger

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/2368

Changed in kicad:
status: Triaged → Expired
Changed in kicad:
importance: Wishlist → Unknown
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.