Problems Making Custom Part in Pspice

Discussion in 'General Electronics Chat' started by sailmike, Mar 13, 2014.

  1. sailmike

    Thread Starter Member

    Nov 11, 2013
    143
    3
    I'm having trouble making a custom part for simulation in Pspice. I want to simulate using a Cree CXA1304 LED, but no symbol shows up in the Capture Part Editor. I used 1N4148 as the source in the Model Editor, modified it with the model coding provided by Cree, and exported that to the capture part library. No symbol shows up in the capture part editor as you can see in the following pictures. I deleted the files I created and tried again using 1N4002 as the source and got the same result. What's going on? What am I missing?

    The second picture is the window I get after clicking ok for exporting to capture part library. As you can you see no errors are reported.

    Thanks,
    Mike
     
  2. sailmike

    Thread Starter Member

    Nov 11, 2013
    143
    3
    Doesn't anyone know how to solve this problem?

    Thanks,
    Mike
     
  3. mvaseem

    Member

    Jan 31, 2014
    48
    8
    Your screenshot shows there is no part generated in cxa1304.olb.

    I tried to do the same for 1N4002. It works successfully.
    Following steps -
    -- Have the model with extension .lib (Change if it is having any other extn).
    -- Open it in Model Editor.
    -- File -> Model Import Wizard (Capture).
    -- The input lib and output olb path shows up in wizard.
    -- Say "Next".
    -- Now if you don't have a symbol for this model, model editor would generate default rectangular symbol for you. Just say "Finish". The symbol is there in output olb. Open the olb in capture (File -> open library) and verify the symbol is there and view it.

    If you already have a 2 pin symbol available and want to associate with this model, do "replace symbol", browse for the olb having the symbol, map terminals, save and finish.
     
  4. sailmike

    Thread Starter Member

    Nov 11, 2013
    143
    3
    I'm still not seeing a symbol for this part. The code for this part is:

    * Cree XLAMP CXA1304 9V LED
    * Model valid for 200mA to 1000mA & Tc=25C
    .MODEL CXA1304 9V D
    + IS=6.81596E-13
    + N=12.63551
    + RS=1.76775
    + XTI=278.50760
    + EG=2.5

    * Cree XLAMP CXA1304 37V LED
    * Model valid for 50mA to 250mA & Tc=25C
    .MODEL CXA1304 37V D
    + IS=1.20943E-13
    + N=49.87699
    + RS=28.52234
    + XTI=1377.99932
    + EG=2.5

    I'm posting some screenshots.

    Thanks,
    Mike
     
  5. mvaseem

    Member

    Jan 31, 2014
    48
    8
    Now it is making sense why you are not getting the symbol.
    You need to wrap the model into a subckt.
    I just did for first one (added "_" also in the model name).
    I could successfully create symbol and simulate it.

    .subckt CXA1304_9V 1 2
    D1 1 2 CXA1304_9V
    * Cree XLAMP CXA1304 9V LED
    * Model valid for 200mA to 1000mA & Tc=25C
    .MODEL CXA1304_9V D
    + IS=6.81596E-13
    + N=12.63551
    + RS=1.76775
    + XTI=278.50760
    + EG=2.5

    * Cree XLAMP CXA1304 37V LED
    * Model valid for 50mA to 250mA & Tc=25C

    .ends CXA1304_9V
     
  6. sailmike

    Thread Starter Member

    Nov 11, 2013
    143
    3
    That solved it! Thanks!

    One more question, where's the "replace symbol" command? I can't find it.

    I drew my own symbol, but would like to use one already drawn if possible. I've simulated the circuit, but I'm getting an undefined error.

    Nevermind, I forgot to add the configuration files. I'd still like to know where the "replace symbol" command is so I don't have to draw it.

    Thanks,
    Mike
     
    Last edited: Mar 15, 2014
  7. mvaseem

    Member

    Jan 31, 2014
    48
    8
    See attached for replace symbol option.
     
  8. sailmike

    Thread Starter Member

    Nov 11, 2013
    143
    3
    The space under symbol name is blank for me. I'm missing something in the coding I think.

    Nevermind, when that space is blank it gives me the option of finding a symbol to associate with that model instead of "replace symbol".

    Thanks for you help,
    Mike
     
    Last edited: Mar 15, 2014
Loading...