<div>Hi<br clear="all"></div><div>I&#39;ve just begun using ngspice and found that I cannot plot the current output. Also, I cannot specify the name of a circuit component in a .PRINT or .PLOT statement. Only the node numbers seem to work. Here is an example:</div>
<div><br></div><div>Ohm&#39; Law<br>Vin 1 0 5<br>R1 0 1 10K<br>.DC Vin 1 5 1<br>.PRINT DC V(R1)<br>.END<br></div><div><br></div><div>ngspice doesn&#39;t seem to recognize R1 in the .PRINT statement. I get the following error:<br>
</div><div><br></div>$ngspice -b <a href="http://diff.net">diff.net</a> <br><br>Circuit: ohm&#39;s law<br><br>Doing analysis at TEMP = 27.000000 and TNOM = 27.000000<br><br>Warning: can&#39;t parse &#39;r1&#39;: ignored<br>
Error: no data saved for D.C. Transfer curve analysis; analysis not run<br>doAnalyses: not found<br><br>run simulation(s) aborted<br>Error: .print: no dc analysis found.<br>elapsed time since last call: 0.011 seconds.<br>
<br>Total elapsed time: 0.011 seconds.<br><br>Total DRAM available = 2008.300781 MB.<br>DRAM currently available = 423.984375 MB.<br>Total ngspice program size = 18.778320 MB.<br>Resident set size = 732.000 kB.<br>Shared ngspice pages = 551.000 kB.<br>
Text (code) pages = 1.958008 MB.<br>Stack = 0 bytes.<br>Library pages = 5.961914 MB.<br><div>-------------------------------------------------------------------------------------------------</div><div>The simulation however works if I replace it with <br>
</div><div>.PRINT DC V(0,1)</div><div><br></div><div>Secondly, I can&#39;t seem to print current. Using</div><div>.PRINT DC I(R1) or .PRINT DC I(0,1) gives me this error:</div><div><br></div>$ngspice -b <a href="http://diff.net">diff.net</a> <br>
<br>Circuit: ohm&#39;s law<br><br>Doing analysis at TEMP = 27.000000 and TNOM = 27.000000<br><br>Warning: can&#39;t parse &#39;0#branch&#39;: ignored<br>Error: no data saved for D.C. Transfer curve analysis; analysis not run<br>
doAnalyses: not found<br><br>run simulation(s) aborted<br>Error: .print: no dc analysis found.<br>elapsed time since last call: 0.013 seconds.<br><br>Total elapsed time: 0.013 seconds.<br><br>Total DRAM available = 2008.300781 MB.<br>
DRAM currently available = 423.871094 MB.<br>Total ngspice program size = 18.778320 MB.<br>Resident set size = 733.000 kB.<br>Shared ngspice pages = 551.000 kB.<br>Text (code) pages = 1.958008 MB.<br>Stack = 0 bytes.<br><div>
Library pages = 5.961914 MB.<br></div><div>--------------------------------------------------------------------------------------------</div><div><br></div><div>I don&#39;t see this happening in gnucap however (in this case V(0,1) will not work). Am I doing something wrong or is ngspice meant to work this way? I went according to the ngspice manual. I&#39;m using Fedora 13 64-bit with Free Electronic Lab groupinstalled.<br>
</div><div><br></div><div>Thanks! :-)<br></div> <br>Ashwith J. Rego<br>-----------------<br>My Webpage: <a href="http://ashwith.wordpress.com/">http://ashwith.wordpress.com/</a><br>Find me on LinkedIn at: <a href="http://www.linkedin.com/in/ashwith">http://www.linkedin.com/in/ashwith</a><br>
Follow Me on Twitter at: <a href="http://twitter.com/Louisda16th">http://twitter.com/Louisda16th</a><br>