Maker Pro
Maker Pro

Parameter passing in PSpice

J

John

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
*$
 
J

Jim Thompson

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
 
J

John

.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
 
Top