Installing and using LTspice IV (now including LTXVII), From beginner to advanced

Adding and using a PSpice model in LTSpice.




7/ We now need to simply rename the file to TLE2072.mod by simply right clicking and changing the 301 to mod. For some reason W8.1 changes the view to that of a movie but its of no consequence.





At this point, hopefully, your simulation should run.





So there we have adding a Pspice model to LT and working through the steps needed to get it all to work. Hopefully, by showing where and why it didn't work, you have a better idea of figuring out solutions.

I know I've learnt a lot from doing that.

I did up to this point and change to .mod. It still gave me error. This is the error message:


Circuit: * C:\Users\Chicky\Desktop\Revera\Simulation\Adding Models 1.asc

Error on line 6 : v2 n004 0 sine(0 .1 1000 0 0 0) ac vinput
Unknown parameter "vinput"
Direct Newton iteration for .op point succeeded.

Date: Thu Mar 26 23:14:56 2015
Total elapsed time: 0.047 seconds.

tnom = 27
temp = 27
method = modified trap
totiter = 2090
traniter = 2084
tranpoints = 1043
accept = 1043
rejected = 0
matrix size = 30
fillins = 40
solver = Normal
Matrix Compiler1: 195 opcodes 1.0/[0.4]/0.5
Matrix Compiler2: 3.00 KB object code size 0.4/0.6/[0.3]


What is this?

I tried copying the model file into .txt with notepad and change the .include TLE2072.txt. I still get the same error message.

Thanks
 
Last edited:
Right click on V2 and in the AC Amplitude box change "Vinput" to "1".

BTW you don't have to change the extension to .mod, just leave it as .301 and write it as ".inc TLE2072.301" in your include directive on the schematic. It will work as long as they match. ;)
 

Attachments

  • adding_models1.png
    adding_models1.png
    20.2 KB · Views: 227
Right click on V2 and in the AC Amplitude box change "Vinput" to "1".

BTW you don't have to change the extension to .mod, just leave it as .301 and write it as ".inc TLE2072.301" in your include directive on the schematic. It will work as long as they match. ;)
Thank you. I was wondering why the AC amplitude is "Vinput" instead of a number.

BTW, I made it run as .txt file. I simply copied the content from the original .301 into the Notepad and save as .txt file. Then I use .include TLE2072.txt and it also work.

Thanks
 
Seeking your guidance..

Hello Mooly. I hope that you are well. Thank you for this thread and your ongoing guidance to use this valuable LTspice tool. I see that you and others are able to import schematics and plots in your posts; but I am unable to do so. Please provide guidance to resolve this matter.

Thank you and kind regards.
 
Administrator
Joined 2007
Paid Member
Yep, as keantoken says, you use the advanced button :)

To add a photo, files or non standard files.

First click "go advanced" in the box below the "quick reply" message box. Doesn't matter if you decide half way through a message to do that, it carries it forward.

Then click "Manage attachements". Maximise the new Window so that you can see all the text.

Click browse in the first box at the top and find your picture. Repeat for any more pictures.
Click upload... a message appears "uploading"
When complete the files will show as being attached. Now click the small text that says "close this window"

The pictures should now be attached and when you submit your post they will appear.

Make sure your pics aren't too big, a couple of 100k is plenty, and many members object when they are massive and it alters the margins
It tells you in the attachments window what max sizes are allowed.

If you want to attach a file that has a non standard format for example excel, circuit simulation etc then try putting the files in a zipped folder and attaching that.
 
Hello Mooly and keantoken.

Here is an example of my problem. I attached the requisite file which has a bjt icon and a name; but the posted attachment will appear [past experience] as text instead of a schematic

Best regards

NB A message appeared after I clicked on the attachment in the above post saying error of sending the command to the program.
 

Attachments

  • ClassaPfig51.asc
    6.2 KB · Views: 93
Last edited:
If you open that with notepad, you will see it's actually english code. LTSpice reads that code to draw a schematic. LTSpice uses it's own code so only it can convert the file to an image. In LTSpice there is an option in the Tools menu to save the current work window as an image. Make sure you have the schematic window selected when you do this. Then you can upload the resulting image.

If that doesn't work for some reason you can take a screenshot and post that.
 
If you open that with notepad, you will see it's actually english code. LTSpice reads that code to draw a schematic. LTSpice uses it's own code so only it can convert the file to an image. In LTSpice there is an option in the Tools menu to save the current work window as an image. Make sure you have the schematic window selected when you do this. Then you can upload the resulting image.

If that doesn't work for some reason you can take a screenshot and post that.

Thanks keantoken. Todate I have been doing the highlighted in your note, and hopefully will adopt your suggested scheme.
 
Administrator
Joined 2007
Paid Member
Hello Mooly and keantoken.

Here is an example of my problem. I attached the requisite file which has a bjt icon and a name; but the posted attachment will appear [past experience] as text instead of a schematic

Best regards

NB A message appeared after I clicked on the attachment in the above post saying error of sending the command to the program.

The error message is something I noticed happens in both W7 and W8.1. Vista has no problem.

The solution is simply to browse for the file you want to open via LT itself. Click 'File' at the top left in LT and then 'Open'. You can then browse for the file you want.

Your .asc file opens directly for me. Are you saying that it opens as a text file when you click it directly ? If so then you need to change the 'default program' that opens .asc files to be LT and not notepad.
 

Attachments

  • Capture.PNG
    Capture.PNG
    221.7 KB · Views: 220
Thank you Mooly for your generous help and guidance. In the first 20 posts of this thread you have [easily] imported windows and performance outputs from LTspice and models into it. You already have a method or a process to further teach it in a methodical manner. There is monkey wrench in what I'm doing which is preventing me from directly posting my schematics in a diyaudio forum [and via e-mailing it to myself] like you just did above. I hope that you consider publishing your proven method which furthers the value of communication in posts. A schematic in plain view is worth a thousand words.

Best regards
 
Thanks Antoinel. Are you still not able to attach images like the above example ?

Adding pictures inline as I have done throughout this thread is a bit more involved than just attaching them to the end of the post (like the one above) but post #3 here outlines how to do it.

http://www.diyaudio.com/forums/foru...cs-script-paragraphs-between.html#post4126045

Thank you Mooly for your continuing attention and help. The bold text in your post is my objective which has escaped me. I'll work on your clear suggestion.

Todate, I still get an error message that a command to the program failed on the laptop which uses Win 8. I have LTspice also loaded on a desktop running on Win XP. It does not give this error message. I will also use your suggestion therein.

Best regards

N.B. I see what you mean by a bit more involved; albeit methodical and clear in your post.
 
Last edited:
Administrator
Joined 2007
Paid Member
I get that same error message on W8.1 too. I also got it in W7. If you locate the file via LT it will not do this.

Also, once you have run a file then LT 'remembers' and you can instantly load it via LT just by right clicking the empty workspace and selecting the file. The last 10 files used are remembered in the order they were last accessed.
 

Attachments

  • Untitled.png
    Untitled.png
    199.7 KB · Views: 202
Hello Mooly. I was not successful using the LT route which gave the attached but not the actual schematics. The audioamp attachment is an example from the LT examples collection.

I need to further study your recommendations.

Thank you and kind regards.
 

Attachments

  • PR60.asc
    4.9 KB · Views: 58
  • audioamp.asc
    5.3 KB · Views: 58
Administrator
Joined 2007
Paid Member
Those files open correctly for me. What are you seeing ?

Does this help (W8.1). Go to Control Panel on your PC and click on Default Programs. Now click on Associate a file type or protocol with a program and make sure LT is the default. It will be similar in W7 and probably Vista.

Edit... there are more to check. Look for .asc, .asy, .cir and the ones at the end of the list as shown in the attached image.
 

Attachments

  • Capture2.PNG
    Capture2.PNG
    243.6 KB · Views: 190
  • Capture3.PNG
    Capture3.PNG
    277.1 KB · Views: 183
  • Capture5.PNG
    Capture5.PNG
    28.7 KB · Views: 178