Parameter passing in PSpice

J

John

Guest
Dear all,

Thanks for having come past the vaguely naughty sounding subject.

I have a seemingly trivial problem but of course, as I'm in a hurry, I can't
solve it.
I wish to make a symbol in PSpice where I pass a parameter to a subcircuit
e.g. I'd like to be able to change the 10k resistor value in the sub-circuit
below below from my john_res symbol.
I've added my .params definition in just about any place that I can think of
and I've tried changing the symbol template definition to just about
everything but with no joy.

I'd be really pleased if somebdy could help out here.

thanks,
John



John s resistor
*
..SUBCKT resisto 1 2
*
r1 1 2 10k
*
..ENDS
*$
 
On Sun, 2 Nov 2003 13:39:20 +0100, "John" <John.Evans@cern.ch> wrote:

Dear all,

Thanks for having come past the vaguely naughty sounding subject.

I have a seemingly trivial problem but of course, as I'm in a hurry, I can't
solve it.
I wish to make a symbol in PSpice where I pass a parameter to a subcircuit
e.g. I'd like to be able to change the 10k resistor value in the sub-circuit
below below from my john_res symbol.
I've added my .params definition in just about any place that I can think of
and I've tried changing the symbol template definition to just about
everything but with no joy.

I'd be really pleased if somebdy could help out here.

thanks,
John



John s resistor
*
.SUBCKT resisto 1 2
*
r1 1 2 10k
*
.ENDS
*$
..SUBCKT resisto 1 2 PARAMS: R=1K
r1 1 2 {R}
..ENDS resisto

This is *just* the subcircuit declaration and belongs in a *library*

The symbol library would have a Template:

X^@REFDES %1 %2 resisto PARAMS: R={R}
R=1K

Change the value from within the schematic

Read the manual under subcircuit declaration and instantiation

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
.SUBCKT resisto 1 2 PARAMS: R=1K
r1 1 2 {R}
.ENDS resisto

This is *just* the subcircuit declaration and belongs in a *library*

The symbol library would have a Template:

X^@REFDES %1 %2 resisto PARAMS: R={R}
R=1K

Change the value from within the schematic
Thanks a lot.
regards,
John
 

Welcome to EDABoard.com

Sponsor

Back
Top