0
\$\begingroup\$

I am completely new to using any type of SPICE program for evaluating electrical circuits. However, having joined the ECAD movement, I have at my disposal a teaching guide on using LTspice IV and the software version LTspice XVII.

Therefore, I was bound to come up with compatibility issues; although I am not sure that this is one of them.

Basically, I have created a diode library to use with my circuits. However, when I attempt to run a simulation with the schematic that requires this library, I get the following error message "Missing expression in ..." (see attached picture).

Please note that the simulation works fine when the ideal diode within LTspice is used instead.

Any insights that you can provide will be very much appreciated.enter image description here

enter image description here

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

You said you defined you own diode library and it looks like you haven't specified all the parameters? You put those triple-queries "???" there? I think if you check your library and fix this the issue will go away.

When I followed your link, and just searched for the "???" I found the suspicious code:

enter image description here

I think something isn't right there, just like I suspected.

I don't know if "???" is a syntactic element of that language to define formal arguments to sub-models, but I doubt it is. And I doubt you should have to bind the Vmax parameter every time you use some diode.

I would try to comment that part out entirely.

\$\endgroup\$
11
  • 1
    \$\begingroup\$ Would help if you posted a link to that library where you got it. \$\endgroup\$ Sep 12, 2020 at 22:13
  • 2
    \$\begingroup\$ Thank you for your assistance. Our short dialogue has helped me to resolve my issue and I will be closing this question shortly. However, I downloaded a diode.lib file from the following link and it solved my problem. ltwiki.org/index.php?title=Standard.dio \$\endgroup\$
    – aLoHa
    Sep 12, 2020 at 23:52
  • 1
    \$\begingroup\$ If getting a new Standard.dio solves your problem, then it's your default installation that's causing you headaches. That file is part of it. The solution is to simply perform Tools > Sync Release, unless you have manually modified the Standard.dio, yourself. It's not an encouraged practise, even if you can do it. You'd be best using .lib or .inc for an external file containing the definitions for your diodes. Also, are you using LTspice IV, by any chance? If yes, LTspice XVII uses Unicode, while IV doesn't, so there may be reading errors in IV that you don't get in XVII. \$\endgroup\$ Sep 13, 2020 at 7:36
  • 1
    \$\begingroup\$ @aLoHa You shouldn't expect too many. Mostly minor UI differences (in XVII you may need to press Esc to get to a IV version GUI for certain actions). For example, this had nothing to do with LTspice (except the wrong syntax). If this answer solves your problems, be sure to select the answer with the check mark, so that others, in the future, searching for similar problems, will see this questuion with an accepted answer. Also, when replying to someone in particular, use @<tab> to select the user name. \$\endgroup\$ Sep 13, 2020 at 17:46
  • 1
    \$\begingroup\$ @GuntherSchadow Nice find, ??? is not accepted syntax in LTspice (or SPICE, in general, that I know if). You could also add a minor warning that ^ in that file will not be used as exponentiation in LTspice, but as XOR. If exponentiation is needed, then it needs to be replaced with **. \$\endgroup\$ Sep 13, 2020 at 17:48
2
\$\begingroup\$

The solution to my problem was to use another diode library from a different site (see link), which was compatible with LTspice.

ltwiki.org/index.php?title=Standard.dio

Another solution has been suggested which may suffice for those with deeper knowledge of electronics and the asociated simulation tools.

But, for those who are relative novice to the topic and just wish to progress with simulating diode-related circuits, then the above link is all that you require.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ As I mentioned in my comment, Standard.dio is part of the default installation. If that is corrupt, delete it from both Program Files -- or wherever you installed LTspice -- and from My Documents, then update the program by selecting from the menu Tools > Sync Release. You shouldn't rely on foreign libraries, even if they are from ltwiki.org. If this answers your problem, you can select your own answer. \$\endgroup\$ Sep 15, 2020 at 13:36
  • \$\begingroup\$ @aconcernedcitizen thank you for your comment. I didn't quite understand what you meant initially, but I have done as you have suggested now and hopefully this should negate the need to use a file from a foreign library. Out of curiosity, do you think that my question is worth a score? \$\endgroup\$
    – aLoHa
    Sep 15, 2020 at 13:52
  • \$\begingroup\$ "Out of curiosity, do you think that my question is worth a score?" -- +1 from me, even if only for glibness. :-) \$\endgroup\$ Sep 15, 2020 at 15:45
  • \$\begingroup\$ Much appreciated :) \$\endgroup\$
    – aLoHa
    Sep 15, 2020 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.