Subcircuit in SPICE

Discussion in 'General Electronics Chat' started by soumendu89, Jan 22, 2014.

  1. soumendu89

    Thread Starter New Member

    Jan 22, 2014
    Moderator edit:

    This thread was split from here:

    Your post has been moved into its own thread, where it will draw more responses.

    Please refrain from "hijacking" existing threads with tangent or off-topic questions. You can create new threads for new questions using the "New Thread" button on the upper left of the page.


    I am trying to create a subcircuit in PSPICE and I need to include following (dependent)voltage expression between two nodes 2 and 10 inside the subcircuit as described above by unkukaracha

    E 2 10 value={(q/Ceq)*(Nsil*(exp(-2*V(2,10)*ET)-exp(V(46)))/(exp(-2*V(2,10)*ET)+exp(V(23))*exp(-1*V(2,10)*ET)+exp(V(46))))+{(q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn)*exp(V(23))))}

    The complete expression cannot fit in one line due to 132 character limit, so I tried using the following technique of breaking the expression into two lines
    E 2 10 value={(q/Ceq)*(Nsil*(exp(-2*V(2,10)*ET)-exp(V(46)))/(exp(-2*V(2,10)*ET)+exp(V(23))*exp(-1*V(2,10)*ET)+exp(V(46))))}

    Yet, the simulator does not take into account the second line while calculating the voltage between nodes 2 and 10. I am using Orcad PSPICE for the simulation. Can someone help me in solving this issue?

    Last edited by a moderator: Jan 22, 2014
  2. tshuck

    Well-Known Member

    Oct 18, 2012

    You can make a thread of your own to ask a question of your own. Do not hijack another person's thread.

    I will ask a moderator to split this off to a new thread.
  3. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    Try removing the {} characters and using the + character at the start of each continuation line.