Go Back   Home > Forums > Wiki
Home Forums Rules Articles Store Gallery Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Default

Useful Commands

return to diyAudio Wiki Main Page
back up

[top].param


use the .param command to assign a value to a variable name. For example if you want 10 resistors to all have the same value, and want to easily change the value without changing all 10 resistors individually.

include the spice directive on your schematic:
.param Rvar 1k
then for each resistor, set the value to {Rvar} The curly braces tell Spice to evaluate what's inside the curly braces and use the result as the value.

So to do a 1K potentiometer, you need 2 resistors connected in series, and one with the value {Rvar}, the second {1k-Rvar}

Mathematical expressions can be arbitrarily complex, full details are in the help file under .param

[top].step


If you want try multiple different component values, use the .step command. Example:
.step param Rvar list 100 200 300 400 500
will run 5 simulations with the listed values substituted anywhere the parameter Rvar is used. There are different forms of the .step command, you know where to look.

As a result of running N different simulations, any node you click on will result in N waveforms overlaid on eachother on the waveform display. If you only have one net selected, then the different runs will be in different colors according to whatever color scheme you have set. To figure out which is which (the following was written by Helmut Sennewald, moderator of the yahoo group, all around LTspice expert, and extraordinarily helpful guy):
Make the waveform window active.

Click on the label you are interested. It's the text near the top
of the waveform window, e.g. V(out).

Now you have a cursor attached to the curve.

You can step up/down with the cursor keys.

Move the cursor near the cross hair. When you see the "1" then
click the right mouse button. A small status window appear.

Cursor Step Information
Cursor 1: Val=2 (Run: 3/5)

There is also a selection in the Plot settings menu.
Plot Settings -> Select Steps


Created by mightydub, 21st November 2009 at 03:12 AM
Last edited by mightydub, 21st November 2009 at 03:28 AM
0 Comments, 1,036 Views
Page Tools
Search this Page


Posting Rules
You may not create new articles
You may not edit articles
You may not protect articles

You may not post comments
You may not post attachments
You may not edit your comments

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Hide this!Advertise here!

New To Site? Need Help?

All times are GMT. The time now is 11:53 AM.

Page generated in 0.06935 seconds (75.84% PHP - 24.16% MySQL) with 13 queries

Copyright ©1999-2012 diyAudio