.step .subckt

.subckt divider A B C
R1 A B {top}
R2 B C {bot}
.ends divider

*X1 in out 0 divider top=9k bot=1k
*V1 in 0 pulse(0 1 0 .5m .5m 0 1m)
*****使用top={top}来参数化变量
X1 in out 0 divider top={top} bot=1k
V1 in 0 10
****使用.step来参数化top电阻
.tran 3m
.step param top list 1k 2k 3k 4k 5k 6k 7k 8k 9k 10k
.backanno
.end

*****参考链接
http://electronicsbeliever.com/how-to-sweep-resistance-in-ltspice-with-step-by-step-tutorials/

******.tran 3m startup 选择了Start external DC supply voltages at 0V,则仿真将在零和斜坡或波形的上升将显示,否则只会显示稳定状态
When the “Start external DC supply voltages at 0V” is ticked, the simulation will start at zero and the ramping or rising of the waveforms will be shown. Otherwise, the waveform will only show the steady state.

你可能感兴趣的:(.step .subckt)