Вы находитесь на странице: 1из 3

* (comment)

Purpose A statement beginning with an asterisk * is a comment line, which PSpice


ignores.
General form * [any text]
Examples * This is an example of
* a multiple-line comment
Comments Use an asterisk at the beginning of each line you want to be a comment.

+ (line continuation)
Purpose A plus sign + is treated as the continuation of the previous line.
General form circuit file text
+ more text

Independent voltage source


General form V<name> < (+) node> < (-) node>
+ [[DC] <value>]
+ [AC <magnitude value> [phase value]]
Examples VBIAS 13 0 23V
VAC 2 3 AC 10
VACPHS 2 3 AC 10 90
Description This element is a voltage source. Positive current flows from the (+) node
through the source to the (-) node: in the first example, IBIAS drives node 13 to have a
negative voltage. The AC phase value is in degrees.

Independent current source


General form I<name> < (+) node> < (-) node>
+ [[DC] <value>]
+ [AC <magnitude value> [phase value]]
Examples IBIAS 13 0 2.3mA
IAC 2 3 AC .001
IACPHS 2 3 AC .001 90
Description This element is a current source. Positive current flows from the (+) node
through the source to the (-) node: in the first example, IBIAS drives node 13 to have a
negative voltage. The AC phase value is in degrees.

Resistor
For standard R parts, the effective value of the part is set directly by the VALUE
property. For the variable resistor, R_VAR, the effective value is the product of the base
value (VALUE) and multiplier (SET). In general, resistors should have positive
component values (VALUE property). In all cases, components must not be given a value
of zero.
General form R<name> <(+) node> <(-) node> <value>
Examples RLOAD 15 0 2K
R2 1 2 2.4E4
Arguments and options
(+) and (-) nodes define the polarity when the resistor has a positive voltage across it.
Comments The first node listed is defined as positive. The voltage across the component
is therefore defined as the first node voltage minus the second node voltage. Positive
current flows from the (+) node through the resistor to the (-) node. Current flow from the
first node through the component to the second node is considered positive.
Inductor
General form L<name> <(+) node> <(-) node> <value>
Examples LLOAD 15 0 20mH
L2 1 2 .2E-6
Arguments and options
(+) and (-) nodes define the polarity when the inductor has a positive voltage across it.
The first node listed, is defined as positive. The voltage across the component is therefore
defined as the first node voltage less the second node voltage. Positive current flows from
the (+) node through the inductor to the (-) node. Current flow from the first node through
the component to the second node is considered positive.

Capacitor
General form C<name> <(+) node> <(-) node> <value>
Examples CLOAD 15 0 20pF
Arguments and options
(+) and (-) nodes define the polarity when the capacitor has a positive voltage across it.
The first node listed is defined as positive. The voltage across the component is therefore
defined as the first node voltage, less the second node voltage. Positive current flows
from the (+) node through the capacitor to the (-) node. Current flow from the first node
through the component to the second node is considered positive.

.AC (AC analysis)


Purpose The .AC command calculates the frequency response of a circuit over a range of
frequencies.
General form .AC <sweep type> <points value>
+ <start frequency value> <end frequency value>
Examples .AC LIN 101 100Hz 200Hz
.AC OCT 10 1kHz 16kHz
.AC DEC 20 1MEG 100MEG
Arguments and options
<sweep type>
Must be LIN, OCT, or DEC, as described below.
Parameter Description Description
LIN linear sweep the frequency is swept linearly from the starting to the ending
frequency. The <points value> is the total number of points in
the sweep.
OCT sweep by octaves The frequency is swept logarithmically by octaves. The <points
value> is the number of points per octave.
DEC sweep by decades the frequency is swept logarithmically by decades. The <points
value> is the number of points per decade.
<points value> specifies the number of points in the sweep, using an integer.
<start frequency value> <end frequency value>
The end frequency value must not be less than the start frequency value, and both must
be greater than zero. The whole sweep must include at least one point.

.DC (DC analysis)


Purpose The .DC command performs a linear, logarithmic sweep analysis on the circuit.
The DC sweep analysis calculates the circuit’s bias point over a range of values for
<sweep variable name>.
General form .DC [sweep type] <sweep variable name>
+ <start value> <end value> <increment value>
Examples .DC VIN -25 25 5
.DC LIN -2mA 12.5mA 0.1mA
Arguments and options
Sweep type The sweep can be linear, logarithmic, or a list of values.
LIN linear sweep, the sweep variable is swept linearly from the starting to the ending
value.
<start value> Can be greater or less than <end value> that is, the sweep can go in either
direction.
<increment value> The step size. This value must be greater than zero.
The sweep variable is swept linearly from the starting to the ending value.
logarithmic sweep type must be specified as either DEC (to sweep by decades) or OCT
(to sweep by octaves).
<start value> must be positive and less than <end value>.
<points value> the number of steps per octave or per decade in the sweep. This value
must be an integer.
OCT sweep by octaves. The sweep variable is swept logarithmically by octaves.
DEC sweep by decades Sweep by decades. The sweep variable is swept logarithmically
by decades.
Comments The keyword LIN is optional. Either OCT or DEC must be specified for the
<logarithmic sweep type>.

.PRINT (print)
Purpose The .PRINT command allows results from DC, AC, analyses to be an output in
the form of tables, referred to as print tables in the output file.
General form .PRINT <analysis type> [output variable]*
Examples .PRINT DC V(2,3) V(R1) I(VIN) I(R2)
.PRINT AC VM(2) VP(2) VM(3,4) IR(6)
Arguments and options
<analysis type>
Only one analysis type— DC, AC, NOISE, or TRAN—can be specified for each .PRINT
command.
<output variable> following the analysis type is a list of the output variables. There is no
limit to the number of output variables
Comments The values of the output variables are printed as a table where each column
corresponds to one output variable. An analysis can have multiple .PRINT commands.

.END (end of circuit)


Purpose The .END command marks the end of the circuit. All the data and every other
command must come before it. When the .END command is reached, PSpice does all the
specified analyses on the circuit.
General form .END
Examples * 1st circuit in file
... circuit definition
.END
The last statement in an input file must be an .END command.

Вам также может понравиться