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: *

 Problem with XFRM_LINEAR Subcircuit 

Last post Tue, May 19 2009 1:49 AM by oldmouldy. 3 replies.
Started by G Balaji 11 May 2009 03:50 AM. Topic has 3 replies and 5698 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, May 11 2009 3:50 AM

    • G Balaji
    • Not Ranked
    • Joined on Mon, May 11 2009
    • Posts 4
    • Points 65
    Problem with XFRM_LINEAR Subcircuit Reply
    I created a subcircuit using XFRM_LINEAR (subcircuit within subcircuit) and passed a parameter to this using SUBPARAM. But when I generate the netlist, It doesn't included the parameter on PARAM list and generated the following netlist.

    This is resolved when I use 2 inductors with K instead of XFRM_Linear.

     Why?

    .subckt X_TXl 1 2 3 4

    K_TXl         L1_TXl L2_TXl 0.998

    L1_TXl         1 2 {L1_X}

    L2_TXl         3 4 250u

    .ends X_TXl
    • Post Points: 20
  • Thu, May 14 2009 1:43 PM

    • oldmouldy
    • Top 10 Contributor
    • Joined on Tue, Jul 15 2008
    • Woking, Surrey
    • Posts 1,408
    • Points 24,030
    Re: Problem with XFRM_LINEAR Subcircuit Reply
    Hard to tell exactly what you did, or didn't, do from the supplied information, but the PARAM statement is missing to pass the parameter into the sub-circuit. Your model should look "something like":

    .subckt X_TXl 1 2 3 4

    +PARAM: L1_X=10u

    K_TXl         L1_TXl L2_TXl 0.998

    L1_TXl         1 2 {L1_X}

    L2_TXl         3 4 250u

    .ends X_TXl

    This would have 10u as the default value. Using the Model Editor to create a Capture part would then have "L1_X" as an editable property on the graphical part for use in a schematic. See this PSPice User Guide on Setup parameter passing to a subcircuit using Subparam.
    • Post Points: 20
  • Fri, May 15 2009 11:53 PM

    • G Balaji
    • Not Ranked
    • Joined on Mon, May 11 2009
    • Posts 4
    • Points 65
    Re: Problem with XFRM_LINEAR Subcircuit Reply

     To explain clearly what I did, please find attached snap shot of two models, where model – 1 uses two inductors and K. whereas in model – 2 XFRM_Linear is used instead.
    Given below are the netlists generated by model-1 and model-2 respectively and these netlists are created using “Create Netlist” command in capture project manager.


    Model - 1

    * source LIBRARY_TR
    .SUBCKT TR P1 P2 S1 S2 PARAMS: LVAL=10U
    C_C1         P1 N2433146  1n  TC=0,0
    L_L1_40         S1 S2  {Lval}  
    Kn_K2         L_L1_40 L_L2_40     0.998
    L_L2_40         N2433146 P2  250u  
    .ENDS

    Model – 2
    * source LIBRARY_XTR
    .SUBCKT XTR P1 P2 S1 S2 PARAMS: LVAL=10U
    X_TX1    N00597 P2 S1 S2 XTR_TX1
    C_C1         N00597 P1  10u  TC=0,0
    .ENDS

    .subckt XTR_TX1 1 2 3 4  
    K_TX1         L1_TX1 L2_TX1 1
    L1_TX1         1 2 {LVal}
    L2_TX1         3 4 10uH
    .ends XTR_TX1

    Absolutely Model-1 doesn’t have any problem. But, in Model-2, as you said, It suppose to include +PARAM: L1_X=10u in XTR_TX1 subcircuit and when X_TX1 is called the value LVAL need to passed to this subcircuit.
    I’m expecting this to happen automatically as I’m generating netlist from capture project manager.


    • Post Points: 20
  • Tue, May 19 2009 1:49 AM

    • oldmouldy
    • Top 10 Contributor
    • Joined on Tue, Jul 15 2008
    • Woking, Surrey
    • Posts 1,408
    • Points 24,030
    Re: Problem with XFRM_LINEAR Subcircuit Reply

    You have a subcircuit "calling" a subcircuit, in this case use the "@" construct, rather than the "{}" construct. If you specify the L1 value as "@LVAL" rather than "{LVAL}", the SUBPARAM parameter will be correctly substituted in the "called" subcircuit. Strictly speaking, the "{}" construct specifies a Global parameter, from a PARAM part, rather than a sub-parameter, from a SUBPARAMS part, although the "{}" construct often works!

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by G Balaji at 11 May 2009 03:50 AM. Topic has 3 replies.