summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Convert.py
diff options
context:
space:
mode:
authorFahim2016-02-29 19:59:10 +0530
committerFahim2016-02-29 19:59:10 +0530
commit44d403c92bf62a8885e2a2cddf2bd4019c5532b9 (patch)
tree6b10c243f58f1b6a4c0679c1981d1d543cf47443 /src/kicadtoNgspice/Convert.py
parent9fec585d1fb1e0673b52e6d6d41c4c7ea88ad234 (diff)
downloadeSim-44d403c92bf62a8885e2a2cddf2bd4019c5532b9.tar.gz
eSim-44d403c92bf62a8885e2a2cddf2bd4019c5532b9.tar.bz2
eSim-44d403c92bf62a8885e2a2cddf2bd4019c5532b9.zip
Subject: Modified code for transformer model. Modified INSTALL
instruction. Description: Modified code for transformer model. Modified INSTALL
Diffstat (limited to 'src/kicadtoNgspice/Convert.py')
-rw-r--r--src/kicadtoNgspice/Convert.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index efd70cc2..78a39c2f 100644
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -207,14 +207,18 @@ class Convert:
#print "Model Track :",line
if line[2] == 'transfo':
try:
- start=line[5]
- end=line[6]
+ print "Transformer-------------->"
+ print "Line ---------->",line
+ start=line[7]
+ end=line[8]
num_turns=str(self.obj_track.model_entry_var[start].text())
+
if num_turns=="": num_turns="310"
h_array= "H_array = [ "
b_array = "B_array = [ "
h1=str(self.obj_track.model_entry_var[start+1].text())
b1=str(self.obj_track.model_entry_var[start+2].text())
+
if len(h1)!=0 and len(b1)!=0:
h_array=h_array+h1+" "
b_array=b_array+b1+" "
@@ -239,8 +243,8 @@ class Convert:
elif line[2] == 'ic':
try:
- start=line[5]
- end=line[6]
+ start=line[7]
+ end=line[8]
for key,value in line[9].iteritems():
initVal = str(self.obj_track.model_entry_var[value].text())
if initVal=="":initVal="0"
@@ -254,8 +258,8 @@ class Convert:
else:
try:
- start = line[5]
- end = line[6]
+ start = line[7]
+ end = line[8]
addmodelLine=".model "+ line[3]+" "+line[2]+"("
for key,value in line[9].iteritems():
#print "Tags: ",key
@@ -303,7 +307,8 @@ class Convert:
schematicInfo.append(item[2]) #Adding Comment
schematicInfo.append(item[1]) #Adding model line
- print "MYSCH------->",schematicInfo
+ print "Schematic Info after ngspice Model------->",schematicInfo
+ print "Model Parameter Value ",modelParamValue
return schematicInfo
def addDeviceLibrary(self,schematicInfo,kicadFile):