Home > Community > Forums > PCB Design > Trouble with creating new pspice library

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Trouble with creating new pspice library 

Last post Mon, Jul 8 2013 10:53 AM by AndyK1. 2 replies.
Started by AndyK1 03 Jul 2013 10:14 AM. Topic has 2 replies and 551 views
Page 1 of 1 (3 items)
Sort Posts:
  • Wed, Jul 3 2013 10:14 AM

    • AndyK1
    • Not Ranked
    • Joined on Mon, Jun 17 2013
    • Posts 11
    • Points 175
    Trouble with creating new pspice library Reply

    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

    etc...

    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.  

    • Post Points: 20
  • Wed, Jul 3 2013 9:08 PM

    • alokt
    • Top 25 Contributor
    • Joined on Fri, Aug 22 2008
    • Noida, Uttar Pradesh
    • Posts 241
    • Points 3,470
    Re: Trouble with creating new pspice library Answer Reply

    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.

    HTH

    • Post Points: 20
  • Mon, Jul 8 2013 10:53 AM

    • AndyK1
    • Not Ranked
    • Joined on Mon, Jun 17 2013
    • Posts 11
    • Points 175
    Re: Trouble with creating new pspice library Reply

    That worked, thank you very much. 

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by AndyK1 at 03 Jul 2013 10:14 AM. Topic has 2 replies.