Post Go back to editing

LTspice 24.1.4 incompatibilities (with LTspice 24.0.12 and earlier)

Category: Software
Product Number: LTspice 24.1.4
Software Version: 24.1.4

Hi,

I noticed that quite some things have been changed recently. I had to downgrade from LTspice version 24.1.4 to 24.0.12 to get my simulations running again.

I made a list of the found problems, which might be helpful to improve next software release(s). The items are sorted in (my personal) order of importance.

  1. Sub-circuit nodes do not accept expressions anymore.
    I use this very nice feature in many of my own libraries. It is also used by other external libraries, like the ones from Vlad of the LTspice user group (which can be found on the LTwiki-website, for instance ltspicegoodies.ltwiki.org/Filt.php).
    I made a very simple example Issue01_NodeExpressions.asc, just to illustrate the method and the problem.
    Rgobeli has reported this issue also one week ago, but with a more complex example.
    I think it is related to the AKO-syntax problem reported before by Tony Casey. An additional “expression to string conversion” was solving it. Possibly the same solution can be used here too.
  2. Passing global/local temperature “temp” to subckts gives an error: “Ill-formed parameter cycle: temp.”.
    By doing ".param temp={temp}" in a subckt, the global parameter “temp” is assigned to the local parameter “temp”, which is just a valid Spice-syntax. In this way all sub-circuits get the same default global temperature. But a library user can also set a subckt to a different temperature by changing its default value from “temp={temp}” to “temp=50” for instance.
    See example issue02_diode_temp.asc.
    This example explains also well how you can set the temperature of each device individually. That might be helpful to test the software.
    Standard Spice models, like a diode, have “temp” as parameter to set its temperature, so it would be very convenient to use the same name also for subckts (like it was possible with LTspice 24.0.12).
  3. Character “?” is not accepted anymore in subckt-names.
    I use for example “ABC.?” as default SpiceModel-value in a symbol. In the belonging library file a dummy “ABC.?” model must be present and several real models “ABC.1”, “ABC.2”, “ABC.3”, ...
    By clicking on the SpiceModel-value of the symbol, a selection list appears with all subckt-names of that library file. The (invalid) dummy subckt “ABC.?” must be present in that library file too, otherwise no selection list pops-up.
    With the new syntax checking the complete library has become invalid, even if that dummy “ABC.?” is not used at all by the simulation circuit.
    Please consider to re-introduce the “?” again as valid character, just like it was done for the “*” and “^” recently. Or ignore the subckts that are not used by the simulation (but that might be more complicated for the syntax checker).
    As a workaround I can use another character for the dummy subckt name (like “ABC.*”) in all libraries. But I would prefer the “?”, because it describes much better that user input is required.
    See example Issue03_QuestionMark.asc.
    Note: the “!” is also not accepted anymore, which might make libraries invalid from other users.
  4. Assigning a value to local/global parameter Gmin gives an error in the log file: “This is a predefined constant which shall not be changed.”.
    Despite the log-error, the simulation just runs without a syntax error message.
    Local parameter name “Gmin” is used a lot by transistor models from Infineon. A local parameter cannot change a global constant or parameter in Spice, so there is nothing wrong. This must be a bug in the syntax checker, possibly related to item 2 (=.param “temp”).
    “Gmin” is something special in (LT)spice (just like “temp”). Again there exist an .option Gmin, which also sets the default initial value to a global .param Gmin. Models (like diodes and switches) might use the .option Gmin and/or the .param Gmin. You can also define a .param Gmin=.. on a sheet, in that case that parameter value will be used instead of the initial Gmin-value.
    The behavior of this (complex) construction has been changed, the global .param Gmin has become a fixed value of 1E-12. Its default value does not depend on .option Gmin anymore, so it is impossible to change the .param Gmin value. This makes that some circuits might behave different, especially if a quite high conductivity value is used.
    See examples issue04_Gmin1.asc and issue4_Gmin2.asc, where just some small simulation differences occur due to the tiny adjustments of Gmin.
  5. Undocumented modulo operator ‘%’ has become percentage.
    I can simply scan my own libraries for ‘%’ and replace it with “.function my_mod(x,y)=..”, but I think it is not wise to modify the %-interpretation after 25 years of existence. Consider reverting this modification, because it can create a lot of problems with existing (encrypted) libraries.
    See example issue05_%.asc.
  6. Functions uplim() and dnlim() are not accepting a transition width of 0 anymore.
    Prior versions of the program are accepting it and just doing the limiting without a smooth region.
    Each user can add an if-statement layer on top of the hard and soft limit functions to prevent this error, but that will be much less convenient.
    See example issue06_uplim_dnlim.asc.

All provided example files in the attached zip-file run well in LTspice 24.0.12 (and earlier).

Hope it helps to improve this nice simulation tool, with its large library and well behaving models.

Issues_LTspice_24_1_4.zip



removed URL because of broken link
[edited by: GenevaCooper at 3:24 PM (GMT -5) on 4 Mar 2025]
Parents
  • Dear  ,

    Thank you very much for this detailed bug report. We really appreciate it. The next update (24.1.5) will have all this corrected. Some notes:

    In prior LTspice versions, just defining a parameter "temp" does not change the circuit temperature. You need to use ".temp" or ".options temp=...". This is rather messy and has already caused problems. Thus, 24.1 doesn't allow defining a parameter "temp". Starting with 24.1.5, you can do so however inside sub-circuits. I believe this is an acceptable compromise because it only affects top-level-schematics, not libraries.

    .param temp={temp}

    inside a sub-circuit has always been ill-formed. However, this line was ignored as long as there is a corresponding instance or sub-circuit parameter with the same name. (You don't need this line, the instance and sub-circuit parameters are found anyway.) 24.1.5 will do the same.

    The default value for "GMIN" is not the actual gmin-option, but always the constant 1e-12.

    Prior versions interpreted "%" as numeric scaling suffix 0.01. (E.g. 23% = 0.23) I removed this when I enabled the "%" as modulo operator. This shouldn't be a problem, because to my knowledge no other spice simulator supports this and it was undocumented.

    You'll also find the help updated. For instance, using expressions as node names is now officially supported and documented.

    Best Regards,
    Mathias

  • Hi Mathias,

    I downloaded 24.1.5 last week and verified each issue:

    1. OK.
      Many thanks for officially supporting this functionality now.
    2. OK, but possibly there is still a small bug.
      Strangely, it matters if “.temp=27” (the default temperature) is specified on the provided example sheet or not (you get an error “Ill-formed parameter cycle: temp.”). Isn't that weird?
    3. OK, perfect.
      Characters “?” and “!” are both accepted again in subckt names.
    4. OK.
      Only in some rare cases (due to “.param temp={temp}”), the user has to define “.param Gmin=1E-12” on top level schematic now. So there seems to be a behavior difference between the default Gmin of 1E-12 and a user defined Gmin of 1E-12.
    5. OK.
    6. OK.

    Thanks for fixing all of them.

    With the improved LTspice24.1.5 I was able to do further testing. The new syntax-checker even found a few bugs in my own libraries (a few missing “)”), so that’s doing a better job.

    I also found a few new (24.1.4/5 - 24.0.12) incompatibilities.

    • 7. A "division by zero" error from the syntax checker.

    This code “.param C=if(A==0,B,1/A)” is creating a “division by zero” error when .param A=0. We can rewrite this as “.param C=if(A==0,B,1/if(A==0,1,A))” to prevent the error, but that becomes quite bad/silly code in my opinion.

    The “else” part is never executed (because A==0), so it should not be evaluated by the syntax checker (and the compiler). I think the usual approach is to do an optimalisation (“.param C=B”) prior to the evaluation of the expressions (but I’m not an expert in this area).
    See issue07_divzero.asc.

    • 8. Comment (“;”) after .LIB statement produces error: “File not found”.

    See issue08_libcomment.asc.

    • 9. The “continuation of previous line” syntax is not functioning for comment (*).

    See issue09_pluscomment.asc.

    Only issue 7 is a showstopper for me.

    Issue 8 and 9 are just FYI. A .LIB is not allowed in encrypted libraries, so only Issue 9 can be a problem for some lib-files.Issues_LTspice_24_1_5.zip

  • Dear ,

    Thanks for checking and letting us know! Points (7) and (8) are indeed bugs and will be fixed in the next update.

    Point (8): The semicolon ";" is a valid character in file names..LIB allows you to specify a filename that contains white space, without using quotes. .INC does not. (Don't beat me for this legacy behavior.) To that end, I argue that prior versions were inconsistent by giving ";" special treatment. Thus we'll leave it as is for the time being. Workaround: Use quotes

    .lib "issue08_libcomment.txt" ; my lib.

    Points (2) and (4) I cannot reproduce. Could you explain in more detail?

    Best Regards,
    Mathias

  • Hi Mathias,

    Herewith a bit more explanation on how to reproduce the mentioned errors.

    Regarding point 2:
    If you remove the two lines “.option temp=..” and “.param temp=..” in file issue02_diode_temp.asc, you should see the error. But if the line “.option temp=..” is put back, the error does not occur anymore.

    Regarding point 4:
    After removing the two lines “.option Gmin=..” and “.param Gmin=..“, in file Issue04_diode_Gmin1.asc the error should become visible. So the line “.param Gmin=..” is needed to prevent the error.

    Both make that the behavior is not exactly equal to LTspice24.0.12. But they can be simply solved by just adding a command on the main-sheet. I have no problem with that, so for me this is very acceptable.

  • Hi  ,

    POINT 2
    ————

    Ah, yes, I was able to reproduce the .options temp vs. .temp error in another schematic. Assume you are talking about this:

    LTspice 24.1.5 for Windows
    Circuit: C:\users\crossover\Documents\LTspice\24.1 Bugs\Issues_LTspice_24_1_4\Issue02_diode_temp.net
    Start Time: Tue Mar 18 13:54:25 2025
    Options: temp=47
    C:\users\crossover\Documents\LTspice\24.1 Bugs\Issues_LTspice_24_1_4\Issue02_diode_temp.net(21): Temperature already set elsewhere.
    .option temp=47 ; it is possible to change the default global environment temperature from 27 to ...
           ^^^^^^^^
    C:\users\crossover\Documents\LTspice\24.1 Bugs\Issues_LTspice_24_1_4\Issue02_diode_temp.net(20): Previous definition:
    .temp = 47 ; alternate syntax for .option temp=47
    ^^^^^^^^^^

    In this case, where .temp has one value, it acts like .options temp = <value>. Note that .temp can also be used as a substitute for .step temp list <value> <value>. See below.

    Nevertheless, I could not reproduce getting the error to go away by simply removing .options temp = 47 and then adding back in. Commenting, uncommenting, same result.

    That said, you are correct that .temp = <value> acts like .options temp = <value>; but only when .temp has a single value:

    LTspice 24.1.5 for Windows
    Circuit: C:\users\crossover\Documents\LTspice\24.1 Bugs\Issues_LTspice_24_1_4\Issue02_diode_temp.net
    Start Time: Tue Mar 18 13:51:29 2025
    solver = Normal
    Maximum thread count: 16
    tnom = 27
    temp = 47
    method = modified trap
    Direct Newton iteration for .op point succeeded.
    Total elapsed time: 0.111 seconds.

    Otherwise, with multiple values, it is a shorthand for .step temp list <value> <value>, but not for .op, for some reason. Have to follow up on that. You can see .temp value value acting as .step temp list value value by running a .tran on your circuit.

    You don't need to try, since I already did:

    .step temp list <value1> <value2>
    .temp <value2> <value3>

    This will be noted as an error in a later version…

    mike

  • Dear  ,

    Thanks for clarifying. I adjusted the parameter look-up accordingly to make this work again. Note though that this will only work for sub-circuits at top level, not for nested sub-circuits. As weird as it may seem, this is consistent with the legacy look-up rules. Will go out with the next update.

    Best Regards,
    Mathias

  • Hi Mike,

    My previous answer was a just recipe to reproduce the error (as requested by Mathias), but I think you did not read it carefully enough. You had to remove (or comment) two other lines to get the proper error: “Ill-formed parameter cycle: temp.”. This error can be prevented by using “.option temp=27” (or any other temperature value).

    So isn’t it weird that you get a different result just by “repeating” the default temperature setting. In other words, there seems to be a difference between the (default) temperature set by the program and the user.

    It's just something strange I noticed. If you think this normal behavior, don’t spend time here anymore. I already know how to bypass it.

    Thanks for the lesson about the several methods to set the temperature in LTspice.

  • Hi  ,

    Ah, yes, I misread your statement about commenting out the .option temp line and the .param temp line:

    If you remove the two lines “.option temp=..” and “.param temp=..” in file issue02_diode_temp.asc, you should see the error. But if the line “.option temp=..” is put back, the error does not occur anymore.

    I did this, and possibly Mathias did the same, since the focus appeared be on the action of commenting then uncommenting the .options line:

    So, if I comment out all of the lines, including .temp, I do get the error:

    As for the workaround:

    So isn’t it weird that you get a different result just by “repeating” the default temperature setting. In other words, there seems to be a difference between the (default) temperature set by the program and the user.

    It's just something strange I noticed. If you think this normal behavior, don’t spend time here anymore. I already know how to bypass it.

    Workaround aside. I agree, this feels buggy to me. Why would one need to restate the default temp just to use temp?

    mike

Reply
  • Hi  ,

    Ah, yes, I misread your statement about commenting out the .option temp line and the .param temp line:

    If you remove the two lines “.option temp=..” and “.param temp=..” in file issue02_diode_temp.asc, you should see the error. But if the line “.option temp=..” is put back, the error does not occur anymore.

    I did this, and possibly Mathias did the same, since the focus appeared be on the action of commenting then uncommenting the .options line:

    So, if I comment out all of the lines, including .temp, I do get the error:

    As for the workaround:

    So isn’t it weird that you get a different result just by “repeating” the default temperature setting. In other words, there seems to be a difference between the (default) temperature set by the program and the user.

    It's just something strange I noticed. If you think this normal behavior, don’t spend time here anymore. I already know how to bypass it.

    Workaround aside. I agree, this feels buggy to me. Why would one need to restate the default temp just to use temp?

    mike

Children