After years of running LTspice IV, I've recently switched to LTspice XVII. However, I've run into the craziest problem.
I've attached a .asc I'm working on. In it there are two NPN BJTs, a 2N3019 and a 2N2219A.
Both of those devices have models in the standard.bjt file in the \lib\cmp folder.
I put the two NPN transistors into the schematic in the normal way:
Now when I run the simulation, I see the error "Can't find definition of model "2N3019' - Select OK to continue the simulation with the default model or Cancel to quit now".
What's crazy is if I replace them with PMOS MOSFETs, the simulation runs without complaint.
I'll attach my standard.bjt file so you can look and tell me if anything is weird in it.
I'll also attach the .asc file that's making this error.
Here's the schematic:
This is so strange. The MOSFET symbol works fine; that loads models from standard.mos with no issue.
But the NPN symbol simply will not load without that error.
This is the .asy file for the NPN BJT:
And this is the line in standard.bjt that it should be calling:
Can anyone see what I'm doing wrong?
Thanks.
I've attached a .asc I'm working on. In it there are two NPN BJTs, a 2N3019 and a 2N2219A.
Both of those devices have models in the standard.bjt file in the \lib\cmp folder.
I put the two NPN transistors into the schematic in the normal way:
- Click the Device icon in the toolbar
- Choose the npn option
- place that in the schematic
- right-click on the NPN transistor symbol in the schematic and choose the model from the list; 2N3019 for the top one, 2N2219A for the bottom one.
Now when I run the simulation, I see the error "Can't find definition of model "2N3019' - Select OK to continue the simulation with the default model or Cancel to quit now".
What's crazy is if I replace them with PMOS MOSFETs, the simulation runs without complaint.
I'll attach my standard.bjt file so you can look and tell me if anything is weird in it.
I'll also attach the .asc file that's making this error.
Here's the schematic:
This is so strange. The MOSFET symbol works fine; that loads models from standard.mos with no issue.
But the NPN symbol simply will not load without that error.
This is the .asy file for the NPN BJT:
Code:
Version 4
SymbolType CELL
LINE Normal 44 76 36 84
LINE Normal 64 96 44 76
LINE Normal 64 96 36 84
LINE Normal 40 80 16 64
LINE Normal 16 80 16 16
LINE Normal 16 32 64 0
LINE Normal 16 48 0 48
WINDOW 0 56 32 Left 2
WINDOW 3 56 68 Left 2
SYMATTR Value NPN
SYMATTR Prefix QN
SYMATTR Description Bipolar NPN transistor
PIN 64 0 NONE 0
PINATTR PinName C
PINATTR SpiceOrder 1
PIN 0 48 NONE 0
PINATTR PinName B
PINATTR SpiceOrder 2
PIN 64 96 NONE 0
PINATTR PinName E
PINATTR SpiceOrder 3
And this is the line in standard.bjt that it should be calling:
Code:
.model 2N3019 NPN(Is=14f Vaf=100 Bf=200 Ikf=.75 Xtb=1.5 Br=5 Rc=.7 Cjc=16p Mjc=.36 Cje=55p Mje=.1553 Tr=800p Tf=800p Itf=1.2 Vtf=5 Xtf=55 Rb=10 Vceo=80 Icrating=1 mfg=Semicoa)
Can anyone see what I'm doing wrong?
Thanks.
Attachments
Last edited:
Well, I figured it out. I'm going to post the solution here, in case anybody else steps in this pile of doodoo.
It was a formatting problem.
In my standard.bjt file (in the \lib\cmd\ folder), each line looked like this:
Now, crazy as it may seem, that's how my standard.bjt file was written when I installed LTspice XVII.
I could not find the answer to this problem anywhere -- not on All About Circuits, on the Analog Devices site, not anywhere. However, I did run across a thread somewhere in which there was a simple formatting error which generated that "Can't find definition" error message. So, I decided to look at the formatting of those lines in my standard.bjt file.
I took a wild guess. Do you see where, after ".model 2N3019", it says "NPN" and then "(Is=14f "?
Do you notice that there is no space in between "NPN" and "(Is=14f "?
That's how it was written upon installation.
I went through the whole file and put a space in between "NPN" and "(", on each line. Now that line looks like this:
Yes, that is the one and only change.
And it fixed the problem.
Now the sim runs fine.
Crazy, eh?
I can't believe I'm the only user who ran into this problem.
It was a formatting problem.
In my standard.bjt file (in the \lib\cmd\ folder), each line looked like this:
Code:
.model 2N3019 NPN(Is=14f Vaf=100 Bf=200 Ikf=.75 Xtb=1.5 Br=5 Rc=.7 Cjc=16p Mjc=.36 Cje=55p Mje=.1553 Tr=800p Tf=800p Itf=1.2 Vtf=5 Xtf=55 Rb=10 Vceo=80 Icrating=1 mfg=Semicoa)
I could not find the answer to this problem anywhere -- not on All About Circuits, on the Analog Devices site, not anywhere. However, I did run across a thread somewhere in which there was a simple formatting error which generated that "Can't find definition" error message. So, I decided to look at the formatting of those lines in my standard.bjt file.
I took a wild guess. Do you see where, after ".model 2N3019", it says "NPN" and then "(Is=14f "?
Do you notice that there is no space in between "NPN" and "(Is=14f "?
That's how it was written upon installation.
I went through the whole file and put a space in between "NPN" and "(", on each line. Now that line looks like this:
Code:
.model 2N3019 NPN (Is=14f Vaf=100 Bf=200 Ikf=.75 Xtb=1.5 Br=5 Rc=.7 Cjc=16p Mjc=.36 Cje=55p Mje=.1553 Tr=800p Tf=800p Itf=1.2 Vtf=5 Xtf=55 Rb=10 Vceo=80 Icrating=1 mfg=Semicoa)
And it fixed the problem.
Now the sim runs fine.
Crazy, eh?
I can't believe I'm the only user who ran into this problem.
You must be the only one... I just tried the 2N3019 model which is written the same way (matched exactly) in my LTspice IV and XVII setups and it worked fine with no errors. Glad you sorted it out.Well, I figured it out. I'm going to post the solution here, in case anybody else steps in this pile of doodoo.
It was a formatting problem.
In my standard.bjt file (in the \lib\cmd\ folder), each line looked like this:
Now, crazy as it may seem, that's how my standard.bjt file was written when I installed LTspice XVII.Code:.model 2N3019 NPN(Is=14f Vaf=100 Bf=200 Ikf=.75 Xtb=1.5 Br=5 Rc=.7 Cjc=16p Mjc=.36 Cje=55p Mje=.1553 Tr=800p Tf=800p Itf=1.2 Vtf=5 Xtf=55 Rb=10 Vceo=80 Icrating=1 mfg=Semicoa)
I could not find the answer to this problem anywhere -- not on All About Circuits, on the Analog Devices site, not anywhere. However, I did run across a thread somewhere in which there was a simple formatting error which generated that "Can't find definition" error message. So, I decided to look at the formatting of those lines in my standard.bjt file.
I took a wild guess. Do you see where, after ".model 2N3019", it says "NPN" and then "(Is=14f "?
Do you notice that there is no space in between "NPN" and "(Is=14f "?
That's how it was written upon installation.
I went through the whole file and put a space in between "NPN" and "(", on each line. Now that line looks like this:
Yes, that is the one and only change.Code:.model 2N3019 NPN (Is=14f Vaf=100 Bf=200 Ikf=.75 Xtb=1.5 Br=5 Rc=.7 Cjc=16p Mjc=.36 Cje=55p Mje=.1553 Tr=800p Tf=800p Itf=1.2 Vtf=5 Xtf=55 Rb=10 Vceo=80 Icrating=1 mfg=Semicoa)
And it fixed the problem.
Now the sim runs fine.
Crazy, eh?
I can't believe I'm the only user who ran into this problem.