Is there a way to add spice parameters from schematic to the netlist?

OyvindWetteland
Explorer

Is there a way to add spice parameters from schematic to the netlist?

OyvindWetteland
Explorer
Explorer

I wish there was a schematic symbol named .PARAMS where I could add various parameters to the simulation netlist.
When I carry out a spice simulation in a Fusion 360 Electronics design, I can see that there is a separate section in the netlist with the heading: 

 

* --------- .PARAMS ---------

 

For now, this section is completely empty.

Is there a way I can add parameters into this section?

 

I need this functionality in order to pass parameters to my spice models.

0 Likes
Reply
229 Views
2 Replies
Replies (2)

edpataky
Autodesk
Autodesk

Hello and thank you for the question .. this is how you do it: 
1) place a text object in the schematic anywhere and set its text to ".PARAM"
2) after the first line, add variable=value on each line after that, one per variable

Attached is an example for transformer ratio sent in as a parameter ".PARAM" on the first line and "RATIO=20" on the second

edpataky_0-1706546052367.png

The model mapped to the transformer part looks like this: 

 

 

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

* Autodesk EAGLE - Spice Model File

* transformer subcircuit, requires RATIO parameter defined

* Date: 10/1/17

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

.SUBCKT XFORMER 1 2 3 4

E 5 4 1 2 {RATIO}

F 1 2 VM {RATIO}

VM 5 6

RP 1 2 1MEG

RS 6 3 1U

.ENDS XFORMER

 

Notice how to the variable is in braces.  


That's how you do it!  Let us know if this solves the issue.  

0 Likes

OyvindWetteland
Explorer
Explorer

Yes, this solves the issue.

 

A very easy and practical solution 🙂

0 Likes