I am building my own simulation parts in Orcad 16.6:
I can build a schematic and take the generated netlist to use as a stand-alone component, but I want to be able to change parameters inside the model. How do you pass parameters from capture to pspice?
As an example, a voltage source has a parameter that sets the voltage.
A resistor has value, tolerance and other parameters, depending where you take the part from.
So, can anyone help me with the proper syntax and maybe other tips?
Best Answer
After a lot of searching online and reading the reference guide and user manual, I found the simple answer.
First, the definition of the circuit has to be like:
Best way to see how this works is through an example, so I built a current limited voltage supply:
This works for +/- Voltage settings.
You might also notice that I avoid having sub-circuits defined in the main circuit. This way, you can add parameters in the sub-circuit. Otherwise, the definition of the parameters is not passed to the sub-circuits. This happens because in PSpice you define connections on the "outside" of the part and values are within the model, not accessible from an upper level (e.g. circuit definition or parameter).
I hope this helps someone else too :)