Very Basic LTSpice question

Thread Starter

guitar_paul

Joined Apr 26, 2018
8
I keep getting the error shown in the attached. I can't get it to read the model either from a Spice directive or from a file.
I don't want to use a file. I want to put the model directly in as a Spice directive.
What am I doing wrong?ltspice model problem_a.jpgltspice version window.jpeg
 

Thread Starter

guitar_paul

Joined Apr 26, 2018
8
Version 4
SHEET 1 2292 772
WIRE 560 128 64 128
WIRE 560 272 560 208
WIRE 64 448 64 128
WIRE 560 528 560 336
FLAG 64 528 0
FLAG 560 528 0
SYMBOL res 544 112 R0
SYMATTR InstName R1
SYMATTR Value 1k
SYMBOL voltage 64 432 R0
SYMATTR InstName V1
SYMATTR Value PULSE(0 5 0 3m 0 4ms 8ms 1 )
SYMATTR Value2 AC 5
SYMBOL diode 544 272 R0
WINDOW 0 51 27 Left 2
SYMATTR InstName D1
SYMATTR Value 1N34A
TEXT 792 248 Left 2 !.tran 3m
TEXT 784 272 Left 2 !.options maxstep=10u
TEXT 784 344 Left 2 !.end
TEXT 496 712 Left 2 ;Keep getting error "Missing Model Definition for 1N34A.\nFor right now, I just want to include the model as a spice directive.\nWhat am I doing wrong?
TEXT 792 192 Left 2 !.MODEL 1N34A D(bv=75 cjo=0.5e-12 eg=0.67 ibv=18e-3 is=2e-7 rs=7 n=1.3 vj=0.1 m=0.27)
TEXT 800 152 Left 2 !* nope this didn't work either.SUBCKT 1N34A 2 0
 

crutschow

Joined Mar 14, 2008
34,452
Remove the .end statement.
Why did you include that?
The .end statement is automatically included in all LTspice files, and adding an extra one apparently confused it.
 

Thread Starter

guitar_paul

Joined Apr 26, 2018
8
Got it!!
My rookie mistake with this new fangled GUI.
(I learned what little I know of spice back in dinosaur days.)
I moved the .end directive to the bottom of the ascii file and it works now.


The answer is I guess that the ascii file fills up in the order of keyboard entry.
Makes sense, somehow.
Note to self:
check ascii file before getting frustrated.

Thanks to crutschow for pointing me in the direction of looking at the ascii source.
And thanks for the info that the .end is now automatic.

Thanks everybody soooo much! And thanks, eetech00. I saw your post after I posted this.

ltspice 1N34a success.jpeg
 

Audioguru again

Joined Oct 21, 2019
6,692
I also made lousy circuits with vacuum tubes, germanium diodes and transistors 60 years ago.
A little later I made much better circuits with silicon diodes, transistors and ICs.
 
Top