User Guide

Using global parameters and expressions for values
69
Expressions
An expression is a mathematical relationship that you can
use to define a numeric or boolean (TRUE/FALSE) value.
PSpice evaluates the expression to a single value every
time:
it reads in a new circuit, and
a parameter value used within an expression changes
during an analysis.
Specifying expressions
To use an expression in your circuit
1 Find the numeric or boolean value you want to
replace: a component value, model parameter value,
other property value, or logic in an IF function test (see
page 3-72
for a description of the IF function).
2 Replace the value with an expression using the
following syntax:
{ expression }
where expression can contain any of the following:
standard operators listed in Table 9
built-in functions listed in Table 10
user-defined functions
system variables listed in Table 11
user-defined global parameters
literal operands
The curly braces tell PSpice to evaluate the expression
and use its value.
Examp
l
e: A parameter t
h
at c
h
anges wit
h
each step of a DC sweep or parametric
analysis.
Examp
l
e: Suppose you
h
ave
d
ec
l
are
d
a
parameter named FACTOR (with a value of
1.2) and want to scale a -10 V independent
voltage source, VEE, by the value of
FACTOR. To do this, set the DC property of
VEE to:
{-10*FACTOR}
PSpice evaluates this expression to:
(-10 * 1.2) or -12 volts
For more in
f
ormation on user-
d
e
f
ine
d
functions, see the .FUNC command in the
Commands chapter in the online
OrCAD PSpice A/D Reference
M
anual.
For more information on user-defined
parameters, see Using global
parameters and expressions for
values on page 3-67
.
Pspug.book Page 69 Wednesday, November 11, 1998 1:14 PM