It’s looking for a model by the name OPAMP, since that’s what is in the Spice_Model field. Change it to TLV246X since that’s what is in the model file.
After fixing the model name and replacing all the values using scientific notation (e.g 1.2E-6) with values using spice notation (e.g. 1.2u), I still get this error:
Compatibility modes selected: ps lt
Circuit: KiCad schematic
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Warning : voltage source v1 has non-increasing PWL time points.
Error on line 0 :
a$poly$f.xu1.fb %vnam [ v.xu1.vb v.xu1.vc v.xu1.ve v.xu1.vlp v.xu1.vln ] %id ( xu1.7 xu1.99 ) a$poly$f.xu1.fb
MIF-ERROR - model: a$poly$f.xu1.fb - Bad real value
Background thread stopped with timeout = 0
Error: circuit not parsed.
I don’t understand the warning about v1 nor the error for a$poly$f...
v1 is defined as PWL (0 0 1 1 2 2 3 3 4 4 5 5 5 5 5 5 5 5 5 5 5 5), which should be a ramp voltage from 0 to 5 volts and remaining at 5 volts. It worked before in an earlier rendition of this circuit without the op amp.
A follow up questions. Is there a difference in spice between 10.0000p and 10.0p and 10p?
This model is the original one from the TI data sheet tlv2462.spi (797 Bytes)
This model has my edits, and is the one used to generate the error messages. tlv2462.spi (721 Bytes)
Not sure what’s going on there at a glance either.
I think it’ll work but it’s definitely dodgy, you shouldn’t need to repeat equal time points like that. 0 0 1 1 2 2 3 3 4 4 5 5 is enough and should silence the warning. It always holds the last value for the rest of time.
Thanks - removing the extraneous 5 5 5 5 entries got rid of the v1 errors. Strange that this error did not come up in my earlier model.
I still have this error:
Compatibility modes selected: ps lt
Circuit: KiCad schematic
Error on line 0 :
a$poly$f.xu1.fb %vnam [ v.xu1.vb v.xu1.vc v.xu1.ve v.xu1.vlp v.xu1.vln ] %id ( xu1.7 xu1.99 ) a$poly$f.xu1.fb
MIF-ERROR - model: a$poly$f.xu1.fb - Bad real value
Background thread stopped with timeout = 0
Error: circuit not parsed.
I had a similar error with my earlier schematic/simulation, and it turned out I had to install the ngspice package on my Ubuntu system for it to be resolved. I was missing the *.cm files. They are still there, so I am not sure what else is not working in my kicad/ngspice setup. I installed kicad from the kicad website download section:
Where did you get the TI model from?
Do you have a decent text editor which may switch the encoding of the text between UTF8 and ANSI? Your file tlv2462.spi is encoded in UTF8. After switching the encoding to ANSI, watch the ‘-’ characters.
It is not ‘-’, but something like ‘−’, a hyphen only seen in UTF8, but not usable as a mathematical operator or for describing negative numbers as ngspice input. ngspice does like to see the standard ‘-’ when dealing with numbers, so if it gets something like −2 instead of -2, it will complain about a bad real value. When I replace all UTF8 - by the correct ANSI -, the model will be accepted by ngspice.
I figured out how to change from UTF-8 to ANSI, and now the error messages are gone. I will remember this for future copy and paste from data sheets.
I have two warnings -
Compatibility modes selected: ps lt
Circuit: KiCad schematic
Reducing trtol to 1 for xspice 'A' devices
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000
Warning: v1: no DC value, transient time 0 value used
Warning: v.xf1.v1: has no value, DC 0 assumed
Not sure about the v.xf1.v1, unless they are the same warning? v1 is defined to be 0 at time 0, so not sure what to change in the simulation parameters to address the warnings.