Modelling Parts
Parts can be modelled with a text netlist, a text sub-circuit, or an underlying schematic. The only provided library that contains models implemented with underlying schematics is the dataconv.olb.
A Schematic can be converted into a text netlist and then the netlist can be used as the model source. To prepare a Schematic for use as a Model requires that the Voltage and Current sources be removed and Hierarchical Ports, Place>Port, added to define the interface nodes for the Model. The resulting netlist that gets created is set to create the “sub-circuit” format. The sub-circuit text is then opened with the Model Editor and a “default” Schematic Part with the interface nodes as Pins can be created in a Schematic Library. The Schematic Part can be edited after the library has been created to change the graphics from the default rectangle, if required.
When using the Part in a Schematic, the Schematic Library needs to be added to place the Part in a Schematic, added using Place>Part, and the Model library needs to be added to the Simulation Profile to allow the Model to be found when the simulator searches for models used in the netlist for simulation.
Creating Graphical Parts
Graphical Parts can be created from Capture with File>New>Library. The library will be created with “library<n>.olb” as the filename, where <n> is a number. The next thing to do is use File>Save As and save the created library to a known name and a known location. Also, don’t store any of your data, like libraries and designs in the product installation folders since there is a temptation to delete these folders once an upgrade to a newer release has been made and the older release has been removed.
New Parts are added with Part Properties, a Name is the only critical property for PSpice and an Implementation, typically a PSpice Model, then the graphics can be added.
Use Place>Pin to place Pins and use the other Add menu entries, like Add>Line, to add the graphical detail for the Part. Note that Pins are attached to the dotted “bounding box” and that the “bounding box” is not visible when the Part is placed in a Schematic.
Mapping a Model to a Schematic Part
The PSpiceTemplate property value matches the Pins on the schematic to the Interface Nodes of the Model, or Sub-circuit. Here is an example of the PSpiceTemplate for a 5-pin Op-Amp:
X^@REFDES %+ %- %V+ %V- %OUT @MODEL
X – the model implementation is a sub-circuit
^@REFDES – get the hierarchical reference for the Part in the Schematic
% – maps the Pin Name. In this case the Pin Names are assumed to be: + for the positive input; – for the negative input; V+ for the positive supply; V- for the negative supply; OUT for the output. And the order of the Pin Names, left to right in the PSpiceTemplate, matches the order of the nodes, left to right, for the Model, or Sub-circuit. The nodes are always in this order for a 5-pin Op-Amp Model.
@MODEL – substitutes the value of the Implementation property for the Part.
All content Copyright 2022 Parallel Systems Ltd.
