User`s guide

3
-
16 Preparin
g
a Schematic for Simulation
Expressions
An expression is a mathematical relationship that you can use to
define a numeric or boolean (TRUE/FALSE) value.
PSpice A/D 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.
Specif
y
in
g
expressions
To use an expression in
y
our circuit
1
Find the numeric or boolean value you want to replace: a
component value, model parameter value, other attribute
value, or logic in an IF function test (see page 3-19
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 3-1
built-in functions listed in Table 3-2
user-defined functions
system variables listed in Table 3-3
user-defined global parameters
literal operands
The curly braces tell PSpice A/D to evaluate the expression
and use its value.
Example: A parameter that
chan
g
es with each step of a DC
sweep or parametric analysis.
Example: Suppose you have
declared a parameter named
FACTOR (with a value of 1.2)
and want to scale a -10 V
independent volta
g
e source,
VEE, by the value of FACTOR.
To do this, set the DC attribute of
VEE to:
{-10*FACTOR}
PSpice A/D evaluates this
expression to:
(-10 * 1.2) or -12 volts
For more information on user-
defined functions, see the
.FUNC command in the
Commands
chapter in the
online
MicroSim PSpice A/D
R
eference Manual.
For more information on user-
defined parameters, see
Using
Global Parameters and
Expressions for Values on
page 3-14.