Hello guys ,
I am trying to create a custom OLB file for pspice, for that I start by creating a .lib text file so I can convert it to OLB using the model editor. In the .lib file I type
.model Cbreak CAP C=1 dev=21.19%
so I would have a part named Cbreak, that would as the CAP definition suggests and has a deviation of %21.19 percent. When I turn this part in to a psice olb file and put it on my circuit, it goes back to the original deviation that the "Cbreak" model is defined as.
In order to solve the problem, I rename the part and code it as
.model C_cust CAP C=1 dev=21.19%
and when I do that it cannot simulate the part becuase C_cust model does not exist. I am thinking I need to create models, before I create libraries, before I create OLB files, before I use them in my circuits before I actually simulate them.
I tried the above method with a resistor and an LM117 subckt and always the same result. If you use the .model command, you are stuck with whatever is in that model.
So the question is, how do I create my own custom capacitor or resistor model?
I have asked this question before to other people and the answers I get are always in the form of
Use the model editor
Copy from a previously made library
Export as OLB
These things do not accomplish of creating a "model", but merely have you edit someone elses part. I need to know how to make them from scratch.
If you multiple definition of same models (Cbreak ), simulator would pick up the first one found in search order.
If you create a new Model (C_Cust), you need to make this model definition available to simulator. This can be done by configuring your library file in simulation profile. You can configure this library file as "GLOBAL" : This would make all model available in this new library file to all designs (old as well as new); "Design" : This would make all model available in this new library file available to all simulation profiles associated with that design; "Profile" : This would make all model available in this new library file to that specific simulation profile only.
So you need to perform just one extra step and things should work.
In reply to alokt:
That worked, thank you very much.