Help defining PSPICETEMPLATE for BAV99 component

I set up a circuit using part BAV99

formatting link
I defined the following PSpiceTemplate property "D^@REFDES %A %C @MODEL\\nD^@REFDES %C %J @MODEL". When I run the simulator (pspice), I find that the PSpiceTemplate property that I devised is not correct.

Because BAV99 is a double diode, the device itself has three terimals. The pin properties for BAV99 are configured as A, C, J corresponding to physical pins 1, 2, and 3 respectively on the device.

I devised PSPICETEMPLATE this way because I was trying to get the net node assignment to substitute properly as they ought to for basic Spice Diode. How should I revise the PSPICETEMPLATE variable so that the expansion is correct during substitution? Thanks

PSpiceTemplate: D^@REFDES %A %C @MODEL\\nD^@REFDES %C %J @MODEL

PSpice console window output:

**** 06/06/05 21:15:01 ******* PSpice 10.3.0 (Jan 2004) ******* ID# 1111111111 ** Profile: "SCHEMATIC1-bias" [ D:\\DESIGN\\test4\\bav99-pspicefiles\\schematic1\\bias.sim ]

**** CIRCUIT DESCRIPTION

******************************************************************************

** Creating circuit file "bias.cir"

** WARNING: THIS AUTOMATICALLY GENERATED FILE MAY BE OVERWRITTEN BY SUBSEQUENT SIMULATIONS

*Libraries:

  • Profile Libraries :
  • Local Libraries : ..LIB "../../../bav99-pspicefiles/bav99.lib"
  • From [PSPICE NETLIST] section of D:\OrCAD\OrCAD_10.3\tools\PSpice\PSpice.ini file: ..lib "D:\design\hb\humminbird2-PSpiceFiles\humminbird2.lib" ..lib "nom.lib"

*Analysis directives: ..PROBE V(alias(*)) I(alias(*)) W(alias(*)) D(alias(*)) NOISE(alias(*)) ..INC "..\\SCHEMATIC1.net"

**** INCLUDING SCHEMATIC1.net ****
  • source BAV99 X_DN1 N00185 N00220 N00207 SCHEMATIC1_DN1 V_V1 N00178 N00233 5Vdc R_R1 N00178 N00185 1k R_R2 N00233 N00207 2k R_R3 N00233 N00220 3k

..subckt SCHEMATIC1_DN1 A C J D_DN1 A C BAV99 D_DN1 C J BAV99 ..ends SCHEMATIC1_DN1

**** RESUMING bias.cir **** ..END

**** EXPANSION OF SUBCIRCUIT X_DN1 **** X_DN1.D_DN1 N00185 N00220 X_DN1.BAV99

ERROR -- Name "X_DN1.D_DN1" is defined more than onceX_DN1.D_DN1 1

------------$ ERROR -- Extra text on line

Reply to
beagle197
Loading thread data ...
[snip]
[snip]

You need to show us the complete part description, not just the Template. However, several gotchas....

(1) You've defined TWO diodes with the SAME REFDES, rewrite as...

Dx^@REFDES %A %C @MODEL \\n Dy^@REFDES %2ndAnode %2ndCathode @MODEL

(%2ndAnode %2ndCathode... pick the correct %C or %J, see (3))

(2) "\\n" with no spaces fore or aft has been observed to cause trouble in later versions of PSpice... some village idiot programmer changed the code that had been around forever. Change "\\n" to " \\n "

(3) If Model is strictly a diode declaration, the node order matters, should ALWAYS be "anode cathode" for each device. I'm not familiar with the BAV99, is it cathode-to-cathode or cathode-to-anode?

...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.
Reply to
Jim Thompson

Jim, thanks for replying! Your help set me forward about one light year on the evolutionary scale ;-) .

In regards to your question the complete part description is as follows (note this requires fixed font for viewing the ASCII diagram properly).

BAV99 part:

2 o--|
Reply to
beagle197

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.