u2 function
> Now about spice itself.
> I added new function "u2" to the B source. It is version of "u" that
> change smoothly from 0 to 1 and 1 to 0. I don't know why but standard
> "u" doesn't worked with my galvoscanner model, I spend much time on it and
> finally changed the code. Do You think that this is right? Should
> we solve problems in this way?
What is a galvoscanner ? Anyway, your function should work better than the
original one because it is "more" continuous (what is the function you
used ?). The real problem is the time constant, how fast the funxtion
raises or decreases. The time constant should be 1 or 2 order of magnitude
smaller than the smallest time constant in the circuit.
> Anyway, "u2" works better then "u" in if-then-else expressions, so maybe
> we should keep it?
Why not ?
Paolo
Partial thread listing: