Electronics-Related.com
Forums

Dumb LTSpice question - subckt model

Started by Unknown February 24, 2015
On Tuesday, February 24, 2015 at 10:31:49 AM UTC-5, Phil Hobbs wrote:
> On 2/24/2015 10:22 AM, Jim Thompson wrote: > > On Mon, 23 Feb 2015 21:44:56 -0800 (PST), dagmargoodboat@yahoo.com > > wrote: > > > >> I've never used a mfr model that was a subckt before; I've always added > >> the .MODEL to the LTSpice library file, or edited an existing device. > >> > >> This Vishay MOSFET has a more complex model though, and she ain't loadin' > >> Jim. LTSpice says it can't find the model for M1. > >> > >> I even tried putting the definition right in the .asc, still no joy. > >> > >> I followed the LTSpice help info, as best I could. Any obvious goofs? > >> > >> Thanks, > >> James Arthur > >> -------------- > >> Version 4 > >> SHEET 1 2188 1188 > >> WIRE 752 144 304 144 > > [snip] > > > > "TEXT" doesn't read as netlist, just as commentary. > > > > You want to add a "Spice directive"... > > > > .LIB C:\Path1\Path2\etc\library_filename.lib > > > > (Extension doesn't matter, I just tend to use .lib) > > > > Put all your models in that file. > > > > See "LTspiceTutorials.zip" on the Simulation Tools & Macros Page of my > > website for lots of helpful hints. > > > > ...Jim Thompson > > > You also have to right-click on the symbol and change the prefix to "X". > Otherwise it's looking for a .model statement.
That was it Phil. Thanks! With that change the model works as a .SUBCKT in the .ASC file itself, and also as a .LIB file with the .LIB command. James Arthur
Everybody hits that snag at some point. I think it was Joerg who clued me in. 

Cheers

Phil Hobbs
On Tuesday, February 24, 2015 at 11:22:40 PM UTC-5, Jim Thompson wrote:
> On Tue, 24 Feb 2015 20:13:44 -0800 (PST), dagmargoo...@yahoo.com > wrote: > > >On Tuesday, February 24, 2015 at 10:22:40 AM UTC-5, Jim Thompson wrote: > >> On Mon, 23 Feb 2015 21:44:56 -0800 (PST), dagmargoo...@yahoo.com > >> wrote: > >> > >> >I've never used a mfr model that was a subckt before; I've always added > >> >the .MODEL to the LTSpice library file, or edited an existing device. > >> > > >> >This Vishay MOSFET has a more complex model though, and she ain't loadin' > >> >Jim. LTSpice says it can't find the model for M1. > >> > > >> >I even tried putting the definition right in the .asc, still no joy. > >> > > >> >I followed the LTSpice help info, as best I could. Any obvious goofs? > >> > > >> >-------------- > >> >Version 4 > >> >SHEET 1 2188 1188 > >> >WIRE 752 144 304 144 > >> [snip] > >> > >> "TEXT" doesn't read as netlist, just as commentary. > >> > >> You want to add a "Spice directive"... > > > >Thanks Jim, but it's in the LTSpice file as a .subckt SPICE directive. > > > >> .LIB C:\Path1\Path2\etc\library_filename.lib > >> > >> (Extension doesn't matter, I just tend to use .lib) > >> > >> Put all your models in that file. > > > >I also tried that, using a .LIB statement. Didn't work. That's why I'm > >confused--it looks like it couldn't find the file, which was in the same > >directory as the .ASC file. It still didn't work when I have a full path > >either. > > > >Since I tried the obvious things, I figure I'm missing something simple. > >Maybe I made a typo or so such. > > > >> See "LTspiceTutorials.zip" on the Simulation Tools & Macros Page of my > >> website for lots of helpful hints. > > > >Will do. Thanks. > > > > I've been trying to break Mikey of this "same directory" bull-shit... > to no avail.
Hey, Mike's a star! LTSpice has done more for the planet than <fill in the blank>. I was simulating a Linear Tech dc-dc converter and wanted an easy check on the FET losses. It didn't work. Once I got the model recognized, LTSpice broke to a micro-crawl flashing "defcon 1" in the status line when I ran the converter in the one mode I was chasing. (It simulates rapidly and cleanly in 'buck', but 'boost' makes it panic and freeze-crawl. Oh well. I can 'scope it on the hardware. I'd just wanted to explore a few alternate FETs--these are getting a bit hot for the sealed box these puppies will be bedding down in. Thanks Jim, James Arthur