1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

How am I supposed to get a plot from this code on WeSpice(NGspice) engine?

Discussion in 'Circuit Simulation & PCB Design' started by sr13579, Feb 17, 2018.

  1. sr13579

    sr13579 Member

    Joined:
    Sep 9, 2017
    Messages:
    40
    Likes:
    0
    There is the code
    ’npn transistor
    vbias 3 0 dc 5v
    vs 1 0 dc 0v
    rb 1 2 20k
    rc 3 4 2k
    q 4 2 0 mynpn
    .model mynpn npn (BF=175 IS=1e-17 VA=75 BR=2)
    .dc vs 0 5 0.5
    .plot dc v(3) -i(vbias)
    .end ’
    But the output is showing a negative going down. How to get the graph of the plot with this app called WeSpice?
    [enter image description here](https://i.stack.imgur.com/KgLEe.png)
     

    Attached Files:

  2. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,973
    Likes:
    1,079
    Location:
    Loveland, CO USA
    As stated many times. None of us use WeSpice. After seeing you struggle with WeSpice none of us will try that program.
    If you asked the question about LTSpice then 30 people will answer. LT Spice = free.
    There are experts on Spice here that use several types of spice.

    40 years ago I used some programs that were not good. In those days:
    ".plot dc v(3) -i(vbias)" would plot negative. Try ".plot dc v(3) i(vbias)" or .plot dc v(3) +i(vbias)
    In many old spice programs a (-) ahead a net name caused the plot to be inverted.
     
  3. sr13579

    sr13579 Member

    Joined:
    Sep 9, 2017
    Messages:
    40
    Likes:
    0
    I think I found the problem. I was not using the .control and run command. Now it is ckear that why it was not working. But there is another problem now. Take a look at the screenshot,please.
     

    Attached Files:

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice