Unknown subcircuit called in:

Thread Starter

Tim Davis

Joined Jun 10, 2015
23
Hello I got model from Texas Instruments website for LM3481 and used their auto generated suggested circuit. I imported the file using this procedure. I just took the contents out of LIB file and paste it using procedure in link, I dont find any SUB files
when I click "run" it says

UnknownSubcircuit.PNG

I tried looking at the CIR/LIB file but I dont know whats wrong.. any ideas?
 

Attachments

Papabravo

Joined Feb 24, 2006
21,094
You forgot to include the symbol for the subcircuit. The error message you got indicates that the symbol has the wrong name for the subcircuit. The official name of the subcircuit from the file you provided is:

.SUBCKT LM3481_TRANS AGND COMP DR FA_SD FB ISEN PGND UVLO VCC VIN PARAMS: SS=0

Package up the symbol and resend the zip file and I'll try to help you out.
 

Thread Starter

Tim Davis

Joined Jun 10, 2015
23
You forgot to include the symbol for the subcircuit. The error message you got indicates that the symbol has the wrong name for the subcircuit. The official name of the subcircuit from the file you provided is:

.SUBCKT LM3481_TRANS AGND COMP DR FA_SD FB ISEN PGND UVLO VCC VIN PARAMS: SS=0

Package up the symbol and resend the zip file and I'll try to help you out.
Ok great thanks.. Here is the asy symbol file
 

Attachments

Papabravo

Joined Feb 24, 2006
21,094
OK. There are two major problems which are apparent from opening the Symbol Attribute Editor
  1. In the "Value" field should be the actual name of the sub-circuit. It should say "LM3481_TRANS", without the quotes.
  2. In the "ModelFile" field you have hard coded a location on your hard drive. "DON'T NEVA DO DAT". LTspice will look in your working directory or in the system directory. The field should contain just "LM34812.CIR" again without the quotes. Why did you add the 2 on the end of the part number? Maybe you should rename the file if you don't want to keep the 2.
 

Attachments

Papabravo

Joined Feb 24, 2006
21,094
I don't know how you put the hard coded path name in into your schematic, but I had to edit the .asc file with a text editor to get rid of that hard coded path name. You still have plenty of other problems to fix. Good Luck.
 

Attachments

Thread Starter

Tim Davis

Joined Jun 10, 2015
23
I don't know how you put the hard coded path name in into your schematic, but I had to edit the .asc file with a text editor to get rid of that hard coded path name. You still have plenty of other problems to fix. Good Luck.

Thanks! Yeah I dont know how that happened, maybe in my haste trying to import the model from LIB file.. I fixed the missing values and now says u2:v_ifa: requires a minimum of 5 parameters. Only 3 specified. I looked at CIR file and it says V_IFA (bunch of spaces) FA FA_SD..

I swore it would work this time :(

[EDIT]

I have to add 3 more zeros to the PULSE line.. How can I edit the underlying file in the one you sent?
 

Papabravo

Joined Feb 24, 2006
21,094
Thanks! Yeah I dont know how that happened, maybe in my haste trying to import the model from LIB file.. I fixed the missing values and now says u2:v_ifa: requires a minimum of 5 parameters. Only 3 specified. I looked at CIR file and it says V_IFA (bunch of spaces) FA FA_SD..

I swore it would work this time :(

[EDIT]

I have to add 3 more zeros to the PULSE line.. How can I edit the underlying file in the one you sent?
All the files are text files despite file extensions. Open them and edit them in any text editor. Normally if something is visible on a schematic you can edit, modify , or delete it.
You never said what your familiarity with LTspice was. I recommend having some knowledge of what you are doing before you go mucking around like I did. I'm what you'd call an expert.

The number of required parameters for a voltage source was a change from LTspiceIV to LTspiceXVII. Be careful about editing the subcircuit files and keep accurate records of each step so you can backtrack if necessary.
 

Thread Starter

Tim Davis

Joined Jun 10, 2015
23
All the files are text files despite file extensions. Open them and edit them in any text editor. Normally if something is visible on a schematic you can edit, modify , or delete it.
You never said what your familiarity with LTspice was. I recommend having some knowledge of what you are doing before you go mucking around like I did. I'm what you'd call an expert.

The number of required parameters for a voltage source was a change from LTspiceIV to LTspiceXVII. Be careful about editing the subcircuit files and keep accurate records of each step so you can backtrack if necessary.
Thanks for your help! Im a NOOB to electrical engineering and LTSplice, but I am software engineer.. I found documentation to add zeros to the default params.. it worked... thanks!!
 

Papabravo

Joined Feb 24, 2006
21,094
Thanks for your help! Im a NOOB to electrical engineering and LTSplice, but I am software engineer.. I found documentation to add zeros to the default params.. it worked... thanks!!
That's OK. Spice was developed at a time (ca. 1972) when software and tools were a god deal less sophisticated. The syntax and semantics of the files can be obtuse. the documentation, ah that leaves something to be desired. At leas they are not in binary. Let me know if you run into additional difficulties. I see you have enough posts to use the "conversation" method of contacting me if the discussion does not need to be in the public forum.
 

eetech00

Joined Jun 8, 2013
3,847
Thanks! Yeah I dont know how that happened, maybe in my haste trying to import the model from LIB file.. I fixed the missing values and now says u2:v_ifa: requires a minimum of 5 parameters. Only 3 specified. I looked at CIR file and it says V_IFA (bunch of spaces) FA FA_SD..

I swore it would work this time :(

[EDIT]

I have to add 3 more zeros to the PULSE line.. How can I edit the underlying file in the one you sent?
When you use "AutoGenerate" method, LTspice will hardcode the path to the model file into the symbol attribute.
There have been many complaints about that.

Here is a modified model file for LTspice and Test circuit. The model is kinda crummy, imoo, but play as you will..;)I've included an LTspice symbol file that reflects the TI symbol.
 

Attachments

Top