Author Topic: Strange Simulation Error  (Read 427 times)

0 Members and 1 Guest are viewing this topic.

Offline Md Mubdiul HasanTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: se
  • Lets learn more to be more inspired in Electronics
Strange Simulation Error
« on: June 09, 2026, 01:07:43 pm »
Hi there,

I am simulating an well known IC, https://www.ti.com/lit/ds/symlink/uc1825.pdf
See the attached files. The volvo .lib is here, https://ltwiki.org/files/LTspiceIV/lib/sym/ValVol/

Looking at the error massage it says.

\UC3825N\ValVol.lib(387): Syntax error (unexpected input).
.model SWOFF CSW (It=2.9m Ih=-0,1m Ron=10meg Roff=1)

I went the line number 387 and not find anything, even if I remove the parenthesis it doesn't work.
Help me here.

Hasan
« Last Edit: June 09, 2026, 01:10:52 pm by Md Mubdiul Hasan »
Hasan
 

Offline moffy

  • Super Contributor
  • ***
  • Posts: 2908
  • Country: au
Re: Strange Simulation Error
« Reply #1 on: June 09, 2026, 02:11:31 pm »
Should the: .model SWOFF CSW (It=2.9m Ih=-0,1m Ron=10meg Roff=1)
have a fullstop instead of a comma e.g. .model SWOFF CSW (It=2.9m Ih=-0.1m Ron=10meg Roff=1)
 
The following users thanked this post: Md Mubdiul Hasan

Offline Md Mubdiul HasanTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: se
  • Lets learn more to be more inspired in Electronics
Re: Strange Simulation Error
« Reply #2 on: June 09, 2026, 02:15:48 pm »
Should the: .model SWOFF CSW (It=2.9m Ih=-0,1m Ron=10meg Roff=1)
have a fullstop instead of a comma e.g. .model SWOFF CSW (It=2.9m Ih=-0.1m Ron=10meg Roff=1)
I see.@moffy, lets try with this way but within this long file a huge amount of comma is there.
Hasan
 

Offline Md Mubdiul HasanTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: se
  • Lets learn more to be more inspired in Electronics
Re: Strange Simulation Error
« Reply #3 on: June 09, 2026, 02:20:40 pm »
@moffy, after I change comma to fullstop the error shifted to \UC3825N\UC3825_based_pwm_control_ps.net(26): File not found
Hasan
 

Offline mtwieg

  • Super Contributor
  • ***
  • Posts: 1642
  • Country: us
Re: Strange Simulation Error
« Reply #4 on: June 09, 2026, 03:30:28 pm »
What version of LTspice are you using.

Newer versions have changed syntax rules which break a lot of older libraries and models.

edit: after fixing the comma issues, test_UC3825.asc runs fine on version 24.1.1

UC3825_based_pwm_control_ps.asc apparently requires at least one symbol (Potmet) which I don't have access to, so I can't test it. Please include all necessary symbols and libraries, don't force others to go searching for them...
« Last Edit: June 09, 2026, 03:40:21 pm by mtwieg »
 
The following users thanked this post: Md Mubdiul Hasan

Offline Md Mubdiul HasanTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: se
  • Lets learn more to be more inspired in Electronics
Re: Strange Simulation Error
« Reply #5 on: June 10, 2026, 07:27:35 am »
Thank you @mtwieg to take a part here.
I am using V. 24.1.9 now a days.

Its nice that you figure out problem also in test_UC3825.asc.
Attached is the POT .lib, kindly run it it and attach here with all changes.
Hasan
 

Offline mtwieg

  • Super Contributor
  • ***
  • Posts: 1642
  • Country: us
Re: Strange Simulation Error
« Reply #6 on: June 11, 2026, 11:52:44 am »
Thank you @mtwieg to take a part here.
I am using V. 24.1.9 now a days.

Its nice that you figure out problem also in test_UC3825.asc.
Attached is the POT .lib, kindly run it it and attach here with all changes.
Okay, so now the problem is that UC3825_based_pwm_control_ps.asc is incomplete. Components lack values, many pins unconnected, no independent sources, no simulation statement.... even with good symbols and libraries the simulation cannot run. Did you attach an incomplete circuit by mistake?
 
The following users thanked this post: Md Mubdiul Hasan

Offline Md Mubdiul HasanTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: se
  • Lets learn more to be more inspired in Electronics
Re: Strange Simulation Error
« Reply #7 on: June 11, 2026, 02:02:08 pm »
Thank you @mtwieg to take a part here.
I am using V. 24.1.9 now a days.

Its nice that you figure out problem also in test_UC3825.asc.
Attached is the POT .lib, kindly run it it and attach here with all changes.
Okay, so now the problem is that UC3825_based_pwm_control_ps.asc is incomplete. Components lack values, many pins unconnected, no independent sources, no simulation statement.... even with good symbols and libraries the simulation cannot run. Did you attach an incomplete circuit by mistake?

May be not. Take a look in the image. Only I keep open the CLK pin.  Did you check test_UC3825.asc waveform, it seems same.
But again its shows this error, \UC3825N\UC3825_based_pwm_control_ps.net(26): File not found.
.lib ..\sym\ValVol\ValVol.lib
     ^^^^^^^^^^^^^^^^^^^^^^^^

Do you think saving one drive is a problem ? Which drive is better to keep the project file ?
Anyway its a old chip and TI replaced it by TL494, that is my next plan.
« Last Edit: June 11, 2026, 02:04:45 pm by Md Mubdiul Hasan »
Hasan
 

Offline mtwieg

  • Super Contributor
  • ***
  • Posts: 1642
  • Country: us
Re: Strange Simulation Error
« Reply #8 on: June 11, 2026, 07:24:56 pm »
Okay with that new asc file I can get it to run.
May be not. Take a look in the image. Only I keep open the CLK pin.  Did you check test_UC3825.asc waveform, it seems same.
But again its shows this error, \UC3825N\UC3825_based_pwm_control_ps.net(26): File not found.
.lib ..\sym\ValVol\ValVol.lib
     ^^^^^^^^^^^^^^^^^^^^^^^^
Okay I think I see your problem. Those ValVol symbols contain a reference to the relative path ..\sym\ValVol\ValVol.lib. The person who created this library/symbols must have set this up, but on your machine this path likely does not exist. But LTspice is still looking for it, hence the error message.

So what you want to do is remove the reference to that path from the symbol file.
1. Open the symbol file in LTspice.
2. Go to Edit > Attributes > Edit Attributes.
3. In the SpiceModel field you'll see the path "..\sym\ValVol\ValVol.lib". Delete this.
4. Close the Symbol Attribute Editor Window. Save the symbol.
5. Go back to the schematic view. Delete the UC3825 symbol from the schematic.
6. Open the component browser and find the UC3825 symbol. Cick "Refresh" (if you don't do this first, the changes to the symbol might not apply).
7. Add the symbol to the schematic again.
8. It should run fine, assuming you have a proper .inc statement for ValVol.lib in the schematic.

Alternatively, for step 3 can replace the path with just "ValVol.lib". If you do this then you don't need the .inc statement in the schematic.
 
The following users thanked this post: Md Mubdiul Hasan

Offline Md Mubdiul HasanTopic starter

  • Regular Contributor
  • *
  • Posts: 241
  • Country: se
  • Lets learn more to be more inspired in Electronics
Re: Strange Simulation Error
« Reply #9 on: June 12, 2026, 07:17:37 pm »
Okay with that new asc file I can get it to run.
May be not. Take a look in the image. Only I keep open the CLK pin.  Did you check test_UC3825.asc waveform, it seems same.
But again its shows this error, \UC3825N\UC3825_based_pwm_control_ps.net(26): File not found.
.lib ..\sym\ValVol\ValVol.lib
     ^^^^^^^^^^^^^^^^^^^^^^^^
Okay I think I see your problem. Those ValVol symbols contain a reference to the relative path ..\sym\ValVol\ValVol.lib. The person who created this library/symbols must have set this up, but on your machine this path likely does not exist. But LTspice is still looking for it, hence the error message.
So what you want to do is remove the reference to that path from the symbol file.
1. Open the symbol file in LTspice.
2. Go to Edit > Attributes > Edit Attributes.
3. In the SpiceModel field you'll see the path "..\sym\ValVol\ValVol.lib". Delete this.
4. Close the Symbol Attribute Editor Window. Save the symbol.
5. Go back to the schematic view. Delete the UC3825 symbol from the schematic.
6. Open the component browser and find the UC3825 symbol. Cick "Refresh" (if you don't do this first, the changes to the symbol might not apply).
7. Add the symbol to the schematic again.
8. It should run fine, assuming you have a proper .inc statement for ValVol.lib in the schematic.

Alternatively, for step 3 can replace the path with just "ValVol.lib". If you do this then you don't need the .inc statement in the schematic.

@mtwieg, excellent ! It works now, I followed each step you suggested. But, I cant not see a reasonable OUTA and OUTB waveform, perhaps I am missing something. This circuit has both current and voltage control options.  Did you see some result in test_UC3825.asc? May be I have to do the same for that circuit.  You have very sharp  eyes to see the problem. I am also in the Ltspice yahoo group for 12 years or more. But sometime I dont want to bother people with such silly question. Thank you.
Hasan
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf