It appears that the symbol is able to call the OPA891 spice model without problem.
I edited the model to make the pins agree with the conventional symbols, but it won't run
I used the TI model unedited and I changed the symbol pin net numbers to match, but it won't run.
It gives the same error every time:
" Unknown subcircuit called in:
xu1 0 n002 n003 v+ v- tss/opa891_model_v1p1.lib opa891"
I believe that someone has this model running, but I don't understand the inner workings of LTspice well enough to troubleshoot this error.
Thanks for all your help.
Steve
переключити цитоване повідомлення
Показати цитований текст
On 2024-12-21 00:09, Andy I via groups.io wrote:
On Fri, Dec 20, 2024 at 03:38 PM, <info@...> wrote:
Since Version 24 came it appears that I am supposed to keep my user defined models in a different place than the factory models,
That is not new to Version 24. I think it has been such ever since LTspice IV. People who ignored the advice and tried adding their models in the wrong place, sometimes found that it did not work. It was a risky thing to add your models to the program's own library area (which I assume is what you meant by "the factory models").
Creating user-defined Sym. and Lib. Search Paths has been part of LTspice XVII for some years now. If you wish having central locations for your model files, that is probably the best way to do it, and has been for some time now.
I edited the Pin locations in the TI supplied OPA891_Model_V1p1.lib and renamed the edited version to OPA891_Model_V1p1SAH.lib. I presume that I must copy that entire file to a directory where the symbol can call it.
Yes, that entire file is the SPICE model for the OPA891. If you did not have the model file where LTspice can find it, then LTspice would not find it and the simulation would be in trouble. That is true.
SpiceModel TSS/OPA891.sub (my customized models are in a TSS subdirectory)
I might be mistaken, but I believe the ModelFile attribute is the better one to have used. There are certain "exceptions" that one gets into when using the SpiceModel attribute so I would avoid that one if I were you.
"TSS/OPA891.sub" would be correct only if that is the filespec of your model file. But you said that the model file's filename is "OPA891_Model_V1p1SAH.lib" so that is a problem. It makes no sense to call a file using a different filename than it actually has. AI aside, computers don't like guessing what you were thinking.
It seems that the SpiceModel attribute should be OPA891_Model_V1p1SAH.lib rather than .sub ...
Of course! See above. The filename you used must match the actual filename. Because you are telling it the filename of the file to load, that filename must be the actual filename.
There is a whole lot of other stuff in that file other than the opamp model itself. ...
No, there is no other stuff. Everything in that file is part of the model.
It is not unusual for a model to use more than one subcircuit, all of which are part of the model. If you eliminated the rest, it wouldn't work.
The structure T.I. used here is not one that I like, where they put all the secondary subcircuits separate from the main one, instead of inside it. I would have done it differently.. There is a small possibility of having conflicts between those secondary subcircuits and another model in the same simulation. The likelihood of that is very small, but could happen if you use another T.I. model in the same simulation. Oh well.
Should the symbol call the whole .lib file and it will figure out which part to use?
It will use all of it. It will do the right thing. That is how SPICE works.
Andy