LTSpice24 external models syntax error - Page 1
Forum section: electronics / projects

author: Analog Frontend Designer
author_rank: Contributor
timestamp: February 08, 2025, 11:59:23 am
content: Hi,After the last updates of LTSpice up to 24.1.1 revision some problems arised when simulating circuits with TI OpAmp spice models.However, LTSpice XVII still works with the same models without reporting any errors.Looks like the newer version has another syntax requirements/Maybe someone has a solution for such kind of problem (suppose Im not a single who use LTSpice for mixed AD/TI ICs circuits simulation)Here in attachments the example of typical error log and TI spice model.

author: iMo
author_rank: Super Contributor
timestamp: February 08, 2025, 12:08:30 pm
content: FYI - the best place where the LTspice developers sit and answer:https://ez.analog.com/design-tools-and-calculators/ltspice/

author: RoGeorge
author_rank: Super Contributor
timestamp: February 08, 2025, 01:11:33 pm
content: My advice is to use LTspiceXVII and don't bother what is happening.I've tried the new LTspice and couldn't find anything worth migrating.In fact, I've found in v24 bugs that were fixed years ago in XVII (for example the traces' color bug for simulations with more than 1 step, can not see the legend for other panels than the first, and so on, childhood bugs), so I'm still using LTspice 17 that works just fine for me.

author: mtwieg
author_rank: Frequent Contributor
timestamp: February 08, 2025, 03:04:54 pm
content: Unfortunately getting access to macromodels of newer devices forces using version 24.x. Seems like the latest release fixed a bunch of bugs (tons of their own macromodels were broken) but introduced a few as well. Best bet is to bring it up on the engineerzone forums. They seem generally responsive to bug reports.Not that 24 doesn't have some nice quality of life features. If they can fix everything they broke it will definitely be a significant improvement over XVII.At a glance, it looks like in your case I would just replace the "+" with another character.edit: yep, what he said VVVV

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: February 08, 2025, 03:20:28 pm
content: Hi group,I have looked at the TLV9042.lib file and I explain what is causing it crash.The+symbol can be interpreted as 'continuation of the previous line'.In the TLV9042.lib file we have these two sections of code:In this snippet I have circled the normal use of the + symbol:Modifications to make it workI renamed the subcircuit removing the + symbolHere is my modified code:andWith these modifications the TI model will run on LTspice24:I have attached the file TLV9042_JDB.lib.txt This is the modified model.This may help people fix other models that won't run under LTspice24. If the models are encrypted, you can't edit them.Regards,Jay_Diddy_Btlv9042_JDB.lib.txt(11.3 kB - downloaded 26 times.)

author: RoGeorge
author_rank: Super Contributor
timestamp: February 08, 2025, 04:45:32 pm
content: Sorry, but the plus at the end should have been no problem.The fact that it didn't work is an indicator they screwed the syntax parser, which implicitly breaks the backward compatibility with all the previous models and previous schematics ever done. Please report your finding to Analog Devices, so they can fix it properly.The model/subcircuits are OK with '+' in the names, the programmers messed the LTspice, they introduced a new bug.As for models/libraries updates in the old v17, LTspiceXVII still gets models and libraries updates just like the new v24. Only the engine is kept at v17, which is exactly how I would wish it to be.

author: Zero999
author_rank: Super Contributor
timestamp: February 08, 2025, 05:58:48 pm
content: It's LTSpice 24.1 which is the problem.I've just tried running it on 24 and it worked fine. I then upgraded to 24.1 and it broke.Solution: just use 24. You can also have both versions installed in different directories if you like.

author: iMo
author_rank: Super Contributor
timestamp: February 08, 2025, 07:12:55 pm
content: Quote from: iMo on February 08, 2025, 12:08:30 pmWhen you look into the link you will see there is a pile of bugs in 24.1. people mess with..

author: Zero999
author_rank: Super Contributor
timestamp: February 09, 2025, 08:07:15 pm
content: One problem is, LTSpice doesn't allow you to install 24.0 once you've installed 24.1.Fortunately I've found still have the .msi file I downloaded on 2024-12-31, so I extracted the .exe file, renamed it and copied into my LTSpice 24 directory. It appears to run, but I haven't extensively tested it. Yes I know this isn't the correct way to install software.I'm going to try splitting it up into several files and will post it later.

author: Zero999
author_rank: Super Contributor
timestamp: February 09, 2025, 09:16:33 pm
content: Instructions:You'll need 7-ZipScan the files for viruses.Rename the files to LTspice.zip.001 and LTspice.zip.002 and ensure they're in the same directory.Open 7-Zip.Right click and select combine files.It will generate LTSpice.zip. Open it and extract LTspice 24.exe into your LTSpice installation directory. Click on it and enjoy.Disclaimer: no guarantees this will work.

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 09, 2025, 11:03:17 pm
content: Quote from: Analog Frontend Designer on February 08, 2025, 11:59:23 amYes, I can confirm I had issues with LTSpice 24.1.1 and some TI spice models. In my case, this was due (IIRC) to a net name that contained a "+". This has always worked in previous versions and is legit Spice as far as I can tell, so that must be some "bug" they introduced in some update of their Spice parser. Check if that's the case in the models that don't work on your side. If so, you can modify the corresponding identifiers (like, typically I would change the "+" to a "P" and "-" to "N".)That should work.

author: Zero999
author_rank: Super Contributor
timestamp: February 14, 2025, 05:59:47 pm
content: I've just updated to LTSpice 24.1.2 and the TLV9042 model works.

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 15, 2025, 12:42:56 am
content: Ah yes, the latest update seems to solve it.The changelog for v24.1 was mentioning improved syntax checking for netlists, which I assume actually introduced the bug we ran into. They fixed it in 24.1.2. It's unfortunate that their changelogs do not detail the changes for the revision number (so there are no specific details for 24.1.2, at least that I saw.)