
Usage "limit" function: limit(x, min, max)
For example,
V = limit(sin(10 * 2 * pi * time), -1e-2, 1e-2)

with offset
V = limit(sin(10 * 2 * pi * time), -1e-2, 1e-2) + 1e-2

steep slope
V = limit(sin(10 * 2 * pi * time), -1e-2, 1e-2) * 10
Read B-Sources part in Undocumented LTspice for more details.
1. Put two GNDs.

2. Then put a voltage source


3. Then put a Resistor or something, set parameter of it and wire them.




4. Then set parameter of the voltage source(in this step, sin curve is setted.)
Don't forget typing "V =" or error message will be apeared.
Don't forget typing "time" for argument in sin function or the transient shape will be DC.
for example,
V = sin(2 * pi * 10 * time)
in case of 10 Hz.



5. Run


V = sin(2 * pi * 10 * time)

V = limit(sin(10 * 2 * pi * time), -1e-2, 1e-2)

英語のサイトを参考にしたので、たまには英語で書いてみる。
間違ってたらごめん。
【LTspiceの最新記事】