How do I convert PSpices LIMIT function to work in B2 Spice v5??
PSpice’s limit function places a lower and upper limit on a value but we haven t implemented this in our program yet. However, you CAN use B2 Spice’s nonlinear ‘B’ source’s IF-THEN-ELSE function in place of the limit. The LIMT function s format is LIMIT(x, lower, upper), so the equivalent ITE expression is if(x < lower, lower, if(x > upper, upper, x)) That s just nesting two IF statements to mean “if x < lower, then the value is lower. If x > upper, then the value is upper. Otherwise the value is x.” IF-THEN-ELSE functions can ONLY be used in the ‘B’ nonlinear source.