[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnucap] netlist ngspice and gnucap

From: Al Davis
Subject: Re: [Help-gnucap] netlist ngspice and gnucap
Date: Fri, 16 Dec 2005 02:45:05 -0500
User-agent: KMail/1.8.3

On Tuesday 13 December 2005 09:51 pm, Hector Miuler Malpica 
Gallegos wrote:
> Hello friends, because it does not work?  with ngspice he
> works well:
> prueba.netlist
> ========================
> Prueba
> i1 0 1 dc 20u
> q1 2 1 0 mod1
> vammeter 3 2 dc 0
> v1 3 0 dc
> .model mod1 npn
> .dc v1 0 2 0.05
> .plot dc i(vammeter)
> .plot dc v(1)
> .end
> ========================

There is a difference between spice and gnucap in the way it 
handles some commands....

Plot and print only attach probes, as a setup for a later 
analysis.  Then you do the analysis after.  In spice, the order 
doesn't matter.

To make it work, rearrange the commands...

.plot dc i(vammeter) v(1)
.dc v1 0 2 0.05

It is a common problem, but it really does work better the 
gnucap way.

As another hint, in gnucap it is not necessary to add voltage 
sources as current probes.  You can probe the current through 
any simple component, and lots of parameters of complex ones 
like transistors and diodes.  So, vammeter is not needed.

Also, the plot command gives you an ugly, nonscaled plot, 
probably not what you want.  You should probably add a 
scale ....

.plot dc ic(q1)(0,10u) v(1)(0,1)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]