The ERC gives me the unhelpful message “SPICE model issue” every time I run it, on any schematic. There is no correlation with whether or not the simulation runs. What does this mean?
In the last two days, every time I attempt to run a simulation, even on a schematic which I have successfully simulated in the past, I get the following error message:
Error: .include filename missing
Error: ngspice.dll cannot recover and awaits to be detached
Note: can’t find the initialization file spinit.
To be more serious: What is the KiCad version, what is the operating system?
What did you do to your files system in the last two days? Did you change path names?
I have found an answer to my second question. Apparently, it is not enough to specify the full path to an added library in the “Simulation Model”. When I changed everything back to built-in KiCad simulation models, I could get the simulation to run again.
The relevant topics I have found:
don’t say anything about simulation model libraries, but I copied all of my 3d party simulation libraries into the path given in the Preferences for KICAD7_3RD_PARTY and assigned the models from there.
That seems to have solved the 2nd problem.
I would still be grateful for an answer to the first.
I am using KiCad 7.0.6 running under Windows 10 Pro 22H2, build 19045.3448.
Is there a way to assign the models without copying the libraries in to the Path in Preferences?
I copied my 3rd Party libraries into the Symbols Folder of KiCad and the Simulation worked. Thank you for that!
But i would like to keep the libraries in another Folder.
Is there an include-Command or something so that i can keep the libraries in a separte folder and assign the models from there?
What libraries are you talking about? Spice model libraries?
KiCad 7.0.9 on MS Windows, attaching a model to a symbol:
Double click onto the symbol on the Eeschema canvas. ‘Symbol Properities’ window opens.
Simulation Model… → Spice model from file → Click on rightmost button (the file selection tab) → Browse Models window opens → select a suitable folder → select the file containing the model
This is working with the model file in whatever path and folder.
Thank you for your reply.
I did not write the libraries myself so i dont know much about them im sorry, but it says EESchema Library Version 2.4 .
I did what you said and attached the Models to my Symbols. But it only worked for the Simulation, if my Library was in the path that was designated in my Preferences. In my Example, my designated Path was in KiCad/share/Symbols. I moved my library there, assigned my Models from there and it worked.
But assigning the models from the original Folder did not work.
This library is a symbol librarry for Eeschema, not connected to ngspice. In addition you need a spice model (in a library or file) to enable the simulation. KiCad/ngspice does not offer spice simulation libraries. You have to search for them, see Spice models and model parameters for ngspice circuit simulator or other sources in the web.
Thank you i will try that. But why is the Simulation working when i move my library into the KiCad Symbols folder and assign the Simulation Models from there instead of the original Folder?
With the error message Error: .include filename missing
ngspice reports that Eeschema has sent a line .include
to ngspice, where the file name after .include is missing.
If using a network drive to store the models, it may happen (under MS Windows) that the network drive name (the UNC path), originally starting with \\ , is sent to ngspice as //.
So we have a line .incluce //patname/filname
which by ngspice is read as .include
because everything starting with // is seen as a comment.
(See also my comment below)
You may check (copy and post here) the ngspice netlist, sent to ngspice by Eeschema, (after having loaded your circuit into Eeschema) by
Eeschema → Inspect → Simulator → Simulation → Show SPICE netlist
And you may compare the netlists, when having your models in your original folder, or after copying them into the local folder.
Hmmm, if your “original Folder” is a network drive (you did not tell us anything about it), and you have started its name with //… , then the above problem may immediately surface up.
// is used by ngspice as a end-of-line comment delimiter, that is everything following a // is read as a comment and is discarded when creating the netlist.
The official definition for UNC path names on Windows is that they start with \\. This is what ngspice is expecting.
I can easily run a simulation with model libraries stored on a network drive (even with remote vpn) under MS Windows (e.g. stored at \\drive1\holger\models) by using the Windows command “Netzlaufwerk verbinden” or “connect network drive” to give the network drive \\drive1\holger a name (a new drive letter, e.g. Z) on my computer. Then after attaching the model to the symbol, there is no problem any more with // or \\, because the model is located in "Z:/models".
Thank you very much for your time and your reply Holger.
I am sorry for the delay ,i am only 2 times a week in the Office, and the insufficient report, i am working on a simplified Circuit to investigate and share the Problem correctly.
I be back and working on this in the new year, wish you blissful days.
I created a simple Transistor Test Circuit ( it is for documental purposes only ) and moved the Project to C:/Users/…/ and opened it .Then i attached the simulation Model of the Transistor from there.
This is the Netlist.