fahimkhan / Online-NgSpice-Simulator

This repositry contains code for Online NgSpice Simulator
MIT License
4 stars 0 forks source link

SyntaxError: Unexpected token E #2

Closed hopewise closed 8 years ago

hopewise commented 8 years ago

I've tried this netlist: Plotting and analyzing a simple AC sinewave voltage

v1 1 0 sin(0 15 60 0 0)
rload 1 0 10k
* change tran card to the following for better Fourier precision
* .tran 1m 30m .01m     and include .options card:
* .options itl5=30000
.tran 1m 30m 
.plot tran v(1) 
.four 60 v(1)
.end

but I've got this error:

SyntaxError: Unexpected token E
    at Object.parse (native)
    at asJson (/Users/Apple/Downloads/Online-NgSpice-Simulator-master/node_modules/python-shell/index.js:142:21)
    at /Users/Apple/Downloads/Online-NgSpice-Simulator-master/node_modules/python-shell/index.js:232:35
    at Array.forEach (native)
    at PythonShell.receive (/Users/Apple/Downloads/Online-NgSpice-Simulator-master/node_modules/python-shell/index.js:231:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at Socket.Readable.push (_stream_readable.js:111:10)
    at Pipe.onread (net.js:531:20)

Please advice, thanks

fahimkhan commented 8 years ago

Hi,

Currently, we do not have facility to plot any specific voltage and current. We plot all the voltage at node and all the branch current. A user can pick any specific voltage/branch current from the interactive plot itself. However to get the plot it is necessary to use 'run' command in the netlist in order to plot the data points we get from ngspice.

I have modify your netlist and its working now.

*Netlist Connection Information v1 1 0 sin(0 15 60 0 0) rload 1 0 10k

*Analysis information .tran 1m 30m .plot tran v(1) .four 60 v(1)

*Please do not remove this line .control run .endc .end

hopewise commented 8 years ago

hanks for support, actually your repo inspired me so much 👍

fahimkhan commented 8 years ago

Thanks!!