Spice Simulation not accepting models from directory.

Spice Simulation not accepting models from directory.

mjenkins5720
Enthusiast Enthusiast
1,970 Views
15 Replies
Message 1 of 16

Spice Simulation not accepting models from directory.

mjenkins5720
Enthusiast
Enthusiast

Hello everyone,

 I am trying to run a simulation with user model files. The simulation error says that the file should be in C:\Users\user\Documents\Fusion 360\spice. However even if i place then in that directory still gives error. 

I have attached the spice model to the device in the library. 

 

I would appreciate any help on the subject. 

0 Likes
Accepted solutions (2)
1,971 Views
15 Replies
Replies (15)
Message 2 of 16

panpan_fan
Autodesk
Autodesk

Hi @mjenkins5720 

I hope you are doing well!

It should work if the spice model is put in the path C:\Users\user\Documents\Fusion 360\spice

You can try to add the model again in the library and then add the part again.Or you can remove the model and add the model in the path again.

If it still can't work, please leave your comment, thanks!

 

Regards,

Panpan Fan

0 Likes
Message 3 of 16

mjenkins5720
Enthusiast
Enthusiast

Panpan Fan

 

I have tried, adding it to the old spice directory, the eagle examples directory, the Fusion 360 directory. It appears to have a problem at simulation time, not always at upload time. An additional note, the files are complex  LM317HT adjustable voltage regulator.

0 Likes
Message 4 of 16

panpan_fan
Autodesk
Autodesk
Accepted solution

Hi @mjenkins5720 

Thanks for your feedback!

Would do mind sending me your schematic file and all your mdl files? I will give you my email address as a private message. Then we can find the root cause more easily.  Thanks!

 

Regards,

Panpan Fan

0 Likes
Message 5 of 16

mjenkins5720
Enthusiast
Enthusiast

Panpan Fan

 

Attached is what I think is the Electronics schematic, Also i attached the LM317 model, i had to change the extension to .txt so the post would accept it.

 

Please let me know if you make any progress.

 

Regards

Mike

0 Likes
Message 6 of 16

edpataky
Autodesk
Autodesk

Mike, I downloaded the files above from Panpan, and ran your simulation to show what it looks like with a DC sweep of the input ... note that the schematic calls for a model called  LM317HT but the model itself calls it  LM317 ... they have to match, so i changed it to LM317 in both places ... i also added names to the various signals in the sch ... and since the potentiometer part requires a .PARAM statement, i added that as well

 

edpataky_0-1605721480503.png

 

0 Likes
Message 7 of 16

edpataky
Autodesk
Autodesk

This is the naming i was talking about: 

 

edpataky_0-1605721774709.png

 

 

The filename, the model name, and the actual model name in the file all should match up .. in your case the name had "HT" at the end (came from the filename) but the model itself did not have it, so that would not work ... i fixed as shown

0 Likes
Message 8 of 16

edpataky
Autodesk
Autodesk

Notice also the .PARAM statement .. it is simply a text object, and inside it you write .PARAM on the first line, then you can have one or more lines with variable=value, where variable is the name of a variable you want accessible to models, and value is the value

 

In your case, this potentiometer model has two variables, and so you need to set those values

 

edpataky_0-1605722037190.png

Here is the model you are using within that POT part: 

 

********************************************

* Autodesk EAGLE - Spice Model File

* Date: 9/25/17

* Variable resistor PIN1 ---/\/\/\/\--- PIN2

*                               |

*                              PIN3

********************************************

.subckt POT 1 2 3

R1 1 3 {val*var/100}

R2 3 2 {val-val*var/100}

.ends POT

0 Likes
Message 9 of 16

mjenkins5720
Enthusiast
Enthusiast

Thank you for the response, 

However I still have the problem with Fusion asking for the file in the directory, Even after i place the file in de required directory.

 

How did you add the model, In the part or in the schematic?

0 Likes
Message 10 of 16

mjenkins5720
Enthusiast
Enthusiast

Thank you for the reply, 

 

I had wonder how the simulation would know what value to use in the pot.

 

Is this something I can add to the part, or does it have to be added to the schematic?+

 

regards

Mike

 

0 Likes
Message 11 of 16

edpataky
Autodesk
Autodesk

>> I had wonder how the simulation would know what value to use in the pot.

 

see my above comment about the .PARAM statement .. there is explanation there

0 Likes
Message 12 of 16

edpataky
Autodesk
Autodesk

>> However I still have the problem with Fusion asking for the file in the directory, Even after i place the file in de required directory. How did you add the model, In the part or in the schematic?

 

I added the model in the schematic, but note that i had to make sure the model was in the directory fusion tells you to put it in, and also see my explanation above about the filename and model names ... if the model name is not properly the same as the filename it will not find it

0 Likes
Message 13 of 16

mjenkins5720
Enthusiast
Enthusiast

Ok It finally accepted the LM317 model, However I misspelled the PARAM , and i cant seem to be able to edit it or delete it.

Can you please explain how. 

0 Likes
Message 14 of 16

mjenkins5720
Enthusiast
Enthusiast

Also,

what layer do I need to place the text in.?

0 Likes
Message 15 of 16

edpataky
Autodesk
Autodesk
just right click on it and choose properties and change the text
0 Likes
Message 16 of 16

edpataky
Autodesk
Autodesk
Accepted solution
You can place it in the info layer
0 Likes